Prepare the 0.8.1-1 release
[jigdo.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 include /usr/share/dpkg/architecture.mk
7
8 CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
9 CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
10 CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
11 LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
12 PKG_CONFIG ?= $(DEB_HOST_GNU_TYPE)-pkg-config
13
14 configure: configure-stamp
15 configure-stamp:
16         dh_testdir
17         autoconf
18         dh_auto_configure -- --without-gui --enable-nls
19         touch configure-stamp
20
21 build: build-arch build-indep
22 build-arch: build-stamp
23 build-indep: build-stamp
24
25 build-stamp: configure-stamp
26         dh_testdir
27         $(MAKE) \
28              EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}" \
29              EXTRA_CXXFLAGS="${CPPFLAGS} ${CXXFLAGS}" \
30              EXTRA_LDFLAGS="${LDFLAGS}"
31
32 ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
33         $(MAKE) X="`$(PKG_CONFIG) glib-2.0 --cflags`" \
34              EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}" \
35              EXTRA_CXXFLAGS="${CPPFLAGS} ${CXXFLAGS}" \
36              EXTRA_LDFLAGS="${LDFLAGS}" \
37              GLIBLIBS="`$(PKG_CONFIG) glib-2.0 --libs`" -C src test || true
38 endif
39         touch build-stamp
40
41 clean:
42         dh_testdir
43         dh_testroot
44         rm -f build-stamp configure-stamp config.log po/*.gmo
45         [ ! -f Makefile ] || $(MAKE) distclean
46         dh_clean
47
48 install: build
49         dh_testdir
50         dh_testroot
51         dh_prep
52         $(MAKE) DESTDIR=debian/jigdo-file install-po \
53             install-jigdo-file install-jigdo-lite install-jigdo-mirror
54
55 # Build architecture-independent files here.
56 binary-indep: build install
57 # We have nothing to do by default.
58
59 # Build architecture-dependent files here.
60 binary-arch: build install
61         dh_testdir
62         dh_testroot
63         dh_installdocs
64         dh_installexamples
65         dh_installmenu
66         dh_installchangelogs 
67         dh_link
68         dh_strip
69         dh_compress
70         dh_fixperms
71         dh_installdeb
72         dh_shlibdeps
73         dh_gencontrol
74         dh_md5sums
75         dh_builddeb
76
77 binary: binary-indep binary-arch
78 .PHONY: build clean binary-indep binary-arch binary install configure