Commits

Laurent Bachelier  committed 28be8c0

minbif: Add systemd service

  • Participants
  • Parent commits 8daa82c

Comments (0)

Files changed (3)

File net-im/minbif/files/minbif.service

+[Unit]
+Description=minbif daemon
+
+[Service]
+Type=forking
+PIDFile=/run/minbif/minbif.pid
+User=minbif
+ExecStart=/usr/bin/minbif --pidfile /run/minbif/minbif.pid /etc/minbif/minbif.conf
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target

File net-im/minbif/minbif-1.0.5.ebuild

 
 EAPI=4
 
-inherit cmake-utils eutils
+inherit cmake-utils eutils systemd
 [ "$PV" == "9999" ] \
 	&& EGIT_REPO_URI="git://git.symlink.me/pub/romain/${PN}.git" \
 	&& inherit git-2
 		newins minbif.xinetd minbif
 	fi
 
+	systemd_dounit "${FILESDIR}/minbif.service"
+
 	diropts -o minbif -g minbif -m0700
 	keepdir /var/lib/minbif
 	keepdir /var/run/minbif

File net-im/minbif/minbif-9999.ebuild

 
 EAPI=4
 
-inherit cmake-utils eutils
+inherit cmake-utils eutils systemd
 [ "$PV" == "9999" ] \
 	&& EGIT_REPO_URI="git://git.symlink.me/pub/romain/${PN}.git" \
 	&& inherit git-2
 	syslog? ( virtual/logger )"
 
 src_prepare() {
+	epatch "${FILESDIR}/${PN}-1.0.5-glib-single-includes.patch"
+	epatch "${FILESDIR}/${PN}-1.0.5-gcc47.patch"
+
 	sed -i "s#share/doc/minbif)#share/doc/${PF})#" CMakeLists.txt
 
 	use xinetd && sed -i "s/type\s=\s[0-9]/type = 0/" minbif.conf
 		newins minbif.xinetd minbif
 	fi
 
+	systemd_dounit "${FILESDIR}/minbif.service"
+
 	diropts -o minbif -g minbif -m0700
 	keepdir /var/lib/minbif
 	keepdir /var/run/minbif