It turns out the *.a static libraries were a autoconf error upstream
[shibboleth/xmltooling.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 #
5 # This file was originally written by Joey Hess and Craig Small.
6 # As a special exception, when this file is copied by dh-make into a
7 # dh-make output file, you may use that output file without restriction.
8 # This special exception was added by Craig Small in version 0.37 of dh-make.
9 #
10 # Modified to make a template file for a multi-binary package with separated
11 # build-arch and build-indep targets  by Bill Allombert 2001
12
13 # Uncomment this to turn on verbose mode.
14 #export DH_VERBOSE=1
15
16 # This has to be exported to make some magic below work.
17 export DH_OPTIONS
18
19 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
20     DEBUG = --enable-debug
21 else
22     DEBUG =
23 endif
24
25 # Tell Autoconf the correct system types.
26 DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
27 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
28 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
29     SYSTEM = --build $(DEB_HOST_GNU_TYPE)
30 else
31     SYSTEM = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
32 endif
33
34 configure: configure-stamp
35 configure-stamp:
36         dh_testdir
37         cp /usr/share/misc/config.guess config.guess
38         cp /usr/share/misc/config.sub config.sub
39         CFLAGS="$(CFLAGS)" LIBS=-lpthread ./configure --prefix=/usr \
40             --disable-dependency-tracking $(SYSTEM) $(DEBUG)
41         touch $@
42
43 build: build-arch build-indep
44 build-arch: build-stamp
45 build-indep:
46 build-stamp: configure-stamp
47         dh_testdir
48         $(MAKE)
49         touch $@
50
51 clean:
52         dh_testdir
53         dh_testroot
54         rm -f configure-stamp build-stamp install-stamp
55         [ ! -f Makefile ] || $(MAKE) distclean
56         dh_clean config.guess config.sub
57
58 install: install-stamp
59 install-stamp:
60         dh_testdir
61         dh_testroot
62         dh_prep
63         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
64         rm -r $(CURDIR)/debian/tmp/usr/share/doc/xmltooling*
65         dh_install -a -i --fail-missing
66         touch $@
67
68 binary: binary-arch binary-indep
69 binary-arch: DH_OPTIONS=-a
70 binary-arch: install-stamp
71         dh_testdir
72         dh_testroot
73         dh_installchangelogs
74         dh_installdocs -A doc/NOTICE.txt
75         dh_link
76         dh_strip
77         dh_compress
78         dh_fixperms
79         dh_makeshlibs
80         dh_installdeb
81         dh_shlibdeps
82         dh_gencontrol
83         dh_md5sums
84         dh_builddeb
85
86 binary-indep: DH_OPTIONS=-i
87 binary-indep: install-stamp
88         dh_testdir
89         dh_testroot
90         dh_installchangelogs
91         dh_installdocs -A doc/NOTICE.txt
92         dh_link
93         dh_compress
94         dh_fixperms
95         dh_installdeb
96         dh_gencontrol
97         dh_md5sums
98         dh_builddeb
99
100 .PHONY: binary binary-arch binary-indep build build-arch build-indep clean
101 .PHONY: install