| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
out := debram |
| 8 |
out_data := $(out)-data |
| 9 |
docdata := docdata |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
export DEBRAM_OPTIM_LVL |
| 15 |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
| 16 |
DEBRAM_OPTIM_LVL := -O0 |
| 17 |
else |
| 18 |
DEBRAM_OPTIM_LVL := -O2 |
| 19 |
endif |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
CFLAGS := $(shell dpkg-buildflags --get CFLAGS) |
| 24 |
|
| 25 |
build-arch: build-arch-stamp |
| 26 |
build-arch-stamp: |
| 27 |
dh_testdir |
| 28 |
$(MAKE) |
| 29 |
$(MAKE) -C src arch.dat # generate placeholding data |
| 30 |
touch build-arch-stamp |
| 31 |
|
| 32 |
build-indep: build-indep-stamp |
| 33 |
build-indep-stamp: |
| 34 |
dh_testdir |
| 35 |
touch build-indep-stamp |
| 36 |
|
| 37 |
build: build-arch build-indep |
| 38 |
|
| 39 |
clean: |
| 40 |
dh_testdir |
| 41 |
dh_testroot |
| 42 |
rm -f build-arch-stamp build-indep-stamp build-stamp |
| 43 |
[ ! -f Makefile ] || $(MAKE) clean |
| 44 |
[ ! -f src/Makefile ] || $(MAKE) -C src clean # clean the placeholder |
| 45 |
dh_clean |
| 46 |
|
| 47 |
install: install-indep install-binary |
| 48 |
install-indep: DH_OPTIONS= |
| 49 |
install-indep: build-indep |
| 50 |
dh_testdir |
| 51 |
dh_testroot |
| 52 |
dh_prep |
| 53 |
dh_installdirs |
| 54 |
dh_install |
| 55 |
install-arch: DH_OPTIONS= |
| 56 |
install-arch: build-arch |
| 57 |
dh_testdir |
| 58 |
dh_testroot |
| 59 |
dh_prep |
| 60 |
dh_installdirs |
| 61 |
dh_installdirs usr/lib/$(out) # for placeholding data |
| 62 |
dh_install |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
binary-indep: build-indep install-indep |
| 67 |
dh_testdir -i |
| 68 |
dh_testroot -i |
| 69 |
dh_install |
| 70 |
dh_installdocs -i |
| 71 |
dh_installchangelogs -i |
| 72 |
dh_lintian |
| 73 |
dh_strip_nondeterminism |
| 74 |
dh_compress -i -A #usr/share/$(out_data)/$(out).txt |
| 75 |
dh_link |
| 76 |
|
| 77 |
dh_fixperms -i |
| 78 |
dh_installdeb -i |
| 79 |
dh_gencontrol -i |
| 80 |
dh_md5sums -i |
| 81 |
dh_builddeb -i |
| 82 |
|
| 83 |
|
| 84 |
binary-arch: build-arch install-arch |
| 85 |
dh_testdir -a |
| 86 |
dh_testroot -a |
| 87 |
dh_install src/arch.dat usr/lib/$(out) # placeholding data |
| 88 |
dh_installdocs -a |
| 89 |
dh_installchangelogs -a |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
dh_link |
| 95 |
|
| 96 |
|
| 97 |
for DOC in \ |
| 98 |
$$( sed -ne 's/^$(docdata)\///p' debian/$(out_data).docs ) \ |
| 99 |
; do \ |
| 100 |
dh_link -a usr/share/doc/$(out_data)/$${DOC}.gz \ |
| 101 |
usr/share/doc/$(out)/$${DOC}.gz ; \ |
| 102 |
done |
| 103 |
dh_link -a usr/share/doc/$(out_data)/README \ |
| 104 |
usr/share/doc/$(out)/README |
| 105 |
dh_installman |
| 106 |
dh_lintian |
| 107 |
dh_strip -a |
| 108 |
dh_strip_nondeterminism |
| 109 |
dh_compress -a -A |
| 110 |
dh_link |
| 111 |
|
| 112 |
dh_fixperms -a |
| 113 |
dh_installdeb -a |
| 114 |
dh_shlibdeps -a |
| 115 |
dh_gencontrol -a |
| 116 |
dh_md5sums -a |
| 117 |
dh_builddeb -a |
| 118 |
|
| 119 |
binary: binary-indep binary-arch |
| 120 |
.PHONY: build clean binary-indep binary-arch binary install-indep install-arch install |