1 |
commit: 0528c472627b1698f679374ceaf9534586dabfa2 |
2 |
Author: Nathan Phillip Brink <binki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 3 03:03:06 2015 +0000 |
4 |
Commit: Nathan Phillip Brink <binki <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 3 03:03:06 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0528c472 |
7 |
|
8 |
net-misc/bopm: Support tmpfs /run for bug #562032. Thanks shentino, grknight. |
9 |
|
10 |
Package-Manager: portage-2.2.20 |
11 |
|
12 |
net-misc/bopm/bopm-3.1.3-r1.ebuild | 57 ++++++++++++++++++++++++++++++++++++++ |
13 |
net-misc/bopm/files/bopm.conf.d-r1 | 9 ++++++ |
14 |
net-misc/bopm/files/bopm.init.d-r1 | 17 ++++++++++++ |
15 |
3 files changed, 83 insertions(+) |
16 |
|
17 |
diff --git a/net-misc/bopm/bopm-3.1.3-r1.ebuild b/net-misc/bopm/bopm-3.1.3-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 0000000..6636224 |
20 |
--- /dev/null |
21 |
+++ b/net-misc/bopm/bopm-3.1.3-r1.ebuild |
22 |
@@ -0,0 +1,57 @@ |
23 |
+# Copyright 1999-2015 Gentoo Foundation |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+# $Id$ |
26 |
+ |
27 |
+EAPI=5 |
28 |
+ |
29 |
+inherit eutils multilib user |
30 |
+ |
31 |
+DESCRIPTION="Blitzed Open Proxy Monitor" |
32 |
+HOMEPAGE="http://www.blitzed.org/bopm/" |
33 |
+SRC_URI="http://static.blitzed.org/www.blitzed.org/${PN}/files/${P}.tar.gz" |
34 |
+LICENSE="GPL-2" |
35 |
+SLOT="0" |
36 |
+KEYWORDS="~alpha ~amd64 ~ppc ~x86" |
37 |
+IUSE="" |
38 |
+ |
39 |
+RDEPEND="" |
40 |
+DEPEND="${RDEPEND}" |
41 |
+ |
42 |
+src_configure() { |
43 |
+ econf \ |
44 |
+ --datadir="${EPREFIX}"/usr/share/doc/${PF} \ |
45 |
+ --localstatedir="${EPREFIX}"/var/log/${PN} |
46 |
+} |
47 |
+ |
48 |
+src_install () { |
49 |
+ sed -i \ |
50 |
+ -e "s!/some/path/bopm.pid!/run/${PN}/${PN}.pid!" \ |
51 |
+ -e "s!/some/path/scan.log!/var/log/${PN}/scan.log!" \ |
52 |
+ bopm.conf.sample || die |
53 |
+ |
54 |
+ # Custom Makefile.am rules do not respect DESTDIR, |
55 |
+ # thus override sysconfdir and localstatedir. |
56 |
+ emake \ |
57 |
+ DESTDIR="${D}" \ |
58 |
+ sysconfdir="${ED}"/etc \ |
59 |
+ localstatedir="${ED}"/var/log/bopm \ |
60 |
+ install || die "install failed" |
61 |
+ |
62 |
+ fperms 600 /etc/bopm.conf |
63 |
+ |
64 |
+ # Remove libopm related files, because bopm links statically to it |
65 |
+ # If anybody wants libopm, please install net-libs/libopm |
66 |
+ rm -r "${ED}"/usr/$(get_libdir) "${ED}"/usr/include || die |
67 |
+ |
68 |
+ newinitd "${FILESDIR}"/bopm.init.d-r1 ${PN} |
69 |
+ newconfd "${FILESDIR}"/bopm.conf.d-r1 ${PN} |
70 |
+ |
71 |
+ dodoc ChangeLog INSTALL README TODO |
72 |
+} |
73 |
+ |
74 |
+pkg_postinst() { |
75 |
+ enewuser bopm |
76 |
+ |
77 |
+ install -d -m 0700 -o bopm -g root "${ROOT}"/var/log/bopm |
78 |
+ chown bopm "${ROOT}"/etc/bopm.conf |
79 |
+} |
80 |
|
81 |
diff --git a/net-misc/bopm/files/bopm.conf.d-r1 b/net-misc/bopm/files/bopm.conf.d-r1 |
82 |
new file mode 100644 |
83 |
index 0000000..71bacbe |
84 |
--- /dev/null |
85 |
+++ b/net-misc/bopm/files/bopm.conf.d-r1 |
86 |
@@ -0,0 +1,9 @@ |
87 |
+# Copyright 1999-2015 Gentoo Foundation |
88 |
+# Distributed under the terms of the GNU General Public License v2 |
89 |
+# $Id$ |
90 |
+ |
91 |
+# Config file for /etc/init.d/bopm |
92 |
+ |
93 |
+BOPM_UID=bopm |
94 |
+CONFFILE=/etc/${SVCNAME}.conf |
95 |
+PIDFILE=/run/bopm/${SVCNAME}.pid |
96 |
|
97 |
diff --git a/net-misc/bopm/files/bopm.init.d-r1 b/net-misc/bopm/files/bopm.init.d-r1 |
98 |
new file mode 100644 |
99 |
index 0000000..4f6f2ea |
100 |
--- /dev/null |
101 |
+++ b/net-misc/bopm/files/bopm.init.d-r1 |
102 |
@@ -0,0 +1,17 @@ |
103 |
+#!/sbin/openrc-run |
104 |
+# Copyright 1999-2015 Gentoo Foundation |
105 |
+# Distributed under the terms of the GNU General Public License v2 |
106 |
+# $Id$ |
107 |
+ |
108 |
+command="/usr/bin/bopm" |
109 |
+description="Blitzed Open Proxy Monitor" |
110 |
+start_stop_daemon_args="--quiet --chuid ${BOPM_UID}" |
111 |
+pidfile="${PIDFILE}" |
112 |
+ |
113 |
+depend() { |
114 |
+ need net |
115 |
+} |
116 |
+ |
117 |
+start_pre() { |
118 |
+ checkpath -o ${BOPM_UID} -d "$(dirname "${PIDFILE}")" |
119 |
+} |