diff options
author | Colin Watson <cjwatson@debian.org> | 2004-05-11 21:27:20 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2004-05-11 21:27:20 +0000 |
commit | 2d12cf754ee3eee72b2066d441f0adcf695cec72 (patch) | |
tree | 4e2f0a775b8c2b1b5495b14d2cfd2aa9eb1500d9 /debian/rules | |
parent | d4cb5bf985dd5dc02dd766d9093882f2afffeb08 (diff) |
Add openssh-client-udeb and openssh-server-udeb binary packages for use in
debian-installer. They still need libnss_files to be supplied in udeb form
by glibc.
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 95 |
1 files changed, 72 insertions, 23 deletions
diff --git a/debian/rules b/debian/rules index d34cf406d..54c6c1482 100755 --- a/debian/rules +++ b/debian/rules | |||
@@ -3,8 +3,8 @@ | |||
3 | # Uncomment this to turn on verbose mode. | 3 | # Uncomment this to turn on verbose mode. |
4 | # export DH_VERBOSE=1 | 4 | # export DH_VERBOSE=1 |
5 | 5 | ||
6 | # This is the debhelper compatability version to use. | 6 | # This is the debhelper compatibility version to use. |
7 | export DH_COMPAT=1 | 7 | export DH_COMPAT=2 |
8 | 8 | ||
9 | # This has to be exported to make some magic below work. | 9 | # This has to be exported to make some magic below work. |
10 | export DH_OPTIONS | 10 | export DH_OPTIONS |
@@ -15,7 +15,11 @@ else | |||
15 | OPTFLAGS := -O0 | 15 | OPTFLAGS := -O0 |
16 | endif | 16 | endif |
17 | 17 | ||
18 | #PKG_VER = $(shell perl -e 'print <> =~ /\((.*)\)/' debian/changelog) | 18 | VERSION := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 | sed 's/.*://') |
19 | DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) | ||
20 | |||
21 | CLIENT_UDEB := openssh-client-udeb_$(VERSION)_$(DEB_HOST_ARCH).udeb | ||
22 | SERVER_UDEB := openssh-server-udeb_$(VERSION)_$(DEB_HOST_ARCH).udeb | ||
19 | 23 | ||
20 | ifeq (,$(wildcard /usr/bin/po2debconf)) | 24 | ifeq (,$(wildcard /usr/bin/po2debconf)) |
21 | PO2DEBCONF := no | 25 | PO2DEBCONF := no |
@@ -42,7 +46,9 @@ endif | |||
42 | # Change the version string to include the Debian version | 46 | # Change the version string to include the Debian version |
43 | SSH_VERSION := $(shell sed -e '/define/!d; s/.*\"\(.*\)\".*/\1/; q' <version.h) Debian $(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p') | 47 | SSH_VERSION := $(shell sed -e '/define/!d; s/.*\"\(.*\)\".*/\1/; q' <version.h) Debian $(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p') |
44 | 48 | ||
45 | build: build-deb-stamp | 49 | build: build-deb build-udeb |
50 | |||
51 | build-deb: build-deb-stamp | ||
46 | build-deb-stamp: | 52 | build-deb-stamp: |
47 | dh_testdir | 53 | dh_testdir |
48 | mkdir -p build-deb | 54 | mkdir -p build-deb |
@@ -59,10 +65,18 @@ build-deb-stamp: | |||
59 | 65 | ||
60 | touch build-deb-stamp | 66 | touch build-deb-stamp |
61 | 67 | ||
68 | build-udeb: build-udeb-stamp | ||
69 | build-udeb-stamp: | ||
70 | dh_testdir | ||
71 | mkdir -p build-udeb | ||
72 | cd build-udeb && ../configure --prefix=/usr --sysconfdir=/etc/ssh --without-xauth --with-default-path=/usr/local/bin:/bin:/usr/bin --with-superuser-path=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin --with-4in6 --with-privsep-path=/var/run/sshd --without-rand-helper | ||
73 | $(MAKE) -C build-udeb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' CFLAGS='-Os -g -Wall -DSSH_VERSION="\"$(SSH_VERSION)\""' SSH_KEYSIGN='/usr/lib/ssh-keysign' ssh sshd | ||
74 | touch build-udeb-stamp | ||
75 | |||
62 | clean: | 76 | clean: |
63 | dh_testdir | 77 | dh_testdir |
64 | rm -f build-deb-stamp | 78 | rm -f build-deb-stamp build-udeb-stamp |
65 | rm -rf build-deb | 79 | rm -rf build-deb build-udeb |
66 | -$(MAKE) -C contrib clean | 80 | -$(MAKE) -C contrib clean |
67 | rm -f config.log | 81 | rm -f config.log |
68 | ifeq ($(PO2DEBCONF),yes) | 82 | ifeq ($(PO2DEBCONF),yes) |
@@ -84,23 +98,23 @@ endif | |||
84 | rm -f debian/ssh-askpass-gnome.png | 98 | rm -f debian/ssh-askpass-gnome.png |
85 | dh_clean | 99 | dh_clean |
86 | 100 | ||
87 | install: DH_OPTIONS= | 101 | install: DH_OPTIONS=-a |
88 | install: build | 102 | install: build |
89 | dh_testdir | 103 | dh_testdir |
90 | dh_testroot | 104 | dh_testroot |
91 | dh_clean -k | 105 | dh_clean -k |
92 | dh_installdirs | 106 | dh_installdirs |
93 | 107 | ||
94 | # Add here commands to install the package into debian/tmp. | 108 | # Add here commands to install the package into debian/ssh. |
95 | $(MAKE) -C build-deb DESTDIR=`pwd`/debian/tmp install-nokeys | 109 | $(MAKE) -C build-deb DESTDIR=`pwd`/debian/ssh install-nokeys |
96 | 110 | ||
97 | rm -f debian/tmp/etc/ssh/sshd_config | 111 | rm -f debian/ssh/etc/ssh/sshd_config |
98 | #Temporary hack: remove /usr/share/Ssh.bin, since we have no smartcard support anyway. | 112 | #Temporary hack: remove /usr/share/Ssh.bin, since we have no smartcard support anyway. |
99 | rm -f debian/tmp/usr/share/Ssh.bin | 113 | rm -f debian/ssh/usr/share/Ssh.bin |
100 | 114 | ||
101 | install -m 755 contrib/ssh-copy-id debian/tmp/usr/bin/ssh-copy-id | 115 | install -m 755 contrib/ssh-copy-id debian/ssh/usr/bin/ssh-copy-id |
102 | install -m 644 -c contrib/ssh-copy-id.1 debian/tmp/usr/share/man/man1/ssh-copy-id.1 | 116 | install -m 644 -c contrib/ssh-copy-id.1 debian/ssh/usr/share/man/man1/ssh-copy-id.1 |
103 | install -m 644 debian/moduli.5 debian/tmp/usr/share/man/man5/moduli.5 | 117 | install -m 644 debian/moduli.5 debian/ssh/usr/share/man/man5/moduli.5 |
104 | 118 | ||
105 | if [ -f contrib/gnome-ssh-askpass2 ]; then \ | 119 | if [ -f contrib/gnome-ssh-askpass2 ]; then \ |
106 | install -s -o root -g root -m 755 contrib/gnome-ssh-askpass2 debian/ssh-askpass-gnome/usr/lib/ssh/gnome-ssh-askpass; \ | 120 | install -s -o root -g root -m 755 contrib/gnome-ssh-askpass2 debian/ssh-askpass-gnome/usr/lib/ssh/gnome-ssh-askpass; \ |
@@ -111,20 +125,26 @@ install: build | |||
111 | install -m 644 debian/ssh-askpass-gnome.desktop debian/ssh-askpass-gnome/usr/share/applications/ssh-askpass-gnome.desktop | 125 | install -m 644 debian/ssh-askpass-gnome.desktop debian/ssh-askpass-gnome/usr/share/applications/ssh-askpass-gnome.desktop |
112 | uudecode -o debian/ssh-askpass-gnome/usr/share/pixmaps/ssh-askpass-gnome.png debian/ssh-askpass-gnome.png.uue | 126 | uudecode -o debian/ssh-askpass-gnome/usr/share/pixmaps/ssh-askpass-gnome.png debian/ssh-askpass-gnome.png.uue |
113 | 127 | ||
114 | install -m 755 debian/ssh-argv0 debian/tmp/usr/bin/ssh-argv0 | 128 | install -m 755 debian/ssh-argv0 debian/ssh/usr/bin/ssh-argv0 |
115 | install -m 644 debian/ssh-argv0.1 debian/tmp/usr/share/man/man1/ssh-argv0.1 | 129 | install -m 644 debian/ssh-argv0.1 debian/ssh/usr/share/man/man1/ssh-argv0.1 |
130 | |||
131 | install -o root -g root debian/init debian/ssh/etc/init.d/ssh | ||
132 | install -o root -g root -m 644 debian/ssh.default debian/ssh/etc/default/ssh | ||
116 | 133 | ||
117 | install -o root -g root debian/init debian/tmp/etc/init.d/ssh | 134 | install -o root -g root -m 755 -d debian/ssh/var/run/sshd |
118 | install -o root -g root -m 644 debian/ssh.default debian/tmp/etc/default/ssh | ||
119 | 135 | ||
120 | install -o root -g root -m 755 -d debian/tmp/var/run/sshd | 136 | install -m 755 build-udeb/ssh debian/openssh-client-udeb/usr/bin/ssh |
137 | install -m 755 build-udeb/sshd debian/openssh-server-udeb/usr/sbin/sshd | ||
121 | 138 | ||
122 | # Build architecture-independent files here. | 139 | # Build architecture-independent files here. |
123 | binary-indep: build install | 140 | binary-indep: build install |
124 | # nothing to do | 141 | # nothing to do |
125 | 142 | ||
126 | # Build architecture-dependent files here. | 143 | # Build architecture-dependent files here. |
127 | binary-arch: build install | 144 | binary-arch: binary-ssh binary-openssh-client-udeb binary-openssh-server-udeb |
145 | |||
146 | binary-ssh: DH_OPTIONS=-pssh | ||
147 | binary-ssh: build install | ||
128 | dh_testdir | 148 | dh_testdir |
129 | dh_testroot | 149 | dh_testroot |
130 | ifeq ($(PO2DEBCONF),yes) | 150 | ifeq ($(PO2DEBCONF),yes) |
@@ -132,7 +152,7 @@ ifeq ($(PO2DEBCONF),yes) | |||
132 | endif | 152 | endif |
133 | dh_installdebconf | 153 | dh_installdebconf |
134 | dh_installdocs OVERVIEW README | 154 | dh_installdocs OVERVIEW README |
135 | cat debian/copyright.head LICENCE > debian/tmp/usr/share/doc/ssh/copyright | 155 | cat debian/copyright.head LICENCE > debian/ssh/usr/share/doc/ssh/copyright |
136 | ifeq ($(PAMSUBST),yes) | 156 | ifeq ($(PAMSUBST),yes) |
137 | # Clean up if we've done this already, to ensure idempotency. | 157 | # Clean up if we've done this already, to ensure idempotency. |
138 | if [ -f debian/ssh.pam.new-style ]; then \ | 158 | if [ -f debian/ssh.pam.new-style ]; then \ |
@@ -151,13 +171,42 @@ endif | |||
151 | dh_compress | 171 | dh_compress |
152 | dh_fixperms | 172 | dh_fixperms |
153 | dh_installdeb | 173 | dh_installdeb |
154 | test ! -e debian/tmp/etc/ssh/ssh_prng_cmds \ | 174 | test ! -e debian/ssh/etc/ssh/ssh_prng_cmds \ |
155 | || echo "/etc/ssh/ssh_prng_cmds" >> debian/tmp/DEBIAN/conffiles | 175 | || echo "/etc/ssh/ssh_prng_cmds" >> debian/ssh/DEBIAN/conffiles |
156 | dh_shlibdeps | 176 | dh_shlibdeps |
157 | dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER))' \ | 177 | dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER))' \ |
158 | -V'pam-depends=$(PAMDEP)' | 178 | -V'pam-depends=$(PAMDEP)' |
159 | dh_md5sums | 179 | dh_md5sums |
160 | dh_builddeb | 180 | dh_builddeb |
161 | 181 | ||
182 | binary-openssh-client-udeb: DH_OPTIONS=-popenssh-client-udeb | ||
183 | binary-openssh-client-udeb: build install | ||
184 | dh_testdir | ||
185 | dh_testroot | ||
186 | dh_strip | ||
187 | dh_compress | ||
188 | dh_fixperms | ||
189 | dh_installdeb | ||
190 | dh_shlibdeps | ||
191 | dh_gencontrol -- -fdebian/files~ | ||
192 | dpkg-distaddfile $(CLIENT_UDEB) debian-installer optional | ||
193 | dh_builddeb --filename=$(CLIENT_UDEB) | ||
194 | |||
195 | binary-openssh-server-udeb: DH_OPTIONS=-popenssh-server-udeb | ||
196 | binary-openssh-server-udeb: build install | ||
197 | dh_testdir | ||
198 | dh_testroot | ||
199 | dh_strip | ||
200 | dh_compress | ||
201 | dh_fixperms | ||
202 | dh_installdeb | ||
203 | dh_shlibdeps | ||
204 | dh_gencontrol -- -fdebian/files~ | ||
205 | dpkg-distaddfile $(SERVER_UDEB) debian-installer optional | ||
206 | dh_builddeb --filename=$(SERVER_UDEB) | ||
207 | |||
162 | binary: binary-indep binary-arch | 208 | binary: binary-indep binary-arch |
209 | |||
163 | .PHONY: build clean binary-indep binary-arch binary install | 210 | .PHONY: build clean binary-indep binary-arch binary install |
211 | .PHONY: build-deb build-udeb binary-ssh | ||
212 | .PHONY: binary-openssh-client-udeb binary-openssh-server-udeb | ||