commit:     0528c472627b1698f679374ceaf9534586dabfa2
Author:     Nathan Phillip Brink <binki <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  3 03:03:06 2015 +0000
Commit:     Nathan Phillip Brink <binki <AT> gentoo <DOT> org>
CommitDate: Sat Oct  3 03:03:06 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0528c472

net-misc/bopm: Support tmpfs /run for bug #562032. Thanks shentino, grknight.

Package-Manager: portage-2.2.20

 net-misc/bopm/bopm-3.1.3-r1.ebuild | 57 ++++++++++++++++++++++++++++++++++++++
 net-misc/bopm/files/bopm.conf.d-r1 |  9 ++++++
 net-misc/bopm/files/bopm.init.d-r1 | 17 ++++++++++++
 3 files changed, 83 insertions(+)

diff --git a/net-misc/bopm/bopm-3.1.3-r1.ebuild 
b/net-misc/bopm/bopm-3.1.3-r1.ebuild
new file mode 100644
index 0000000..6636224
--- /dev/null
+++ b/net-misc/bopm/bopm-3.1.3-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib user
+
+DESCRIPTION="Blitzed Open Proxy Monitor"
+HOMEPAGE="http://www.blitzed.org/bopm/";
+SRC_URI="http://static.blitzed.org/www.blitzed.org/${PN}/files/${P}.tar.gz";
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+src_configure() {
+       econf \
+               --datadir="${EPREFIX}"/usr/share/doc/${PF} \
+               --localstatedir="${EPREFIX}"/var/log/${PN}
+}
+
+src_install () {
+       sed -i \
+               -e "s!/some/path/bopm.pid!/run/${PN}/${PN}.pid!" \
+               -e "s!/some/path/scan.log!/var/log/${PN}/scan.log!" \
+               bopm.conf.sample || die
+
+       # Custom Makefile.am rules do not respect DESTDIR,
+       # thus override sysconfdir and localstatedir.
+       emake \
+               DESTDIR="${D}" \
+               sysconfdir="${ED}"/etc \
+               localstatedir="${ED}"/var/log/bopm \
+               install || die "install failed"
+
+       fperms 600 /etc/bopm.conf
+
+       # Remove libopm related files, because bopm links statically to it
+       # If anybody wants libopm, please install net-libs/libopm
+       rm -r "${ED}"/usr/$(get_libdir) "${ED}"/usr/include || die
+
+       newinitd "${FILESDIR}"/bopm.init.d-r1 ${PN}
+       newconfd "${FILESDIR}"/bopm.conf.d-r1 ${PN}
+
+       dodoc ChangeLog INSTALL README TODO
+}
+
+pkg_postinst() {
+       enewuser bopm
+
+       install -d -m 0700 -o bopm -g root "${ROOT}"/var/log/bopm
+       chown bopm "${ROOT}"/etc/bopm.conf
+}

diff --git a/net-misc/bopm/files/bopm.conf.d-r1 
b/net-misc/bopm/files/bopm.conf.d-r1
new file mode 100644
index 0000000..71bacbe
--- /dev/null
+++ b/net-misc/bopm/files/bopm.conf.d-r1
@@ -0,0 +1,9 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Config file for /etc/init.d/bopm
+
+BOPM_UID=bopm
+CONFFILE=/etc/${SVCNAME}.conf
+PIDFILE=/run/bopm/${SVCNAME}.pid

diff --git a/net-misc/bopm/files/bopm.init.d-r1 
b/net-misc/bopm/files/bopm.init.d-r1
new file mode 100644
index 0000000..4f6f2ea
--- /dev/null
+++ b/net-misc/bopm/files/bopm.init.d-r1
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+command="/usr/bin/bopm"
+description="Blitzed Open Proxy Monitor"
+start_stop_daemon_args="--quiet --chuid ${BOPM_UID}"
+pidfile="${PIDFILE}"
+
+depend() {
+       need net
+}
+
+start_pre() {
+       checkpath -o ${BOPM_UID} -d "$(dirname "${PIDFILE}")"
+}

Reply via email to