| 1 | #!/usr/bin/make -f |
|---|
| 2 | |
|---|
| 3 | #include /usr/share/dpatch/dpatch.make |
|---|
| 4 | |
|---|
| 5 | ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
|---|
| 6 | CFLAGS = unoptimized |
|---|
| 7 | else |
|---|
| 8 | CFLAGS = optimized |
|---|
| 9 | endif |
|---|
| 10 | |
|---|
| 11 | PUGS_BUILD_OPTS = $(DEB_BUILD_OPTIONS) |
|---|
| 12 | |
|---|
| 13 | configure: configure-stamp |
|---|
| 14 | configure-stamp: |
|---|
| 15 | dh_testdir |
|---|
| 16 | PUGS_EMBED=perl5 perl Makefile.PL INSTALLDIRS=vendor PREFIX=/usr |
|---|
| 17 | touch configure-stamp |
|---|
| 18 | |
|---|
| 19 | build: build-arch build-indep |
|---|
| 20 | |
|---|
| 21 | build-arch: build-arch-stamp |
|---|
| 22 | build-arch-stamp: configure-stamp |
|---|
| 23 | $(MAKE) $(CFLAGS) |
|---|
| 24 | # -test $$SKIP_TESTS || $(MAKE) upload-smoke |
|---|
| 25 | pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" $(CURDIR)/script/pugscc $(CURDIR)/debian/pugscc.1 |
|---|
| 26 | touch build-arch-stamp |
|---|
| 27 | |
|---|
| 28 | build-indep: build-indep-stamp |
|---|
| 29 | build-indep-stamp: configure-stamp |
|---|
| 30 | touch build-indep-stamp |
|---|
| 31 | |
|---|
| 32 | clean: clean1 |
|---|
| 33 | clean1: |
|---|
| 34 | dh_testdir |
|---|
| 35 | dh_testroot |
|---|
| 36 | rm -f build-arch-stamp build-indep-stamp configure-stamp install-stamp |
|---|
| 37 | -$(MAKE) realclean |
|---|
| 38 | rm -f debian/pugscc.1 |
|---|
| 39 | dh_clean |
|---|
| 40 | |
|---|
| 41 | install: install-indep install-arch |
|---|
| 42 | install-stamp: |
|---|
| 43 | dh_testdir |
|---|
| 44 | dh_testroot |
|---|
| 45 | $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
|---|
| 46 | dh_installdirs |
|---|
| 47 | dh_install --sourcedir=$(CURDIR)/debian/tmp --list-missing |
|---|
| 48 | touch install-stamp |
|---|
| 49 | |
|---|
| 50 | install-indep: install-stamp |
|---|
| 51 | dh_testdir |
|---|
| 52 | dh_testroot |
|---|
| 53 | cp $(CURDIR)/debian/pugs-modules.lintian-overrides $(CURDIR)/debian/pugs-modules/usr/share/lintian/overrides/pugs-modules |
|---|
| 54 | cp -r $(CURDIR)/docs/* $(CURDIR)/debian/pugs-doc/usr/share/doc/pugs-doc/ |
|---|
| 55 | cp util/perl6.vim $(CURDIR)/debian/pugs/usr/share/vim/addons/syntax |
|---|
| 56 | |
|---|
| 57 | install-arch: install-stamp |
|---|
| 58 | dh_testdir |
|---|
| 59 | dh_testroot |
|---|
| 60 | # rmdir --ignore-fail-on-non-empty |
|---|
| 61 | rm -rf $(CURDIR)/debian/pugs/usr/lib/perl6/5.8/ |
|---|
| 62 | |
|---|
| 63 | # Build architecture independant packages using the common target. |
|---|
| 64 | binary-indep: build-indep install-indep |
|---|
| 65 | dh_testdir -i |
|---|
| 66 | dh_testroot -i |
|---|
| 67 | dh_installchangelogs -i ChangeLog |
|---|
| 68 | dh_installdocs -i |
|---|
| 69 | dh_installexamples -i examples/* |
|---|
| 70 | find $(CURDIR)/debian/pugs-doc/ -type f -size 0 -exec rm -f {} \; |
|---|
| 71 | dh_installman -i |
|---|
| 72 | dh_link -i |
|---|
| 73 | dh_compress -i |
|---|
| 74 | dh_fixperms -i |
|---|
| 75 | dh_installdeb -i |
|---|
| 76 | dh_gencontrol -i |
|---|
| 77 | dh_md5sums -i |
|---|
| 78 | dh_builddeb -i |
|---|
| 79 | |
|---|
| 80 | # Build architecture dependant packages using the common target. |
|---|
| 81 | binary-arch: build-arch install-arch |
|---|
| 82 | dh_testdir -a |
|---|
| 83 | dh_testroot -a |
|---|
| 84 | dh_installchangelogs -a ChangeLog |
|---|
| 85 | dh_installdocs -a |
|---|
| 86 | dh_installman -a debian/pugscc.1 |
|---|
| 87 | dh_link -a |
|---|
| 88 | dh_compress -a |
|---|
| 89 | dh_fixperms -a |
|---|
| 90 | dh_strip -a |
|---|
| 91 | dh_makeshlibs -a |
|---|
| 92 | dh_installdeb -a |
|---|
| 93 | dh_shlibdeps -a |
|---|
| 94 | dh_gencontrol -a |
|---|
| 95 | dh_md5sums -a |
|---|
| 96 | dh_builddeb -a |
|---|
| 97 | |
|---|
| 98 | binary: binary-arch binary-indep |
|---|
| 99 | .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure clean1 |
|---|