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