summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules99
1 files changed, 71 insertions, 28 deletions
diff --git a/debian/rules b/debian/rules
index 06a661239..dbc08d4c6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -96,7 +96,8 @@ ifeq ($(PO2DEBCONF),yes)
96 # 4.1.16) depends on it), the binary-arch target will generate a 96 # 4.1.16) depends on it), the binary-arch target will generate a
97 # better version for sarge. 97 # better version for sarge.
98 echo 1 > debian/po/output 98 echo 1 > debian/po/output
99 po2debconf debian/templates.master > debian/templates 99 po2debconf debian/openssh-client.templates.master > debian/openssh-client.templates
100 po2debconf debian/openssh-server.templates.master > debian/openssh-server.templates
100 rm -f debian/po/output 101 rm -f debian/po/output
101endif 102endif
102ifeq ($(PAMSUBST),yes) 103ifeq ($(PAMSUBST),yes)
@@ -114,16 +115,23 @@ install: build
114 dh_clean -k 115 dh_clean -k
115 dh_installdirs 116 dh_installdirs
116 117
117 # Add here commands to install the package into debian/ssh. 118 $(MAKE) -C build-deb DESTDIR=`pwd`/debian/openssh-client install-nokeys
118 $(MAKE) -C build-deb DESTDIR=`pwd`/debian/ssh install-nokeys
119 119
120 rm -f debian/ssh/etc/ssh/sshd_config 120 rm -f debian/openssh-client/etc/ssh/sshd_config
121 #Temporary hack: remove /usr/share/Ssh.bin, since we have no smartcard support anyway. 121 #Temporary hack: remove /usr/share/Ssh.bin, since we have no smartcard support anyway.
122 rm -f debian/ssh/usr/share/Ssh.bin 122 rm -f debian/openssh-client/usr/share/Ssh.bin
123 123
124 install -m 755 contrib/ssh-copy-id debian/ssh/usr/bin/ssh-copy-id 124 # Split off the server.
125 install -m 644 -c contrib/ssh-copy-id.1 debian/ssh/usr/share/man/man1/ssh-copy-id.1 125 mv debian/openssh-client/usr/sbin/sshd debian/openssh-server/usr/sbin/
126 install -m 644 debian/moduli.5 debian/ssh/usr/share/man/man5/moduli.5 126 mv debian/openssh-client/usr/lib/sftp-server debian/openssh-server/usr/lib/
127 mv debian/openssh-client/usr/share/man/man5/sshd_config.5 debian/openssh-server/usr/share/man/man5/
128 mv debian/openssh-client/usr/share/man/man8/sshd.8 debian/openssh-server/usr/share/man/man8/
129 mv debian/openssh-client/usr/share/man/man8/sftp-server.8 debian/openssh-server/usr/share/man/man8/
130 rmdir debian/openssh-client/var/run/sshd
131
132 install -m 755 contrib/ssh-copy-id debian/openssh-client/usr/bin/ssh-copy-id
133 install -m 644 -c contrib/ssh-copy-id.1 debian/openssh-client/usr/share/man/man1/ssh-copy-id.1
134 install -m 644 debian/moduli.5 debian/openssh-client/usr/share/man/man5/moduli.5
127 135
128 if [ -f contrib/gnome-ssh-askpass2 ]; then \ 136 if [ -f contrib/gnome-ssh-askpass2 ]; then \
129 install -s -o root -g root -m 755 contrib/gnome-ssh-askpass2 debian/ssh-askpass-gnome/usr/lib/ssh/gnome-ssh-askpass; \ 137 install -s -o root -g root -m 755 contrib/gnome-ssh-askpass2 debian/ssh-askpass-gnome/usr/lib/ssh/gnome-ssh-askpass; \
@@ -131,16 +139,13 @@ install: build
131 install -s -o root -g root -m 755 contrib/gnome-ssh-askpass1 debian/ssh-askpass-gnome/usr/lib/ssh/gnome-ssh-askpass; \ 139 install -s -o root -g root -m 755 contrib/gnome-ssh-askpass1 debian/ssh-askpass-gnome/usr/lib/ssh/gnome-ssh-askpass; \
132 fi 140 fi
133 install -m 644 debian/gnome-ssh-askpass.1 debian/ssh-askpass-gnome/usr/share/man/man1/gnome-ssh-askpass.1 141 install -m 644 debian/gnome-ssh-askpass.1 debian/ssh-askpass-gnome/usr/share/man/man1/gnome-ssh-askpass.1
134 install -m 644 debian/ssh-askpass-gnome.desktop debian/ssh-askpass-gnome/usr/share/applications/ssh-askpass-gnome.desktop
135 uudecode -o debian/ssh-askpass-gnome/usr/share/pixmaps/ssh-askpass-gnome.png debian/ssh-askpass-gnome.png.uue 142 uudecode -o debian/ssh-askpass-gnome/usr/share/pixmaps/ssh-askpass-gnome.png debian/ssh-askpass-gnome.png.uue
136 143
137 install -m 755 debian/ssh-argv0 debian/ssh/usr/bin/ssh-argv0 144 install -m 755 debian/ssh-argv0 debian/openssh-client/usr/bin/ssh-argv0
138 install -m 644 debian/ssh-argv0.1 debian/ssh/usr/share/man/man1/ssh-argv0.1 145 install -m 644 debian/ssh-argv0.1 debian/openssh-client/usr/share/man/man1/ssh-argv0.1
139
140 install -o root -g root debian/init debian/ssh/etc/init.d/ssh
141 install -o root -g root -m 644 debian/ssh.default debian/ssh/etc/default/ssh
142 146
143 install -o root -g root -m 755 -d debian/ssh/var/run/sshd 147 install -o root -g root debian/openssh-server.init debian/openssh-server/etc/init.d/ssh
148 install -o root -g root -m 644 debian/openssh-server.default debian/openssh-server/etc/default/ssh
144 149
145 install -m 755 build-udeb/ssh debian/openssh-client-udeb/usr/bin/ssh 150 install -m 755 build-udeb/ssh debian/openssh-client-udeb/usr/bin/ssh
146 install -m 755 build-udeb/scp debian/openssh-client-udeb/usr/bin/scp 151 install -m 755 build-udeb/scp debian/openssh-client-udeb/usr/bin/scp
@@ -153,50 +158,86 @@ binary-indep: build install
153 # nothing to do 158 # nothing to do
154 159
155# Build architecture-dependent files here. 160# Build architecture-dependent files here.
156binary-arch: binary-ssh binary-ssh-askpass-gnome 161binary-arch: binary-openssh-client binary-openssh-server binary-ssh
162binary-arch: binary-ssh-askpass-gnome
157binary-arch: binary-openssh-client-udeb binary-openssh-server-udeb 163binary-arch: binary-openssh-client-udeb binary-openssh-server-udeb
158 164
159binary-ssh: DH_OPTIONS=-pssh 165binary-openssh-client: DH_OPTIONS=-popenssh-client
160binary-ssh: build install 166binary-openssh-client: build install
161 dh_testdir 167 dh_testdir
162 dh_testroot 168 dh_testroot
163ifeq ($(PO2DEBCONF),yes) 169ifeq ($(PO2DEBCONF),yes)
164 po2debconf -e utf8 debian/templates.master > debian/templates 170 po2debconf -e utf8 debian/openssh-client.templates.master > debian/openssh-client.templates
165endif 171endif
166 dh_installdebconf 172 dh_installdebconf
167 dh_installdocs OVERVIEW README 173 dh_installdocs OVERVIEW README
168 cat debian/copyright.head LICENCE > debian/ssh/usr/share/doc/ssh/copyright 174 cat debian/copyright.head LICENCE > debian/openssh-client/usr/share/doc/openssh-client/copyright
175 dh_installchangelogs ChangeLog
176 dh_strip
177 dh_compress
178 dh_fixperms
179 dh_installdeb
180 test ! -e debian/ssh/etc/ssh/ssh_prng_cmds \
181 || echo "/etc/ssh/ssh_prng_cmds" >> debian/openssh-client/DEBIAN/conffiles
182 dh_shlibdeps
183 dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER))'
184 dh_md5sums
185 dh_builddeb
186
187binary-openssh-server: DH_OPTIONS=-popenssh-server
188binary-openssh-server: build install
189 dh_testdir
190 dh_testroot
191ifeq ($(PO2DEBCONF),yes)
192 po2debconf -e utf8 debian/openssh-server.templates.master > debian/openssh-server.templates
193endif
194 dh_installdebconf
195 dh_installdocs OVERVIEW README
196 cat debian/copyright.head LICENCE > debian/openssh-server/usr/share/doc/openssh-server/copyright
169ifeq ($(PAMSUBST),yes) 197ifeq ($(PAMSUBST),yes)
170 # Clean up if we've done this already, to ensure idempotency. 198 # Clean up if we've done this already, to ensure idempotency.
171 if [ -f debian/ssh.pam.new-style ]; then \ 199 if [ -f debian/openssh-server.ssh.pam.new-style ]; then \
172 mv debian/ssh.pam.new-style debian/ssh.pam; \ 200 mv debian/openssh-server.ssh.pam.new-style debian/openssh-server.ssh.pam; \
173 fi 201 fi
174 cp -a debian/ssh.pam debian/ssh.pam.new-style 202 cp -a debian/openssh-server.ssh.pam debian/openssh-server.ssh.pam.new-style
175 sed -e "s/@include common-auth/auth required pam_unix.so/" \ 203 sed -e "s/@include common-auth/auth required pam_unix.so/" \
176 -e "s/@include common-account/account required pam_unix.so/" \ 204 -e "s/@include common-account/account required pam_unix.so/" \
177 -e "s/@include common-session/session required pam_unix.so/" \ 205 -e "s/@include common-session/session required pam_unix.so/" \
178 -e "s/@include common-password/password required pam_unix.so/" \ 206 -e "s/@include common-password/password required pam_unix.so/" \
179 debian/ssh.pam.new-style > debian/ssh.pam 207 debian/openssh-server.ssh.pam.new-style > debian/openssh-server.ssh.pam
180endif 208endif
181 dh_installpam 209 dh_installpam --name ssh # TODO: breaks woody backports
182 dh_installchangelogs ChangeLog 210 dh_installchangelogs ChangeLog
183 dh_strip 211 dh_strip
184 dh_compress 212 dh_compress
185 dh_fixperms 213 dh_fixperms
186 dh_installdeb 214 dh_installdeb
187 test ! -e debian/ssh/etc/ssh/ssh_prng_cmds \
188 || echo "/etc/ssh/ssh_prng_cmds" >> debian/ssh/DEBIAN/conffiles
189 dh_shlibdeps 215 dh_shlibdeps
190 dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER))' \ 216 dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER))' \
191 -V'pam-depends=$(PAMDEP)' 217 -V'pam-depends=$(PAMDEP)'
192 dh_md5sums 218 dh_md5sums
193 dh_builddeb 219 dh_builddeb
194 220
221binary-ssh: DH_OPTIONS=-pssh
222binary-ssh: build install
223 dh_testdir
224 dh_testroot
225 dh_installdocs
226 cat debian/copyright.head LICENCE > debian/ssh/usr/share/doc/ssh/copyright
227 dh_installchangelogs
228 dh_compress
229 dh_fixperms
230 dh_installdeb
231 dh_gencontrol
232 dh_md5sums
233 dh_builddeb
234
195binary-ssh-askpass-gnome: DH_OPTIONS=-pssh-askpass-gnome 235binary-ssh-askpass-gnome: DH_OPTIONS=-pssh-askpass-gnome
196binary-ssh-askpass-gnome: build install 236binary-ssh-askpass-gnome: build install
197 dh_testdir 237 dh_testdir
198 dh_testroot 238 dh_testroot
199 dh_installdocs 239 dh_installdocs
240 dh_installexamples debian/ssh-askpass-gnome.desktop
200 dh_installchangelogs ChangeLog 241 dh_installchangelogs ChangeLog
201 dh_strip 242 dh_strip
202 dh_compress 243 dh_compress
@@ -237,5 +278,7 @@ binary-openssh-server-udeb: build install
237binary: binary-indep binary-arch 278binary: binary-indep binary-arch
238 279
239.PHONY: build clean binary-indep binary-arch binary install 280.PHONY: build clean binary-indep binary-arch binary install
240.PHONY: build-deb build-udeb binary-ssh binary-ssh-askpass-gnome 281.PHONY: build-deb build-udeb
282.PHONY: binary-openssh-client binary-openssh-server binary-ssh
283.PHONY: binary-ssh-askpass-gnome
241.PHONY: binary-openssh-client-udeb binary-openssh-server-udeb 284.PHONY: binary-openssh-client-udeb binary-openssh-server-udeb