summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysutils/policykit/Makefile5
-rw-r--r--sysutils/policykit/files/polkitd.in31
2 files changed, 35 insertions, 1 deletions
diff --git a/sysutils/policykit/Makefile b/sysutils/policykit/Makefile
index d5631dea4..2648c7e60 100644
--- a/sysutils/policykit/Makefile
+++ b/sysutils/policykit/Makefile
@@ -3,11 +3,12 @@
# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
#
# $FreeBSD$
-# $MCom$
+# $MCom: ports/sysutils/policykit/Makefile,v 1.2 2006/05/01 05:34:11 marcus Exp $
#
PORTNAME= policykit
PORTVERSION= 0.1
+PORTREVISION= 1
CATEGORIES= sysutils gnome
MASTER_SITES= http://www.marcuscom.com/downloads/
DISTNAME= PolicyKit-${PORTVERSION}
@@ -28,6 +29,8 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib" \
GTKDOC="false"
+USE_RC_SUBR= polkitd
+
post-install:
.if !defined(PACKAGE_BUILDING)
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
diff --git a/sysutils/policykit/files/polkitd.in b/sysutils/policykit/files/polkitd.in
new file mode 100644
index 000000000..feeb6cfb9
--- /dev/null
+++ b/sysutils/policykit/files/polkitd.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: polkitd
+# REQUIRE: DAEMON
+#
+# Add the following line to /etc/rc.conf to enable the PolicyKit daemon:
+#
+# polkitd_enable="YES"
+#
+
+polkitd_enable=${polkitd_enable-"NO"}
+
+. %%RC_SUBR%%
+
+name=polkitd
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/sbin/polkitd"
+pidfile="/var/run/${name}/${name}.pid"
+
+stop_postcmd=stop_postcmd
+
+stop_postcmd()
+{
+ rm -f $pidfile
+}
+
+load_rc_config ${name}
+run_rc_command "$1"