summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-05-11 16:36:32 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-05-11 16:36:32 +0400
commit85cbff688b5cfe3590b72369e31e9856480eba4c (patch)
treed2b89e267aafbfe57cb7d6fca8dce1cd58306dd2
parentb5e9185ba9cd52c52bb90a9a354f27900303920c (diff)
downloadscreen-85cbff688b5cfe3590b72369e31e9856480eba4c.tar.gz
debiab/rules: added illumos specific snippets
-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'