summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2008-01-11 00:09:20 +0000
committerColin Watson <cjwatson@debian.org>2008-01-11 00:09:20 +0000
commita508edc2333f9b001dabd65368067a8cc05d3faa (patch)
tree6dec8710161eb36a91affbc1f4170291d8ef57dd /debian/rules
parent7663ed6227ec01f2fc33e7adcb597201f006b62e (diff)
* Drop source-compatibility with Debian 3.0:
- Remove support for building with GNOME 1. This allows simplification of our GNOME build-dependencies (see #460136). - Remove hacks to support the old PAM configuration scheme. - Remove compatibility for building without po-debconf. * Build-depend on libgtk2.0-dev rather than libgnomeui-dev. As far as I can see, the GTK2 version of ssh-askpass-gnome has never required libgnomeui-dev.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules73
1 files changed, 5 insertions, 68 deletions
diff --git a/debian/rules b/debian/rules
index cfd942bdd..7b6138d8d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -47,28 +47,6 @@ ifneq (,$(findstring :$(DEB_HOST_ARCH_OS):,:linux:knetbsd:))
47 endif 47 endif
48endif 48endif
49 49
50ifeq (,$(wildcard /usr/bin/po2debconf))
51PO2DEBCONF := no
52MINDEBCONFVER := 0.5
53else
54PO2DEBCONF := yes
55MINDEBCONFVER := 1.2.0
56endif
57
58# We need a new libpam-runtime for sane PAM handling
59# (http://lists.debian.org/debian-devel-announce-0308/msg00012.html).
60# Unfortunately it's hard to detect during the build whether this is
61# appropriate, so woody-compatibility is a pain. I've had to punt and go for
62# a DEB_BUILD_SSH_WOODY environment variable. We can remove this hack once
63# we no longer care about woody.
64ifeq ($(DEB_BUILD_SSH_WOODY),)
65PAMSUBST := no
66PAMDEP := libpam-runtime (>= 0.76-14)
67else
68PAMSUBST := yes
69PAMDEP := libpam-runtime
70endif
71
72# Change the version string to include the Debian version 50# Change the version string to include the Debian version
73SSH_EXTRAVERSION := Debian-$(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p' | sed -e 's/[^-]*-//') 51SSH_EXTRAVERSION := Debian-$(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p' | sed -e 's/[^-]*-//')
74 52
@@ -146,12 +124,7 @@ endif
146 perl -pi -e 's,.*#define USE_BTMP .*,/* #undef USE_BTMP */,' build-deb/config.h 124 perl -pi -e 's,.*#define USE_BTMP .*,/* #undef USE_BTMP */,' build-deb/config.h
147 125
148 $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' 126 $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass'
149 # Support building on Debian 3.0 (with GNOME 1.4) and later. 127 $(MAKE) -C contrib gnome-ssh-askpass2 CC='gcc $(OPTFLAGS) -g -Wall'
150 if [ -f /usr/include/libgnomeui-2.0/gnome.h ]; then \
151 $(MAKE) -C contrib gnome-ssh-askpass2 CC='gcc $(OPTFLAGS) -g -Wall'; \
152 elif [ -f /usr/include/gnome-1.0/gnome.h ]; then \
153 $(MAKE) -C contrib gnome-ssh-askpass1 CC='gcc $(OPTFLAGS) -g -Wall'; \
154 fi
155 128
156 touch build-deb-stamp 129 touch build-deb-stamp
157 130
@@ -174,22 +147,6 @@ clean:
174 rm -rf build-deb build-udeb 147 rm -rf build-deb build-udeb
175 $(MAKE) -C contrib clean 148 $(MAKE) -C contrib clean
176 rm -f config.log 149 rm -f config.log
177ifeq ($(PO2DEBCONF),yes)
178 # Hack for woody compatibility. This makes sure that the
179 # debian/templates file shipped in the source package doesn't
180 # specify encodings, which woody's debconf can't handle. If building
181 # on a system with po-debconf installed (conveniently debhelper (>=
182 # 4.1.16) depends on it), the binary-arch target will generate a
183 # better version for sarge.
184 echo '1 popular' > debian/po/output
185 po2debconf debian/openssh-server.templates.master > debian/openssh-server.templates
186 rm -f debian/po/output
187endif
188ifeq ($(PAMSUBST),yes)
189 if [ -f debian/ssh.pam.new-style ]; then \
190 mv debian/ssh.pam.new-style debian/ssh.pam; \
191 fi
192endif
193 rm -f debian/ssh-askpass-gnome.png 150 rm -f debian/ssh-askpass-gnome.png
194 dh_clean 151 dh_clean
195 152
@@ -219,11 +176,7 @@ install: build
219 install -m 644 -c contrib/ssh-copy-id.1 debian/openssh-client/usr/share/man/man1/ssh-copy-id.1 176 install -m 644 -c contrib/ssh-copy-id.1 debian/openssh-client/usr/share/man/man1/ssh-copy-id.1
220 install -m 644 debian/moduli.5 debian/openssh-client/usr/share/man/man5/moduli.5 177 install -m 644 debian/moduli.5 debian/openssh-client/usr/share/man/man5/moduli.5
221 178
222 if [ -f contrib/gnome-ssh-askpass2 ]; then \ 179 install -s -o root -g root -m 755 contrib/gnome-ssh-askpass2 debian/ssh-askpass-gnome/usr/lib/openssh/gnome-ssh-askpass
223 install -s -o root -g root -m 755 contrib/gnome-ssh-askpass2 debian/ssh-askpass-gnome/usr/lib/openssh/gnome-ssh-askpass; \
224 elif [ -f contrib/gnome-ssh-askpass1 ]; then \
225 install -s -o root -g root -m 755 contrib/gnome-ssh-askpass1 debian/ssh-askpass-gnome/usr/lib/openssh/gnome-ssh-askpass; \
226 fi
227 install -m 644 debian/gnome-ssh-askpass.1 debian/ssh-askpass-gnome/usr/share/man/man1/gnome-ssh-askpass.1 180 install -m 644 debian/gnome-ssh-askpass.1 debian/ssh-askpass-gnome/usr/share/man/man1/gnome-ssh-askpass.1
228 uudecode -o debian/ssh-askpass-gnome/usr/share/pixmaps/ssh-askpass-gnome.png debian/ssh-askpass-gnome.png.uue 181 uudecode -o debian/ssh-askpass-gnome/usr/share/pixmaps/ssh-askpass-gnome.png debian/ssh-askpass-gnome.png.uue
229 182
@@ -276,7 +229,7 @@ binary-openssh-client: build install
276 ETC_SSH_SSH_CONFIG debian/openssh-client/etc/ssh/ssh_config \ 229 ETC_SSH_SSH_CONFIG debian/openssh-client/etc/ssh/ssh_config \
277 debian/openssh-client/DEBIAN/preinst 230 debian/openssh-client/DEBIAN/preinst
278 dh_shlibdeps 231 dh_shlibdeps
279 dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER)) | debconf-2.0' 232 dh_gencontrol
280 dh_md5sums 233 dh_md5sums
281 dh_builddeb 234 dh_builddeb
282 235
@@ -284,26 +237,11 @@ binary-openssh-server: DH_OPTIONS=-popenssh-server
284binary-openssh-server: build install 237binary-openssh-server: build install
285 dh_testdir 238 dh_testdir
286 dh_testroot 239 dh_testroot
287ifeq ($(PO2DEBCONF),yes)
288 po2debconf -e utf8 debian/openssh-server.templates.master > debian/openssh-server.templates
289endif
290 dh_installdebconf 240 dh_installdebconf
291 dh_installdocs 241 dh_installdocs
292 mv debian/openssh-server/usr/share/doc/openssh-server debian/openssh-server/usr/share/doc/openssh-client 242 mv debian/openssh-server/usr/share/doc/openssh-server debian/openssh-server/usr/share/doc/openssh-client
293 rm -f debian/openssh-server/usr/share/doc/openssh-client/copyright 243 rm -f debian/openssh-server/usr/share/doc/openssh-client/copyright
294ifeq ($(PAMSUBST),yes) 244 dh_installpam --name ssh
295 # Clean up if we've done this already, to ensure idempotency.
296 if [ -f debian/openssh-server.ssh.pam.new-style ]; then \
297 mv debian/openssh-server.ssh.pam.new-style debian/openssh-server.ssh.pam; \
298 fi
299 cp -a debian/openssh-server.ssh.pam debian/openssh-server.ssh.pam.new-style
300 sed -e "s/@include common-auth/auth required pam_unix.so/" \
301 -e "s/@include common-account/account required pam_unix.so/" \
302 -e "s/@include common-session/session required pam_unix.so/" \
303 -e "s/@include common-password/password required pam_unix.so/" \
304 debian/openssh-server.ssh.pam.new-style > debian/openssh-server.ssh.pam
305endif
306 dh_installpam --name ssh # TODO: breaks woody backports
307 dh_link 245 dh_link
308 dh_strip 246 dh_strip
309 dh_compress 247 dh_compress
@@ -315,8 +253,7 @@ endif
315 ETC_PAM_D_SSH debian/openssh-server/etc/pam.d/ssh \ 253 ETC_PAM_D_SSH debian/openssh-server/etc/pam.d/ssh \
316 debian/openssh-server/DEBIAN/preinst 254 debian/openssh-server/DEBIAN/preinst
317 dh_shlibdeps 255 dh_shlibdeps
318 dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER)) | debconf-2.0' \ 256 dh_gencontrol
319 -V'pam-depends=$(PAMDEP)'
320 dh_md5sums 257 dh_md5sums
321 dh_builddeb 258 dh_builddeb
322 259