summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules18
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
index 0802b16..7c840f6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,14 @@ ROOT := $(CURDIR)/debian/screen
# statically define this... sucko
TTYGROUP := 5
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+include /usr/share/dpkg/architecture.mk
+
+ifeq (illumos,$(DEB_HOST_ARCH_OS))
+CPPFLAGS += -DSVR4
+endif
+
%:
dh $@ --with autoreconf
@@ -53,6 +61,16 @@ override_dh_auto_install:
override_dh_installchangelogs:
dh_installchangelogs -k patchlevel.h
+# We want use init script as SMF method:
+override_dh_smf:
+ifeq (illumos,$(DEB_HOST_ARCH_OS))
+ dh_installdirs -pscreen /lib/svc/manifest/system \
+ /lib/svc/method
+ dh_install -pscreen debian/screen-cleanup.xml /lib/svc/manifest/system/
+ install -m 755 debian/init debian/screen/lib/svc/method/screen-cleanup
+ dh_smf --onlyscripts
+endif
+
override_dh_installinit:
dh_installinit --no-start --init-script='screen-cleanup'