Rev 72 | Rev 86 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | magnus | 1 | #!/usr/bin/make -f |
2 | |||
3 | SOURCE_PACKAGE = libspf2 |
||
61 | magnus | 4 | LIB_PACKAGE = libspf2-2 |
2 | magnus | 5 | |
61 | magnus | 6 | DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
7 | DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
||
2 | magnus | 8 | |
61 | magnus | 9 | ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) |
10 | buildflags := --build=$(DEB_BUILD_GNU_TYPE) |
||
11 | else |
||
12 | buildflags := --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) |
||
13 | endif |
||
2 | magnus | 14 | |
71 | magnus | 15 | CFLAGS := $(shell dpkg-buildflags --get CFLAGS) |
16 | CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) |
||
17 | LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) |
||
18 | perlld := $(shell perl -MConfig -e 'print $$Config{ld}') |
||
19 | |||
61 | magnus | 20 | DEB_LDFLAGS_MAINT_APPEND = -Wl,--version-script=$(CURDIR)/debian/libspf2.ver |
21 | buildflags += $(shell DEB_LDFLAGS_MAINT_APPEND="$(DEB_LDFLAGS_MAINT_APPEND)" \ |
||
22 | dpkg-buildflags --export=configure) |
||
23 | |||
24 | config.status: configure |
||
25 | dh_testdir |
||
26 | # Add here commands to configure the package. |
||
80 | magnus | 27 | dh_autoreconf |
71 | magnus | 28 | ./configure --prefix=/usr $(buildflags) |
61 | magnus | 29 | |
30 | build: build-arch |
||
31 | build-indep: |
||
32 | build-arch: build-arch-stamp |
||
33 | build-arch-stamp: config.status |
||
34 | dh_testdir |
||
35 | |||
71 | magnus | 36 | $(MAKE) |
37 | cd perl && perl Makefile.PL INSTALLDIRS=vendor \ |
||
38 | OPTIMIZE="$(CPPFLAGS) $(CFLAGS)" LD="$(perlld) $(CFLAGS) $(LDFLAGS)" |
||
39 | $(MAKE) -C perl LD_RUN_PATH= |
||
61 | magnus | 40 | |
41 | touch "$@" |
||
42 | |||
43 | clean: |
||
44 | dh_testdir |
||
45 | dh_testroot |
||
46 | rm -f build-arch-stamp |
||
47 | |||
48 | [ ! -f Makefile ] || $(MAKE) distclean |
||
71 | magnus | 49 | [ ! -f perl/Makefile ] || $(MAKE) -C perl realclean |
61 | magnus | 50 | |
80 | magnus | 51 | dh_autoreconf_clean |
61 | magnus | 52 | dh_clean |
53 | |||
54 | install: build-arch |
||
55 | dh_testdir |
||
56 | dh_testroot |
||
57 | dh_prep |
||
58 | |||
71 | magnus | 59 | $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
60 | $(MAKE) -C perl install DESTDIR=$(CURDIR)/debian/tmp |
||
61 | magnus | 61 | |
62 | binary-arch: install |
||
63 | dh_testdir |
||
64 | dh_testroot |
||
65 | dh_install -a |
||
2 | magnus | 66 | # Rename the `spfquery` tool for the alternatives system: |
67 | mv debian/spfquery/usr/bin/spfquery debian/spfquery/usr/bin/spfquery.$(SOURCE_PACKAGE) |
||
68 | mv debian/spfquery/usr/sbin/spfd debian/spfquery/usr/sbin/spfd.$(SOURCE_PACKAGE) |
||
61 | magnus | 69 | dh_installdocs -a --link-doc=$(LIB_PACKAGE) |
70 | dh_installchangelogs -a |
||
71 | dh_installman -a |
||
72 | dh_strip -a --dbg-package=$(LIB_PACKAGE)-dbg |
||
68 | magnus | 73 | dh_perl -a |
61 | magnus | 74 | dh_compress -a |
75 | dh_fixperms -a |
||
72 | magnus | 76 | dh_makeshlibs -V '$(LIB_PACKAGE) (>= 1.2.8~)' |
61 | magnus | 77 | dh_installdeb -a |
78 | dh_shlibdeps -a |
||
79 | dh_gencontrol -a |
||
80 | dh_md5sums -a |
||
81 | dh_builddeb -a |
||
2 | magnus | 82 | |
61 | magnus | 83 | binary: binary-arch |
84 | |||
2 | magnus | 85 | get-orig-source: |
41 | magnus | 86 | wget http://www.libspf2.org/spf/libspf2-1.2.9.tar.gz |
61 | magnus | 87 | |
88 | .PHONY: build build-indep build-arch clean clean-patched binary-indep binary-arch binary install get-orig-source |