diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..365872d3d --- /dev/null +++ b/debian/rules | |||
@@ -0,0 +1,106 @@ | |||
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 | DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) | ||
15 | |||
16 | build: build-stamp | ||
17 | build-stamp: | ||
18 | dh_testdir | ||
19 | #Change the version string to include the Debian Version | ||
20 | if <version.h sed -e "/define/s/\"\(.*\)\"/\"\1 Debian `dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p'`\"/" >version.h.new; \ | ||
21 | then mv version.h version.h.upstream; mv version.h.new version.h; \ | ||
22 | else echo "Version number change failed"; exit 1; \ | ||
23 | fi | ||
24 | ./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-pam --with-4in6 --with-ipv4-default \ | ||
25 | --with-privsep-path=/var/run/sshd --without-rand-helper | ||
26 | $(MAKE) -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' CFLAGS='-O2 -Wall -DLOGIN_PROGRAM=\"/bin/login\" -DSSHD_PAM_SERVICE=\"ssh\" -D__FILE_OFFSET_BITS=64 -DHAVE_MMAP_ANON_SHARED' \ | ||
27 | SSH_KEYSIGN='/usr/lib/ssh-keysign' | ||
28 | gcc -O2 `gnome-config --cflags gnome gnomeui` \ | ||
29 | contrib/gnome-ssh-askpass.c -o contrib/gnome-ssh-askpass \ | ||
30 | `gnome-config --libs gnome gnomeui` | ||
31 | |||
32 | touch build-stamp | ||
33 | |||
34 | clean: | ||
35 | dh_testdir | ||
36 | rm -f build-stamp | ||
37 | -$(MAKE) -i distclean | ||
38 | rm -f contrib/gnome-ssh-askpass config.log | ||
39 | if [ -f version.h.upstream ]; then mv version.h.upstream version.h; \ | ||
40 | fi | ||
41 | dh_clean | ||
42 | |||
43 | install: DH_OPTIONS= | ||
44 | install: build | ||
45 | dh_testdir | ||
46 | dh_testroot | ||
47 | dh_clean -k | ||
48 | dh_installdirs | ||
49 | |||
50 | # Add here commands to install the package into debian/tmp. | ||
51 | $(MAKE) DESTDIR=`pwd`/debian/tmp install | ||
52 | |||
53 | rm -f debian/tmp/etc/ssh/ssh_host_*key* | ||
54 | rm -f debian/tmp/etc/ssh/sshd_config | ||
55 | #Temporary hack: remove /usr/share/Ssh.bin, since we have no smartcard support anyway. | ||
56 | rm -f debian/tmp/usr/share/Ssh.bin | ||
57 | |||
58 | install -m 755 contrib/ssh-copy-id debian/tmp/usr/bin/ssh-copy-id | ||
59 | install -m644 -c contrib/ssh-copy-id.1 debian/tmp/usr/share/man/man1/ssh-copy-id.1 | ||
60 | |||
61 | install -s -o root -g root -m 755 contrib/gnome-ssh-askpass debian/ssh-askpass-gnome/usr/lib/ssh/gnome-ssh-askpass | ||
62 | |||
63 | install -o root -g root debian/init debian/tmp/etc/init.d/ssh | ||
64 | |||
65 | install -o root -g root -m 755 -d debian/tmp/var/run/sshd | ||
66 | |||
67 | dh_movefiles | ||
68 | |||
69 | # Build architecture-independent files here. | ||
70 | binary-indep: build install | ||
71 | # nothing to do | ||
72 | |||
73 | # Build architecture-dependent files here. | ||
74 | binary-arch: build install | ||
75 | dh_testdir | ||
76 | dh_testroot | ||
77 | dh_installdebconf | ||
78 | dh_installdocs OVERVIEW README | ||
79 | cat debian/copyright.head LICENCE > debian/tmp/usr/share/doc/ssh/copyright | ||
80 | dh_installexamples | ||
81 | dh_installmenu | ||
82 | nroff RFC.nroff > debian/tmp/usr/share/doc/ssh/RFC | ||
83 | gzip -9 debian/tmp/usr/share/doc/ssh/RFC | ||
84 | rm -rf debian/tmp/usr/share/doc/ssh/RFC.nroff.gz | ||
85 | dh_installpam | ||
86 | dh_installcron | ||
87 | dh_installchangelogs ChangeLog | ||
88 | dh_strip | ||
89 | dh_link | ||
90 | dh_compress | ||
91 | dh_fixperms | ||
92 | dh_installdeb | ||
93 | test ! -e debian/tmp/etc/ssh/ssh_prng_cmds \ | ||
94 | || echo "/etc/ssh/ssh_prng_cmds" >> debian/tmp/DEBIAN/conffiles | ||
95 | dh_shlibdeps | ||
96 | ifeq ($(DEB_HOST_ARCH),hurd-i386) | ||
97 | echo "pam-depend=" >> debian/substvars | ||
98 | else | ||
99 | echo "pam-depend=libpam-modules (>= 0.72-9), " >> debian/substvars | ||
100 | endif | ||
101 | dh_gencontrol | ||
102 | dh_md5sums | ||
103 | dh_builddeb | ||
104 | |||
105 | binary: binary-indep binary-arch | ||
106 | .PHONY: build clean binary-indep binary-arch binary install | ||