comparison debian/implicit @ 389:5ff8218bcee9

propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e) to branch 'au.asn.ucc.matt.dropbear' (head ecd779509ef23a8cdf64888904fc9b31d78aa933)
author Matt Johnston <matt@ucc.asn.au>
date Thu, 11 Jan 2007 03:14:55 +0000
parents 1857c2c551ea
children
comparison
equal deleted inserted replaced
388:fb54020f78e1 389:5ff8218bcee9
1 # $Id: implicit,v 1.11 2005/11/29 21:57:55 pape Exp $
2
3 .PHONY: deb-checkdir deb-checkuid
4
5 deb-checkdir:
6 @test -e debian/control || sh -cx '! : wrong directory'
7 deb-checkuid:
8 @test "`id -u`" -eq 0 || sh -cx '! : need root privileges'
9
10 %.deb: %.deb-docs %.deb-DEBIAN
11 @rm -f $*.deb $*.deb-checkdir $*.deb-docs $*.deb-docs-base \
12 $*.deb-docs-docs $*.deb-docs-examples $*.deb-DEBIAN \
13 $*.deb-DEBIAN-dir $*.deb-DEBIAN-scripts $*.deb-DEBIAN-md5sums
14
15 %.udeb: %.deb-DEBIAN
16 @rm -f $*.deb $*.deb-checkdir $*.deb-DEBIAN $*.deb-DEBIAN-dir \
17 $*.deb-DEBIAN-scripts $*.deb-DEBIAN-md5sums
18
19 %.deb-checkdir:
20 @test -d debian/$* || sh -cx '! : directory debian/$* missing'
21 @test "`id -u`" -eq 0 || sh -cx '! : need root privileges'
22
23 %.deb-docs-base:
24 : implicit
25 @rm -f debian/$*/usr/share/doc/$*/* || :
26 @install -d -m0755 debian/$*/usr/share/doc/$*
27 : debian/$*/usr/share/doc/$*/
28 @sh -cx 'install -m0644 debian/copyright debian/$*/usr/share/doc/$*/'
29 @sh -cx 'install -m0644 debian/changelog \
30 debian/$*/usr/share/doc/$*/changelog.Debian'
31 @test ! -r changelog || \
32 sh -cx 'install -m0644 changelog debian/$*/usr/share/doc/$*/'
33 @test -r debian/$*/usr/share/doc/$*/changelog || \
34 sh -cx 'mv debian/$*/usr/share/doc/$*/changelog.Debian \
35 debian/$*/usr/share/doc/$*/changelog'
36 @test -s debian/$*/usr/share/doc/$*/changelog || \
37 sh -cx 'rm -f debian/$*/usr/share/doc/$*/changelog'
38 @gzip -9 debian/$*/usr/share/doc/$*/changelog*
39 %.deb-docs-docs:
40 @for i in `cat debian/$*.docs 2>/dev/null || :`; do \
41 if test -d $$i; then \
42 sh -cx "install -d -m0755 debian/$*/usr/share/doc/$*/$${i##*/}" && \
43 for j in $$i/*; do \
44 sh -cx "install -m0644 $$j \
45 debian/$*/usr/share/doc/$*/$${i##*/}/" || exit 1; \
46 done || exit 1; \
47 continue; \
48 fi; \
49 sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/" || exit 1; \
50 done
51 @test ! -r debian/$*.README.Debian || \
52 sh -cx 'install -m0644 debian/$*.README.Debian \
53 debian/$*/usr/share/doc/$*/README.Debian'
54 @if test -r debian/$*.NEWS.Debian; then \
55 sh -cx 'install -m0644 debian/$*.NEWS.Debian \
56 debian/$*/usr/share/doc/$*/NEWS.Debian && \
57 gzip -9 debian/$*/usr/share/doc/$*/NEWS.Debian'; \
58 fi
59 %.deb-docs-examples:
60 @rm -rf debian/$*/usr/share/doc/$*/examples
61 : debian/$*/usr/share/doc/$*/examples/
62 @test ! -r debian/$*.examples || \
63 install -d -m0755 debian/$*/usr/share/doc/$*/examples
64 @for i in `cat debian/$*.examples 2>/dev/null || :`; do \
65 sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/examples/" \
66 || exit 1; \
67 done
68 %.deb-docs: %.deb-checkdir %.deb-docs-base %.deb-docs-docs %.deb-docs-examples
69 : debian/$*/usr/share/doc/$*/ ok
70
71 %.deb-DEBIAN-base:
72 @rm -rf debian/$*/DEBIAN
73 : debian/$*/DEBIAN/
74 @install -d -m0755 debian/$*/DEBIAN
75 @for i in conffiles shlibs templates; do \
76 test ! -r debian/$*.$$i || \
77 sh -cx "install -m0644 debian/$*.$$i debian/$*/DEBIAN/$$i" \
78 || exit 1; \
79 done
80 %.deb-DEBIAN-scripts:
81 @for i in preinst prerm postinst postrm config; do \
82 test ! -r debian/$*.$$i || \
83 sh -cx "install -m0755 debian/$*.$$i debian/$*/DEBIAN/$$i" \
84 || exit 1; \
85 done
86 %.deb-DEBIAN-md5sums:
87 : debian/$*/DEBIAN/md5sums
88 @rm -f debian/$*/DEBIAN/md5sums
89 @cd debian/$* && find * -path 'DEBIAN' -prune -o \
90 -type f -exec md5sum {} >>DEBIAN/md5sums \;
91 %.deb-DEBIAN: %.deb-checkdir %.deb-DEBIAN-base %.deb-DEBIAN-scripts \
92 %.deb-DEBIAN-md5sums
93 : debian/$*/DEBIAN/ ok