annotate debian/rules @ 355:c61bd8f9e32d debug-unrandom

make sure that random number generator is correct endian
author Matt Johnston <matt@ucc.asn.au>
date Wed, 09 Aug 2006 16:45:05 +0000
parents 9089929fb2b7
children 8c2d2edadf2a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
1 #!/usr/bin/make -f
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
2
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
3 #export DH_OPTIONS
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
4 DEB_HOST_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
5 DEB_BUILD_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
7 STRIP =strip
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
8 ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
9 STRIP =: nostrip
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
10 endif
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
11
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
12 CFLAGS =-Wall -g
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
13 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
14 CFLAGS +=-O0
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
15 else
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
16 CFLAGS +=-O2
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
17 endif
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
18
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
19 CONFFLAGS =
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
20 CC =gcc
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
21 ifneq (,$(findstring diet,$(DEB_BUILD_OPTIONS)))
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
22 CONFFLAGS =--disable-zlib
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
23 CC =diet -v -Os gcc -nostdinc
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
24 endif
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
25
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
26 DIR =$(shell pwd)/debian/dropbear
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
27
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
28 patch: deb-checkdir patch-stamp
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
29 patch-stamp:
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
30 for i in `ls -1 debian/diff/*.diff || :`; do \
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
31 patch -p0 <$$i || exit 1; \
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
32 done
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
33 touch patch-stamp
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
34
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
35 config.status: patch-stamp configure
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
36 CC='$(CC)' \
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
37 CFLAGS='$(CFLAGS)'' -DSFTPSERVER_PATH="\"/usr/lib/sftp-server\""' \
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
38 ./configure --host='$(DEB_HOST_GNU_TYPE)' \
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
39 --build='$(DEB_BUILD_GNU_TYPE)' --prefix=/usr \
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
40 --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
41 $(CONFFLAGS)
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
42
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
43 build: deb-checkdir build-stamp
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
44 build-stamp: config.status
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
45 $(MAKE) CC='$(CC)' LD='$(CC)'
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
46 touch build-stamp
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
47
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
48 clean: deb-checkdir deb-checkuid
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
49 -$(MAKE) distclean
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
50 test ! -e patch-stamp || \
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
51 for i in `ls -1r debian/diff/*.diff || :`; do \
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
52 patch -p0 -R <$$i; \
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
53 done
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
54 rm -f patch-stamp build-stamp config.log config.status
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
55 rm -rf '$(DIR)'
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
56 rm -f debian/files debian/substvars debian/copyright changelog
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
57
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
58 install: deb-checkdir deb-checkuid build-stamp
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
59 rm -rf '$(DIR)'
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
60 install -d -m0755 '$(DIR)'/etc/dropbear
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
61 # programs
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
62 install -d -m0755 '$(DIR)'/usr/sbin
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
63 install -m0755 dropbear '$(DIR)'/usr/sbin/dropbear
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
64 install -d -m0755 '$(DIR)'/usr/bin
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
65 install -m0755 dbclient '$(DIR)'/usr/bin/dbclient
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
66 install -m0755 dropbearkey '$(DIR)'/usr/bin/dropbearkey
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
67 install -d -m0755 '$(DIR)'/usr/lib/dropbear
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
68 install -m0755 dropbearconvert \
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
69 '$(DIR)'/usr/lib/dropbear/dropbearconvert
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
70 $(STRIP) -R .comment -R .note '$(DIR)'/usr/sbin/* \
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
71 '$(DIR)'/usr/bin/* '$(DIR)'/usr/lib/dropbear/*
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
72 # init and run scripts
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
73 install -d -m0755 '$(DIR)'/etc/init.d
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
74 install -m0755 debian/dropbear.init '$(DIR)'/etc/init.d/dropbear
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
75 install -m0755 debian/service/run '$(DIR)'/etc/dropbear/run
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
76 install -d -m0755 '$(DIR)'/etc/dropbear/log
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
77 install -m0755 debian/service/log '$(DIR)'/etc/dropbear/log/run
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
78 ln -s /var/log/dropbear '$(DIR)'/etc/dropbear/log/main
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
79 ln -s /var/run/dropbear '$(DIR)'/etc/dropbear/supervise
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
80 ln -s /var/run/dropbear.log '$(DIR)'/etc/dropbear/log/supervise
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
81 # man pages
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
82 install -d -m0755 '$(DIR)'/usr/share/man/man8
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
83 for i in dropbear.8 dropbearkey.8; do \
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
84 install -m644 $$i '$(DIR)'/usr/share/man/man8/ || exit 1; \
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
85 done
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
86 gzip -9 '$(DIR)'/usr/share/man/man8/*.8
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
87 install -d -m0755 '$(DIR)'/usr/share/man/man1
220
9089929fb2b7 * preparing for 0.46 release
Matt Johnston <matt@ucc.asn.au>
parents: 219
diff changeset
88 install -m644 dbclient.1 '$(DIR)'/usr/share/man/man1/
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
89 gzip -9 '$(DIR)'/usr/share/man/man1/*.1
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
90 # copyright, changelog
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
91 cat debian/copyright.in LICENSE >debian/copyright
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
92 test -r changelog || ln -s CHANGES changelog
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
93
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
94 binary-indep:
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
95
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
96 binary-arch: install dropbear.deb
180
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
97 test '$(CC)' != 'gcc' || \
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
98 dpkg-shlibdeps '$(DIR)'/usr/sbin/* '$(DIR)'/usr/bin/* \
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
99 '$(DIR)'/usr/lib/dropbear/*
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
100 dpkg-gencontrol -isp -pdropbear -P'$(DIR)'
743fce568f49 Merge in Debian package changes from 0.45-3, grab the dbclient manpage
Matt Johnston <matt@ucc.asn.au>
parents: 76
diff changeset
101 dpkg -b '$(DIR)' ..
70
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
102
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
103 binary: binary-arch binary-indep
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
104
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
105 .PHONY: patch build clean install binary-indep binary-arch binary
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
106
b0316ce64e4b Merging in the changes from 0.41-0.43 main Dropbear tree
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
107 include debian/implicit