Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 61 | Rev 69 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61 Rev 68
1
#!/usr/bin/make -f
1
#!/usr/bin/make -f
2
2
3
SOURCE_PACKAGE = libspf2
3
SOURCE_PACKAGE = libspf2
4
LIB_PACKAGE = libspf2-2
4
LIB_PACKAGE = libspf2-2
5
5
6
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
6
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
7
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
7
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
8
8
9
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
9
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
10
  buildflags := --build=$(DEB_BUILD_GNU_TYPE)
10
  buildflags := --build=$(DEB_BUILD_GNU_TYPE)
11
else
11
else
12
  buildflags := --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
12
  buildflags := --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
13
endif
13
endif
14
14
15
DEB_LDFLAGS_MAINT_APPEND = -Wl,--version-script=$(CURDIR)/debian/libspf2.ver
15
DEB_LDFLAGS_MAINT_APPEND = -Wl,--version-script=$(CURDIR)/debian/libspf2.ver
16
buildflags += $(shell DEB_LDFLAGS_MAINT_APPEND="$(DEB_LDFLAGS_MAINT_APPEND)" \
16
buildflags += $(shell DEB_LDFLAGS_MAINT_APPEND="$(DEB_LDFLAGS_MAINT_APPEND)" \
17
 dpkg-buildflags --export=configure)
17
 dpkg-buildflags --export=configure)
18
18
19
config.status: configure
19
config.status: configure
20
	dh_testdir
20
	dh_testdir
21
	# Add here commands to configure the package.
21
	# Add here commands to configure the package.
22
	dh_autotools-dev_updateconfig
22
	dh_autotools-dev_updateconfig
23
	./configure --prefix=/usr $(buildflags)
23
	./configure --enable-perl --prefix=/usr $(buildflags)
24
24
25
build: build-arch
25
build: build-arch
26
build-indep:
26
build-indep:
27
build-arch: build-arch-stamp
27
build-arch: build-arch-stamp
28
build-arch-stamp: config.status
28
build-arch-stamp: config.status
29
	dh_testdir
29
	dh_testdir
30
30
31
	$(MAKE)
31
	$(MAKE)
32
32
33
	touch "$@"
33
	touch "$@"
34
34
35
clean:
35
clean:
36
	dh_testdir
36
	dh_testdir
37
	dh_testroot
37
	dh_testroot
38
	rm -f build-arch-stamp
38
	rm -f build-arch-stamp
39
39
40
	[ ! -f Makefile ] || $(MAKE) distclean
40
	[ ! -f Makefile ] || $(MAKE) distclean
41
41
42
	dh_autotools-dev_restoreconfig
42
	dh_autotools-dev_restoreconfig
43
	dh_clean
43
	dh_clean
44
44
45
install: build-arch
45
install: build-arch
46
	dh_testdir
46
	dh_testdir
47
	dh_testroot
47
	dh_testroot
48
	dh_prep
48
	dh_prep
49
49
50
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
50
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp INSTALLDIRS=vendor
51
51
52
binary-arch: install
52
binary-arch: install
53
	dh_testdir
53
	dh_testdir
54
	dh_testroot
54
	dh_testroot
55
	dh_install -a
55
	dh_install -a
56
#	Rename the `spfquery` tool for the alternatives system:
56
#	Rename the `spfquery` tool for the alternatives system:
57
	mv debian/spfquery/usr/bin/spfquery debian/spfquery/usr/bin/spfquery.$(SOURCE_PACKAGE)
57
	mv debian/spfquery/usr/bin/spfquery debian/spfquery/usr/bin/spfquery.$(SOURCE_PACKAGE)
58
	mv debian/spfquery/usr/sbin/spfd debian/spfquery/usr/sbin/spfd.$(SOURCE_PACKAGE)
58
	mv debian/spfquery/usr/sbin/spfd debian/spfquery/usr/sbin/spfd.$(SOURCE_PACKAGE)
59
	dh_installdocs -a --link-doc=$(LIB_PACKAGE)
59
	dh_installdocs -a --link-doc=$(LIB_PACKAGE)
60
	dh_installchangelogs -a
60
	dh_installchangelogs -a
61
	dh_installman -a
61
	dh_installman -a
62
	dh_strip -a --dbg-package=$(LIB_PACKAGE)-dbg
62
	dh_strip -a --dbg-package=$(LIB_PACKAGE)-dbg
-
 
63
	dh_perl -a
63
	dh_compress -a
64
	dh_compress -a
64
	dh_fixperms -a
65
	dh_fixperms -a
65
	dh_makeshlibs -V '$(LIB_PACKAGE) (>= 1.2.9)'
66
	dh_makeshlibs -V '$(LIB_PACKAGE) (>= 1.2.9)'
66
	dh_installdeb -a
67
	dh_installdeb -a
67
	dh_shlibdeps -a
68
	dh_shlibdeps -a
68
	dh_gencontrol -a
69
	dh_gencontrol -a
69
	dh_md5sums -a
70
	dh_md5sums -a
70
	dh_builddeb -a
71
	dh_builddeb -a
71
72
72
binary: binary-arch
73
binary: binary-arch
73
74
74
get-orig-source:
75
get-orig-source:
75
	wget http://www.libspf2.org/spf/libspf2-1.2.9.tar.gz
76
	wget http://www.libspf2.org/spf/libspf2-1.2.9.tar.gz
76
77
77
.PHONY: build build-indep build-arch clean clean-patched binary-indep binary-arch binary install get-orig-source
78
.PHONY: build build-indep build-arch clean clean-patched binary-indep binary-arch binary install get-orig-source