]> git.donarmstrong.com Git - ca-certificates.git/blob - debian/rules
Debian version 20120212 (last commit had d/changelog typo)
[ca-certificates.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 VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: //p')
9
10 configure: configure-stamp
11 configure-stamp:
12         dh_testdir
13         # Add here commands to configure the package.
14         touch configure-stamp
15
16 build: build-arch build-indep
17
18 build-arch: build-stamp
19
20 build-indep: build-stamp
21
22 build-stamp: configure-stamp 
23         dh_testdir
24
25         # Add here commands to compile the package.
26         $(MAKE)
27         touch build-stamp
28
29 clean:
30         dh_testdir
31         dh_testroot
32         rm -f build-stamp configure-stamp
33         # Add here commands to clean up after the build process.
34         [ ! -f Makefile ] || $(MAKE) clean
35
36         debconf-updatepo
37
38         dh_clean
39
40 install: build
41         dh_testdir
42         dh_testroot
43         dh_prep
44         dh_installdirs
45         # Add here commands to install the package into debian/ca-certificates.
46         $(MAKE) install DESTDIR=$(CURDIR)/debian/ca-certificates
47         (cd $(CURDIR)/debian/ca-certificates/usr/share/ca-certificates; \
48          crts=""; \
49          for crt in $$(find . -type f -name '*.crt' -print); \
50          do \
51            crt=$$(echo $$crt | sed -e 's/\.\///'); \
52            if test "$$crts" = ""; then \
53              crts="$$crt"; \
54            else \
55              crts="$$crts, $$crt"; \
56            fi; \
57          done; \
58          cd $(CURDIR)/debian; \
59          sed -e "s|#INITIAL_CERTS#|$$crts|" -e "s|#VERSION#|$(VERSION)|" \
60                 config.in > config)
61
62 # Build architecture-independent files here.
63 binary-indep: build install
64         dh_testdir
65         dh_testroot
66         dh_installdebconf -n
67         dh_installdocs
68         dh_installexamples
69         dh_installman sbin/update-ca-certificates.8
70         dh_installchangelogs 
71         dh_compress
72         dh_fixperms
73         dh_installdeb
74         dh_gencontrol
75         dh_md5sums
76         dh_builddeb
77
78 # Build architecture-dependent files here.
79 binary-arch: build install
80 # We have nothing to do by default.
81
82 binary: binary-indep binary-arch
83 .PHONY: build clean binary-indep binary-arch binary install configure