Git init
[external/xmlsec1.git] / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 # Uncomment this to turn on verbose mode.
6 #export DH_VERBOSE=1
7
8 # These are used for cross-compiling and for saving the configure script
9 # from having to guess our platform (since we know it already)
10 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
11 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
12
13
14 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
15         CFLAGS += -g
16 endif
17
18 # shared library versions, option 1
19 #version=2.0.5
20 #major=2
21 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
22 version=`ls src/.libs/lib*.so.* | \
23         awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
24 major=`ls src/.libs/lib*.so.* | \
25         awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
26
27 config.status: configure
28         dh_testdir
29         # Add here commands to configure the package.
30         -test -r /usr/share/misc/config.sub && \
31                 cp -f /usr/share/misc/config.sub config.sub
32         -test -r /usr/share/misc/config.guess && \
33                 cp -f /usr/share/misc/config.guess config.guess
34         ./configure \
35                 --host=$(DEB_HOST_GNU_TYPE) \
36                 --build=$(DEB_BUILD_GNU_TYPE) \
37                 --prefix=/usr \
38                 --mandir=\$${prefix}/share/man \
39                 --infodir=\$${prefix}/share/info \
40                 --with-html-dir=\$${prefix}/share/doc/xmlsec1/html \
41                 --enable-dynamic \
42                 --disable-crypto-dl \
43                 --disable-apps-crypto-dl \
44                 --without-gnutls
45
46
47 build: build-stamp
48 build-stamp: config.status
49         dh_testdir
50
51         # Add here commands to compile the package.
52         $(MAKE)
53
54         touch build-stamp
55
56 clean:
57         dh_testdir
58         dh_testroot
59         rm -f build-stamp
60
61         # Add here commands to clean up after the build process.
62         [ ! -f Makefile ] || $(MAKE) distclean
63
64         dh_clean COPYING config.log config.cache config.status config.sub \
65                 config.guess
66
67 install: build
68         dh_testdir
69         dh_testroot
70         dh_prep
71         dh_installdirs
72
73         # Add here commands to install the package into debian/tmp
74         $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
75         # strip unwanted RPATH caused by bug in old libtool
76 #       chrpath -d $(CURDIR)/debian/tmp/usr/lib/*.so \
77 #               $(CURDIR)/debian/tmp/usr/bin/xmlsec1
78
79 # Build architecture-independent files here.
80 binary-indep: build install
81 # We have nothing to do by default.
82
83 # Build architecture-dependent files here.
84 binary-arch: build install
85         dh_testdir
86         dh_testroot
87
88         dh_install -X.cvsignore --sourcedir=debian/tmp
89         dh_installexamples -X.cvsignore examples/*
90         dh_installdocs -X.sgml --all README debian/README.Debian debian/TODO.Debian
91         dh_installman
92         dh_installchangelogs ChangeLog
93         dh_strip
94         dh_compress -Xexamples/
95         dh_fixperms
96         dh_makeshlibs -V
97         dh_installdeb
98         dh_shlibdeps -l $(CURDIR)/debian/libxmlsec1/usr/lib
99         dh_gencontrol
100         dh_md5sums
101         dh_builddeb
102
103 binary: binary-indep binary-arch
104 .PHONY: build clean binary-indep binary-arch binary install