#!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 PYTHON=python BASENAMES=places counties zips ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. #$(MAKE) #/usr/bin/docbook-to-man debian/dict-gazetteer2k.sgml > dict-gazetteer2k.1 $(PYTHON) zipswriter.py $(PYTHON) placeswriter.py $(PYTHON) countieswriter.py # Ensure deterministic mtime for dictzip to inherit touch --date='@$(SOURCE_DATE_EPOCH)' *.dict dictzip *.dict touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. #-$(MAKE) clean -rm -f *.dict *.dz *.index *.pyc -rm debian/*.dirs debian/*.postinst debian/*.postrm dh_clean install: build dh_testdir dh_testroot dh_clean -k for FILE in $(BASENAMES); do \ cp debian/dirs.tmpl debian/dict-gazetteer2k-$$FILE.dirs; \ cp debian/postinst.tmpl debian/dict-gazetteer2k-$$FILE.postinst; \ cp debian/postrm.tmpl debian/dict-gazetteer2k-$$FILE.postrm; \ done dh_installdirs -A # Add here commands to install the package into debian/dict-gazetteer2k. #$(MAKE) install DESTDIR=$(CURDIR)/debian/dict-gazetteer2k for FILE in places counties zips; do \ cp gazetteer2k-$$FILE.dict.dz debian/dict-gazetteer2k-$$FILE/usr/share/dictd/ ; \ cp gazetteer2k-$$FILE.index debian/dict-gazetteer2k-$$FILE/usr/share/dictd/ ; \ done # Build architecture-independent files here. binary-arch: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-indep: build install dh_testdir dh_testroot # dh_installdebconf dh_installdocs -A dh_installexamples dh_installmenu # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_installinit dh_installcron dh_installman dh_installinfo dh_lintian # dh_undocumented dh_installchangelogs -A dh_link dh_strip dh_compress dh_fixperms # dh_makeshlibs dh_installdeb -A # dh_perl dh_shlibdeps dh_gencontrol -A dh_md5sums -A dh_builddeb -A binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure