summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2005-05-25 13:47:55 +0000
committerColin Watson <cjwatson@debian.org>2005-05-25 13:47:55 +0000
commit42c0f9c63e2aa32d34b7dd1f996fb68834b5573a (patch)
treeadb2388324b33bdcb39b7051ee7f0fb866dd2e89 /debian/rules
parent69eb975a47316b22f8083573fd3245dce8a3c1b2 (diff)
Hurd fixes:
- Link with -lcrypt. - Link with -lpthread rather than -pthread.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules14
1 files changed, 13 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index a35beeae8..4e8117877 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,6 +17,7 @@ endif
17 17
18VERSION := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 | sed 's/.*://') 18VERSION := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 | sed 's/.*://')
19DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) 19DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
20DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null || dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
20 21
21CLIENT_UDEB := openssh-client-udeb_$(VERSION)_$(DEB_HOST_ARCH).udeb 22CLIENT_UDEB := openssh-client-udeb_$(VERSION)_$(DEB_HOST_ARCH).udeb
22SERVER_UDEB := openssh-server-udeb_$(VERSION)_$(DEB_HOST_ARCH).udeb 23SERVER_UDEB := openssh-server-udeb_$(VERSION)_$(DEB_HOST_ARCH).udeb
@@ -43,6 +44,17 @@ PAMSUBST := yes
43PAMDEP := libpam-runtime 44PAMDEP := libpam-runtime
44endif 45endif
45 46
47# The Hurd needs libcrypt for res_query et al.
48ifeq ($(DEB_HOST_ARCH_OS),gnu)
49FORCE_LIBS := LIBS=-lcrypt
50endif
51
52ifeq ($(DEB_HOST_ARCH_OS),linux)
53LINK_PTHREAD := -pthread
54else
55LINK_PTHREAD := -lpthread
56endif
57
46# Change the version string to include the Debian version 58# Change the version string to include the Debian version
47SSH_EXTRAVERSION := Debian-$(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p' | sed -e 's/[^-]*-//') 59SSH_EXTRAVERSION := Debian-$(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p' | sed -e 's/[^-]*-//')
48 60
@@ -57,7 +69,7 @@ build-deb-stamp:
57 # Some 2.2 kernels have trouble with setres[ug]id() (bug #239999). 69 # Some 2.2 kernels have trouble with setres[ug]id() (bug #239999).
58 perl -pi -e 's/.*#undef (BROKEN_SETRES[UG]ID).*/#define $$1 1/' build-deb/config.h 70 perl -pi -e 's/.*#undef (BROKEN_SETRES[UG]ID).*/#define $$1 1/' build-deb/config.h
59 # Supply pthread linkage for just those binaries linked to PAM. 71 # Supply pthread linkage for just those binaries linked to PAM.
60 perl -pi -e 's/^(LIBPAM=.*)/$$1 -pthread/' build-deb/Makefile 72 perl -pi -e 's/^(LIBPAM=.*)/$$1 $(LINK_PTHREAD)/' build-deb/Makefile
61 73
62 $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' CFLAGS='$(OPTFLAGS) -g -Wall -DUSE_POSIX_THREADS -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT -DSSHD_PAM_SERVICE=\"ssh\" -DSSH_EXTRAVERSION="\" $(SSH_EXTRAVERSION)\""' SSH_KEYSIGN='/usr/lib/ssh-keysign' 74 $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' CFLAGS='$(OPTFLAGS) -g -Wall -DUSE_POSIX_THREADS -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT -DSSHD_PAM_SERVICE=\"ssh\" -DSSH_EXTRAVERSION="\" $(SSH_EXTRAVERSION)\""' SSH_KEYSIGN='/usr/lib/ssh-keysign'
63 # Support building on Debian 3.0 (with GNOME 1.4) and later. 75 # Support building on Debian 3.0 (with GNOME 1.4) and later.