debian swirl logo

Back to the packages list mythes-it

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

RELEASE_VERSION= $(shell head -1 debian/changelog | sed -re 's/[^(]+\(([^)]+)\).+/\1/')
RELEASE_UVERSION= $(shell head -1 debian/changelog | sed -re 's/[^(]+\(([^-]+)[^)]+\).+/\1/')
RELEASE_PACKAGE= mythes-it

DEB_INSTALL_CHANGELOGS_ALL= _build/ChangeLog

# Copy everything in the _build dir renaming as we want, then let debhelper do
# the job
build/mythes-it::
		mkdir -p _build
		/usr/share/mythes/th_gen_idx.pl -o _build/th_it_IT_v2.idx < th_it_IT.dat
		cp th_it_IT.dat _build/th_it_IT_v2.dat 
		for f in AUTHORS ChangeLog INSTALL Lingua.png Linguistica-Modifica.png README copyright_licenza.txt lettera_in_inglese.txt sinonimi.jpg; do \
		  cp th_it_IT_$$f _build/$$f ; \
		done
		cp debian/dictinfo _build/mythes-it
		base64 --decode debian/sinonimiamo.jpg.base64 > _build/sinonimiamo.jpg

clean::
		rm -rf _build

# Run this only from master branch
release: clean
		test -z "`git-ls-files -d -o -m -u -s`" || (echo "There are uncommitted changes"; /bin/false)
		test -z "`git diff --cached`" || (echo "There are uncommitted changes in the index"; /bin/false)
	git archive --format= tar --prefix=$(RELEASE_PACKAGE)-$(RELEASE_UVERSION)/ v$(RELEASE_UVERSION) | gzip -9 > ../$(RELEASE_PACKAGE)_$(RELEASE_UVERSION).orig.tar.gz
		dpkg-buildpackage -us -uc -S -I.git
		git tag -s -m "Tagged version $(RELEASE_VERSION)" v$(RELEASE_VERSION)

Builds:

mythes-it
italian thesaurus for openoffice.org 2