Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=kdetesting2.git;a=commitdiff;h=296fe93832c2c2b2e43d40cc188e273412c1a2f7

commit 296fe93832c2c2b2e43d40cc188e273412c1a2f7
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Wed Jan 19 03:38:17 2011 +0100

rpcbind-0.2.0-2-i686

- add systemd support

diff --git a/source/network/rpcbind/FrugalBuild 
b/source/network/rpcbind/FrugalBuild
index 2454a1c..6d04308 100644
--- a/source/network/rpcbind/FrugalBuild
+++ b/source/network/rpcbind/FrugalBuild
@@ -3,7 +3,7 @@

pkgname=rpcbind
pkgver=0.2.0
-pkgrel=1
+pkgrel=2
pkgdesc="A server that converts RPC program numbers into universal addresses."
_F_sourceforge_ext=".tar.bz2"
Finclude sourceforge
@@ -11,15 +11,18 @@ depends=('libtirpc' 'bash')
replaces=('portmap')
groups=('network')
archs=('i686')
-source=($source rpcbind-sunrpc.patch rc.rpcbind)
+source=($source rpcbind-sunrpc.patch rc.rpcbind rpcbind.service)
sha1sums=('02f077372a76a8f9adfa696004aa437212c28617' \
'a25c2295b2e4bf4e3f924f1753350efaccf37c21' \
-          'fc17ecef3b3237e98a3e19a5575fd72180954bb1')
+          'fc17ecef3b3237e98a3e19a5575fd72180954bb1' \
+          '40993ead8799494f157838d46b36f0335cb1235a')

build()
{
Fbuild
Frcd2 rpcbind
+       Ffile /lib/systemd/system/rpcbind.service
+       Fmkdir /etc/systemd/system/multi-user.target.wants
}

# optimization OK
diff --git a/source/network/rpcbind/rpcbind.install 
b/source/network/rpcbind/rpcbind.install
index f69c33a..2474acf 100644
--- a/source/network/rpcbind/rpcbind.install
+++ b/source/network/rpcbind/rpcbind.install
@@ -1,11 +1,29 @@
post_install()
{
chkconfig --add rc.rpcbind
+       ln -s '/lib/systemd/system/rpcbind.service' 
'/etc/systemd/system/multi-user.target.wants/rpcbind.service'
}

-post_remove()
+post_upgrade()
+{
+       systemctl daemon-reload >/dev/null 2>&1
+       if [ `vercmp $2 0.2.0-2` -lt 0 ] ; then
+               if chkconfig rc.rpcbind; then
+                       post_install
+               fi
+       fi
+}
+
+pre_remove()
{
chkconfig --del rc.rpcbind
+       rm -f '/etc/systemd/system/multi-user.target.wants/rpcbind.service'
+       systemctl stop rpcbind.service >/dev/null 2>&1
+}
+
+post_remove()
+{
+       systemctl daemon-reload >/dev/null 2>&1
}

op=$1
diff --git a/source/network/rpcbind/rpcbind.service 
b/source/network/rpcbind/rpcbind.service
new file mode 100644
index 0000000..38358fe
--- /dev/null
+++ b/source/network/rpcbind/rpcbind.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=RPC Portmapper Service
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/rpcbind
+
+[Install]
+WantedBy=multi-user.target
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to