#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 PACKAGE=$(shell dh_listpackages) ifndef PERL PERL = /usr/bin/perl endif TMP = $(CURDIR)/debian/$(PACKAGE) configure: configure-stamp configure-stamp: dh_testdir # Generate the Build script $(PERL) Build.PL destdir=$(TMP) touch configure-stamp build: build-arch build-indep build-arch: build-indep: build-stamp build-stamp: configure-stamp dh_testdir ./Build build --verbose=1 ./Build test --verbose=1 # Generate man pages for artemis only cd lib/Ifeffit/lib/artemis.doc ; ./make_doc --man cd examples && \ tar -czf artemis_examples.tar.gz artemis && \ tar -czf athena_examples.tar.gz athena touch build-stamp clean: dh_testdir dh_testroot dh_clean build-stamp configure-stamp [ ! -f Build ] || ./Build realclean --verbose=1 # rm -f */*.db # rm -f athena.pl artemis.pl diana.pl hephaestus.pl athena artemis diana hephaestus rm -f athena_parts/rc.pl artemis_parts/rc.pl rm -f lib/Ifeffit/lib/athena/athenarc \ lib/Ifeffit/lib/athena/athena.ini \ lib/Ifeffit/lib/athena/athenarcw rm -f lib/Ifeffit/lib/artemis/artemisrc \ lib/Ifeffit/lib/artemis/artemis.ini \ lib/Ifeffit/lib/artemis/artemisrcw \ lib/Ifeffit/lib/artemis.doc/artemis.1 \ lib/Ifeffit/lib/artemis.doc/artemisdoc.pod rm -f examples/*.tar.gz dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs # Install package in temporary directory ./Build install --installdirs vendor --verbose=1 rm -rf $(CURDIR)/debian/horae/usr/share/man/man3 rm -rf $(CURDIR)/debian/horae/usr/lib rm -rf $(CURDIR)/debian/horae/usr/share/perl5/WWWBrowser.pm # fix encoding iconv -f ISO-8859-1 -t UTF-8 $(CURDIR)/debian/horae/usr/share/perl5/Ifeffit/Tools.pm > Tools.pm mv Tools.pm $(CURDIR)/debian/horae/usr/share/perl5/Ifeffit/Tools.pm # Tidy up names to avoid lintian errors mv $(CURDIR)/debian/horae/usr/bin/ifeffit_shell.pl \ $(CURDIR)/debian/horae/usr/bin/ifeffit_shell mv $(CURDIR)/debian/horae/usr/share/man/man1/ifeffit_shell.pl.1p \ $(CURDIR)/debian/horae/usr/share/man/man1/ifeffit_shell.1p dh_install debian/athena.xpm usr/share/pixmaps dh_install debian/artemis.xpm usr/share/pixmaps dh_install debian/hephaestus.xpm usr/share/pixmaps dh_install debian/athena.desktop usr/share/applications dh_install debian/artemis.desktop usr/share/applications dh_install debian/hephaestus.desktop usr/share/applications # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installdocs dh_installexamples dh_installman dh_installchangelogs dh_link dh_compress dh_fixperms dh_installdeb dh_perl dh_gencontrol dh_md5sums dh_builddeb # Build architecture-dependent files here. binary-arch: # We have nothing to do by default. binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure