summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules27
1 files changed, 22 insertions, 5 deletions
diff --git a/debian/rules b/debian/rules
index c1aa978..751207e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,7 @@
#!/usr/bin/make -f
+include /usr/share/dpkg/architecture.mk
+
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
@@ -19,10 +21,6 @@ else
-j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CC := gcc
PKG_CONFIG = pkg-config
@@ -90,12 +88,18 @@ confflags += --with-pam
confflags += --with-libedit
confflags += --with-kerberos5=/usr
confflags += --with-ssl-engine
+
ifeq ($(DEB_HOST_ARCH_OS),linux)
confflags += --with-selinux
confflags += --with-audit=linux
confflags += --with-systemd
endif
+ifeq ($(DEB_HOST_ARCH_OS),illumos)
+confflags += --with-solaris-projects
+confflags += --with-solaris-contracts
+endif
+
# The deb build wants xauth; the udeb build doesn't.
confflags += --with-xauth=/usr/bin/xauth
confflags_udeb += --without-xauth
@@ -113,13 +117,22 @@ cflags_udeb := -Os
cflags_udeb += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\"
confflags += --with-cflags='$(cflags)'
confflags_udeb += --with-cflags='$(cflags_udeb)'
+#ifeq ($(DEB_HOST_ARCH),illumos-amd64)
+#cflags += -D_XOPEN_SOURCE=700 -D__EXTENSIONS__
+#cflags_udeb += -D_XOPEN_SOURCE=700 -D__EXTENSIONS__
+#endif
# Linker flags.
confflags += --with-ldflags='$(strip -Wl,--as-needed $(LDFLAGS))'
confflags_udeb += --with-ldflags='-Wl,--as-needed'
+dh_with := autoreconf
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+dh_with += systemd
+endif
+
%:
- dh $@ --with=autoreconf,systemd
+ dh $@ $(dh_with:%=--with %)
autoreconf:
autoreconf -f -i
@@ -206,11 +219,15 @@ override_dh_installdocs:
mkdir -p debian/openssh-server/usr/share/doc/openssh-client
override_dh_systemd_enable:
+ifeq ($(DEB_HOST_ARCH_OS),linux)
dh_systemd_enable -popenssh-server --name ssh ssh.service
dh_systemd_enable -popenssh-server --name ssh --no-enable ssh.socket
+endif
override_dh_installinit:
+ifneq ($(DEB_HOST_ARCH_OS),illumos)
dh_installinit -R --name ssh
+endif
debian/openssh-server.sshd.pam: debian/openssh-server.sshd.pam.in
ifeq ($(DEB_HOST_ARCH_OS),linux)