From bd4255727d8bb5fb82399191e6a2478424501274 Mon Sep 17 00:00:00 2001 From: Kim Holviala Date: Thu, 8 Sep 2016 17:06:23 +0300 Subject: [PATCH] Updated deb package control files (still borken) --- debian/control | 2 +- debian/gophernicus.default | 10 ++++++++++ debian/postinst | 5 +---- debian/postrm | 13 ++++++++++--- debian/prerm | 2 +- debian/rules | 4 ++-- 6 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 debian/gophernicus.default diff --git a/debian/control b/debian/control index 07458ed..caa768a 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Homepage: gopher://gophernicus.org/1/software/gophernicus/server/ Package: gophernicus Architecture: any -Depends: ${shlibs:Depends}, debconf, netbase, openbsd-inetd | inet-superserver +Depends: ${shlibs:Depends}, debconf, netbase, openbsd-inetd | inet-superserver | systemd Recommends: lsb-release Suggests: lynx, php5-cli Description: Modern full-featured gopher server diff --git a/debian/gophernicus.default b/debian/gophernicus.default new file mode 100644 index 0000000..cb077cf --- /dev/null +++ b/debian/gophernicus.default @@ -0,0 +1,10 @@ +# Options for Gophernicus +# +# See README or run "in.gophernicus -?" to see a full list of +# configuration options. +# +# Example: +# OPTIONS="-h full.hostname -D \"I find your lack of gopher disturbing.\"" +# +# Uncomment and add your options here: +OPTIONS="-h $HOSTNAME -l $LOGDIR/server.log -f /usr/lib/$PACKAGE/filters" diff --git a/debian/postinst b/debian/postinst index 8d73fe1..b982087 100644 --- a/debian/postinst +++ b/debian/postinst @@ -20,9 +20,6 @@ if [ "$RET" ]; then HOSTNAME="`echo $RET | tr -cd 'A-Za-z0-9.-'`" fi -# Generate inetd service -SERVICE="gopher\t\tstream\ttcp\tnowait\t$USER\t/usr/sbin/$BINARY\t$BINARY -h $HOSTNAME -l $LOGDIR/server.log -f /usr/lib/$PACKAGE/filters" - # Configure gophernicus if [ "$1" = "configure" ]; then if [ ! -f "$ROOT/gophermap" ]; then @@ -32,6 +29,6 @@ if [ "$1" = "configure" ]; then chown $USER.adm $LOGDIR chmod 0750 $LOGDIR - update-inetd --add "$SERVICE" + #update-inetd --add "gopher\t\tstream\ttcp\tnowait\t$USER\t/usr/sbin/$BINARY\t$BINARY -h $HOSTNAME -l $LOGDIR/server.log -f /usr/lib/$PACKAGE/filters" fi diff --git a/debian/postrm b/debian/postrm index 96e50f2..ea97443 100644 --- a/debian/postrm +++ b/debian/postrm @@ -1,8 +1,15 @@ #!/bin/sh -if [ "$1" = "purge" ]; then - update-inetd --remove "## gopher" +if [ "$1" = "purge" -a -x "/usr/sbin/update-inetd" ]; then + /usr/sbin/update-inetd --remove "## gopher" +fi + +if [ -d "/run/systemd/system" ]; then + systemctl --system daemon-reload >/dev/null || true +fi + +if [ -x "/usr/bin/deb-systemd-helper" ]; then + /usr/bin/deb-systemd-helper disable gophernicus.socket >/dev/null fi #DEBHELPER# - diff --git a/debian/prerm b/debian/prerm index 2a3251c..77d621c 100644 --- a/debian/prerm +++ b/debian/prerm @@ -1,6 +1,6 @@ #!/bin/sh -update-inetd --disable gopher +#update-inetd --disable gopher #DEBHELPER# diff --git a/debian/rules b/debian/rules index 1bce626..1c97399 100755 --- a/debian/rules +++ b/debian/rules @@ -43,7 +43,7 @@ install: build rm -rf $(DEST)/tmp ln -s /usr/share/doc/gophernicus/ $(DEST)/var/gopher/docs ln -s /usr/bin/php5 $(DEST)/usr/lib/gophernicus/filters/php - cp gophermap $(DEST)/usr/lib/gophernicus/ + cp $(CURDIR)/gophermap $(DEST)/usr/lib/gophernicus/ # Build architecture-independent files here. binary-indep: build install @@ -65,7 +65,7 @@ binary-arch: build install # dh_installpam # dh_installmime # dh_python -# dh_installinit + dh_installinit # dh_installcron # dh_installinfo # dh_installman