diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 34 |
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 | |||
25 | MINDEBCONFVER := 1.2.0 | 25 | MINDEBCONFVER := 1.2.0 |
26 | endif | 26 | endif |
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. | ||
34 | ifeq ($(DEB_BUILD_SSH_WOODY),) | ||
35 | PAMSUBST := no | ||
36 | PAMDEP := libpam-runtime (>= 0.76-14) | ||
37 | else | ||
38 | PAMSUBST := yes | ||
39 | PAMDEP := libpam-runtime | ||
40 | endif | ||
41 | |||
28 | # Change the version string to include the Debian version | 42 | # Change the version string to include the Debian version |
29 | SSH_VERSION := $(shell sed -e '/define/!d; s/.*\"\(.*\)\".*/\1/; q' <version.h) Debian $(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p') | 43 | SSH_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 |
63 | endif | 77 | endif |
78 | ifeq ($(PAMSUBST),yes) | ||
79 | if [ -f debian/ssh.pam.new-style ]; then \ | ||
80 | mv debian/ssh.pam.new-style debian/ssh.pam; \ | ||
81 | fi | ||
82 | endif | ||
64 | dh_clean | 83 | dh_clean |
65 | 84 | ||
66 | install: DH_OPTIONS= | 85 | install: 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 |
135 | ifeq ($(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 | ||
146 | endif | ||
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 | ||