diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..dcf406f24 --- /dev/null +++ b/debian/rules | |||
@@ -0,0 +1,105 @@ | |||
1 | #!/usr/bin/make -f | ||
2 | |||
3 | # Uncomment this to turn on verbose mode. | ||
4 | # export DH_VERBOSE=1 | ||
5 | |||
6 | # This is the debhelper compatability version to use. | ||
7 | export DH_COMPAT=1 | ||
8 | |||
9 | # This has to be exported to make some magic below work. | ||
10 | export DH_OPTIONS | ||
11 | |||
12 | #PKG_VER = $(shell perl -e 'print <> =~ /\((.*)\)/' debian/changelog) | ||
13 | |||
14 | build: build-stamp | ||
15 | build-stamp: | ||
16 | dh_testdir | ||
17 | #Change the version string to include the Debian Version | ||
18 | if <version.h sed -e "/define/s/\"\(.*\)\"/\"\1 Debian `dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p'`\"/" >version.h.new; \ | ||
19 | then mv version.h version.h.upstream; mv version.h.new version.h; \ | ||
20 | else echo "Version number change failed"; exit 1; \ | ||
21 | fi | ||
22 | ./configure --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/lib --mandir=/usr/share/man --with-tcp-wrappers --with-xauth=/usr/bin/X11/xauth --with-default-path=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin --with-superuser-path=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin --with-pam --with-4in6 \ | ||
23 | --with-privsep-path=/var/run/sshd --without-rand-helper | ||
24 | $(MAKE) -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' CFLAGS='-O2 -g -Wall -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT -DSSHD_PAM_SERVICE=\"ssh\" -D__FILE_OFFSET_BITS=64 -DHAVE_MMAP_ANON_SHARED' \ | ||
25 | SSH_KEYSIGN='/usr/lib/ssh-keysign' | ||
26 | # Support building on Debian 3.0 (with GNOME 1.4) and later. | ||
27 | if [ -f /usr/include/libgnomeui-2.0/gnome.h ]; then \ | ||
28 | $(MAKE) -C contrib gnome-ssh-askpass2 CC='gcc -O2'; \ | ||
29 | elif [ -f /usr/include/gnome-1.0/gnome.h ]; then \ | ||
30 | $(MAKE) -C contrib gnome-ssh-askpass1 CC='gcc -O2'; \ | ||
31 | fi | ||
32 | |||
33 | touch build-stamp | ||
34 | |||
35 | clean: | ||
36 | dh_testdir | ||
37 | rm -f build-stamp | ||
38 | -$(MAKE) -i distclean | ||
39 | -$(MAKE) -C contrib clean | ||
40 | rm -f config.log | ||
41 | if [ -f version.h.upstream ]; then mv version.h.upstream version.h; \ | ||
42 | fi | ||
43 | dh_clean | ||
44 | |||
45 | install: DH_OPTIONS= | ||
46 | install: build | ||
47 | dh_testdir | ||
48 | dh_testroot | ||
49 | dh_clean -k | ||
50 | dh_installdirs | ||
51 | |||
52 | # Add here commands to install the package into debian/tmp. | ||
53 | $(MAKE) DESTDIR=`pwd`/debian/tmp install-nokeys | ||
54 | |||
55 | rm -f debian/tmp/etc/ssh/sshd_config | ||
56 | #Temporary hack: remove /usr/share/Ssh.bin, since we have no smartcard support anyway. | ||
57 | rm -f debian/tmp/usr/share/Ssh.bin | ||
58 | |||
59 | install -m 755 contrib/ssh-copy-id debian/tmp/usr/bin/ssh-copy-id | ||
60 | install -m 644 -c contrib/ssh-copy-id.1 debian/tmp/usr/share/man/man1/ssh-copy-id.1 | ||
61 | |||
62 | if [ -f contrib/gnome-ssh-askpass2 ]; then \ | ||
63 | install -s -o root -g root -m 755 contrib/gnome-ssh-askpass2 debian/ssh-askpass-gnome/usr/lib/ssh/gnome-ssh-askpass; \ | ||
64 | elif [ -f contrib/gnome-ssh-askpass1 ]; then \ | ||
65 | install -s -o root -g root -m 755 contrib/gnome-ssh-askpass1 debian/ssh-askpass-gnome/usr/lib/ssh/gnome-ssh-askpass; \ | ||
66 | fi | ||
67 | install -m 644 debian/gnome-ssh-askpass.1 debian/ssh-askpass-gnome/usr/share/man/man1/gnome-ssh-askpass.1 | ||
68 | |||
69 | install -m 755 debian/ssh-argv0 debian/tmp/usr/bin/ssh-argv0 | ||
70 | install -m 644 debian/ssh-argv0.1 debian/tmp/usr/share/man/man1/ssh-argv0.1 | ||
71 | |||
72 | install -o root -g root debian/init debian/tmp/etc/init.d/ssh | ||
73 | install -o root -g root -m 644 debian/ssh.default debian/tmp/etc/default/ssh | ||
74 | |||
75 | install -o root -g root -m 755 -d debian/tmp/var/run/sshd | ||
76 | |||
77 | # Build architecture-independent files here. | ||
78 | binary-indep: build install | ||
79 | # nothing to do | ||
80 | |||
81 | # Build architecture-dependent files here. | ||
82 | binary-arch: build install | ||
83 | dh_testdir | ||
84 | dh_testroot | ||
85 | dh_installdebconf | ||
86 | dh_installdocs OVERVIEW README | ||
87 | cat debian/copyright.head LICENCE > debian/tmp/usr/share/doc/ssh/copyright | ||
88 | nroff RFC.nroff > debian/tmp/usr/share/doc/ssh/RFC | ||
89 | gzip -9 debian/tmp/usr/share/doc/ssh/RFC | ||
90 | rm -rf debian/tmp/usr/share/doc/ssh/RFC.nroff.gz | ||
91 | dh_installpam | ||
92 | dh_installchangelogs ChangeLog | ||
93 | dh_strip | ||
94 | dh_compress | ||
95 | dh_fixperms | ||
96 | dh_installdeb | ||
97 | test ! -e debian/tmp/etc/ssh/ssh_prng_cmds \ | ||
98 | || echo "/etc/ssh/ssh_prng_cmds" >> debian/tmp/DEBIAN/conffiles | ||
99 | dh_shlibdeps | ||
100 | dh_gencontrol | ||
101 | dh_md5sums | ||
102 | dh_builddeb | ||
103 | |||
104 | binary: binary-indep binary-arch | ||
105 | .PHONY: build clean binary-indep binary-arch binary install | ||