summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2003-11-16 15:34:31 +0000
committerColin Watson <cjwatson@debian.org>2003-11-16 15:34:31 +0000
commit96df0c2c1853500dbfe431ff55aebbc870d55acf (patch)
tree1d703ac5751c5a4a7648c1ef168a8188ab951ff2 /debian/rules
parent208bd557aa7d9945a21e9a328f21947550a361ce (diff)
parent39959254dc9a1e2e220030306e1943beab2589e8 (diff)
Merge from branch-V_3_6_1_P2-7-unstable:
cvs up -jV_3_6_1_P2-9 -jV_3_6_1_P2-10
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules34
1 files changed, 33 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index 640f6d3c2..b3ff3c0f5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -25,6 +25,20 @@ PO2DEBCONF := yes
25MINDEBCONFVER := 1.2.0 25MINDEBCONFVER := 1.2.0
26endif 26endif
27 27
28# We need a new libpam-runtime for sane PAM handling
29# (http://lists.debian.org/debian-devel-announce-0308/msg00012.html).
30# Unfortunately it's hard to detect during the build whether this is
31# appropriate, so woody-compatibility is a pain. I've had to punt and go for
32# a DEB_BUILD_SSH_WOODY environment variable. We can remove this hack once
33# we no longer care about woody.
34ifeq ($(DEB_BUILD_SSH_WOODY),)
35PAMSUBST := no
36PAMDEP := libpam-runtime (>= 0.76-14)
37else
38PAMSUBST := yes
39PAMDEP := libpam-runtime
40endif
41
28# Change the version string to include the Debian version 42# Change the version string to include the Debian version
29SSH_VERSION := $(shell sed -e '/define/!d; s/.*\"\(.*\)\".*/\1/; q' <version.h) Debian $(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p') 43SSH_VERSION := $(shell sed -e '/define/!d; s/.*\"\(.*\)\".*/\1/; q' <version.h) Debian $(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p')
30 44
@@ -61,6 +75,11 @@ ifeq ($(PO2DEBCONF),yes)
61 po2debconf debian/templates.master > debian/templates 75 po2debconf debian/templates.master > debian/templates
62 rm -f debian/po/output 76 rm -f debian/po/output
63endif 77endif
78ifeq ($(PAMSUBST),yes)
79 if [ -f debian/ssh.pam.new-style ]; then \
80 mv debian/ssh.pam.new-style debian/ssh.pam; \
81 fi
82endif
64 dh_clean 83 dh_clean
65 84
66install: DH_OPTIONS= 85install: DH_OPTIONS=
@@ -113,6 +132,18 @@ endif
113 nroff RFC.nroff > debian/tmp/usr/share/doc/ssh/RFC 132 nroff RFC.nroff > debian/tmp/usr/share/doc/ssh/RFC
114 gzip -9 debian/tmp/usr/share/doc/ssh/RFC 133 gzip -9 debian/tmp/usr/share/doc/ssh/RFC
115 rm -rf debian/tmp/usr/share/doc/ssh/RFC.nroff.gz 134 rm -rf debian/tmp/usr/share/doc/ssh/RFC.nroff.gz
135ifeq ($(PAMSUBST),yes)
136 # Clean up if we've done this already, to ensure idempotency.
137 if [ -f debian/ssh.pam.new-style ]; then \
138 mv debian/ssh.pam.new-style debian/ssh.pam; \
139 fi
140 cp -a debian/ssh.pam debian/ssh.pam.new-style
141 sed -e "s/@include common-auth/auth required pam_unix.so/" \
142 -e "s/@include common-account/account required pam_unix.so/" \
143 -e "s/@include common-session/session required pam_unix.so/" \
144 -e "s/@include common-password/password required pam_unix.so/" \
145 debian/ssh.pam.new-style > debian/ssh.pam
146endif
116 dh_installpam 147 dh_installpam
117 dh_installchangelogs ChangeLog 148 dh_installchangelogs ChangeLog
118 dh_strip 149 dh_strip
@@ -122,7 +153,8 @@ endif
122 test ! -e debian/tmp/etc/ssh/ssh_prng_cmds \ 153 test ! -e debian/tmp/etc/ssh/ssh_prng_cmds \
123 || echo "/etc/ssh/ssh_prng_cmds" >> debian/tmp/DEBIAN/conffiles 154 || echo "/etc/ssh/ssh_prng_cmds" >> debian/tmp/DEBIAN/conffiles
124 dh_shlibdeps 155 dh_shlibdeps
125 dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER))' 156 dh_gencontrol -- -V'debconf-depends=debconf (>= $(MINDEBCONFVER))' \
157 -V'pam-depends=$(PAMDEP)'
126 dh_md5sums 158 dh_md5sums
127 dh_builddeb 159 dh_builddeb
128 160