[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/

2023-03-20 Thread Sam James
commit: 003f109e452272e65a6978d9169e5c761fc1
Author: Sam James  gentoo  org>
AuthorDate: Mon Mar 20 07:33:35 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Mar 20 07:34:50 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=003f109e

net-misc/bopm: fix BDEPEND

Signed-off-by: Sam James  gentoo.org>

 net-misc/bopm/bopm-3.1.3-r7.ebuild | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net-misc/bopm/bopm-3.1.3-r7.ebuild 
b/net-misc/bopm/bopm-3.1.3-r7.ebuild
index d42d9a0d0a54..d959f6b1af9d 100644
--- a/net-misc/bopm/bopm-3.1.3-r7.ebuild
+++ b/net-misc/bopm/bopm-3.1.3-r7.ebuild
@@ -14,8 +14,10 @@ SLOT="0"
 KEYWORDS="~alpha ~amd64 ~ppc ~x86"
 
 RDEPEND="acct-user/opm"
-BDEPEND="acct-user/opm"
-BDEPEND="sys-devel/autoconf-archive"
+BDEPEND="
+   acct-user/opm
+   sys-devel/autoconf-archive
+"
 
 PATCHES=(
"${FILESDIR}"/${P}-remove-njabl.patch



[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/, net-misc/bopm/files/

2023-03-18 Thread Sam James
commit: aa6bff56c719332a4f2a810bd2b690af1bc375e8
Author: Sam James  gentoo  org>
AuthorDate: Sun Mar 19 00:56:53 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Mar 19 00:56:53 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa6bff56

net-misc/bopm: fix configure w/ clang 16

Closes: https://bugs.gentoo.org/900254
Signed-off-by: Sam James  gentoo.org>

 .../{bopm-3.1.3-r6.ebuild => bopm-3.1.3-r7.ebuild} | 11 ++-
 net-misc/bopm/files/bopm-3.1.3-autotools.patch | 88 --
 2 files changed, 8 insertions(+), 91 deletions(-)

diff --git a/net-misc/bopm/bopm-3.1.3-r6.ebuild 
b/net-misc/bopm/bopm-3.1.3-r7.ebuild
similarity index 80%
rename from net-misc/bopm/bopm-3.1.3-r6.ebuild
rename to net-misc/bopm/bopm-3.1.3-r7.ebuild
index ae8dd5a2d897..d42d9a0d0a54 100644
--- a/net-misc/bopm/bopm-3.1.3-r6.ebuild
+++ b/net-misc/bopm/bopm-3.1.3-r7.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit autotools
 
@@ -14,6 +14,8 @@ SLOT="0"
 KEYWORDS="~alpha ~amd64 ~ppc ~x86"
 
 RDEPEND="acct-user/opm"
+BDEPEND="acct-user/opm"
+BDEPEND="sys-devel/autoconf-archive"
 
 PATCHES=(
"${FILESDIR}"/${P}-remove-njabl.patch
@@ -29,6 +31,8 @@ src_prepare() {
 
mv configure.{in,ac} || die
mv src/libopm/configure.{in,ac} || die
+   mkdir src/libopm/m4 || die
+   cp "${BROOT}"/usr/share/aclocal/ax_func_snprintf.m4 
src/libopm/m4/ax_func_snprintf.m4 || die
 
default
cp bopm.conf{.sample,} || die
@@ -37,7 +41,8 @@ src_prepare() {
 }
 
 src_configure() {
-   econf --localstatedir="${EPREFIX}"/var/log/${PN}
+   # We need --enable-static to build libopm.a. We don't install it so 
it's fine.
+   econf --localstatedir="${EPREFIX}"/var/log/${PN} --enable-static
 }
 
 src_install() {

diff --git a/net-misc/bopm/files/bopm-3.1.3-autotools.patch 
b/net-misc/bopm/files/bopm-3.1.3-autotools.patch
index e2927b0b74b6..e336150f430c 100644
--- a/net-misc/bopm/files/bopm-3.1.3-autotools.patch
+++ b/net-misc/bopm/files/bopm-3.1.3-autotools.patch
@@ -44,94 +44,6 @@
  AC_CONFIG_SRCDIR(src/libopm.h)
  AM_CONFIG_HEADER(src/setup.h)
  AM_INIT_AUTOMAKE()
 bopm-3.1.3/src/libopm/m4/ax_func_snprintf.m4
-+++ bopm-3.1.3/src/libopm/m4/ax_func_snprintf.m4
-@@ -0,0 +1,85 @@
-+# ===
-+# http://www.gnu.org/software/autoconf-archive/ax_func_snprintf.html
-+# ===
-+#
-+# SYNOPSIS
-+#
-+#   AX_FUNC_SNPRINTF
-+#
-+# DESCRIPTION
-+#
-+#   Checks for a fully C99 compliant snprintf, in particular checks whether
-+#   it does bounds checking and returns the correct string length; does the
-+#   same check for vsnprintf. If no working snprintf or vsnprintf is found,
-+#   request a replacement and warn the user about it. Note: the mentioned
-+#   replacement is freely available and may be used in any project
-+#   regardless of it's license.
-+#
-+# LICENSE
-+#
-+#   Copyright (c) 2008 Ruediger Kuhlmann 
-+#
-+#   Copying and distribution of this file, with or without modification, are
-+#   permitted in any medium without royalty provided the copyright notice
-+#   and this notice are preserved. This file is offered as-is, without any
-+#   warranty.
-+
-+#serial 5
-+
-+AU_ALIAS([AC_FUNC_SNPRINTF], [AX_FUNC_SNPRINTF])
-+AC_DEFUN([AX_FUNC_SNPRINTF],
-+[AC_CHECK_FUNCS(snprintf vsnprintf)
-+AC_MSG_CHECKING(for working snprintf)
-+AC_CACHE_VAL(ac_cv_have_working_snprintf,
-+[AC_TRY_RUN(
-+[#include 
-+
-+int main(void)
-+{
-+char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
-+char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
-+int i;
-+i = snprintf (bufs, 2, "%s", "111");
-+if (strcmp (bufs, "1")) exit (1);
-+if (i != 3) exit (1);
-+i = snprintf (bufd, 2, "%d", 111);
-+if (strcmp (bufd, "1")) exit (1);
-+if (i != 3) exit (1);
-+exit(0);
-+}], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no, 
ac_cv_have_working_snprintf=cross)])
-+AC_MSG_RESULT([$ac_cv_have_working_snprintf])
-+AC_MSG_CHECKING(for working vsnprintf)
-+AC_CACHE_VAL(ac_cv_have_working_vsnprintf,
-+[AC_TRY_RUN(
-+[#include 
-+#include 
-+
-+int my_vsnprintf (char *buf, const char *tmpl, ...)
-+{
-+int i;
-+va_list args;
-+va_start (args, tmpl);
-+i = vsnprintf (buf, 2, tmpl, args);
-+va_end (args);
-+return i;
-+}
-+
-+int main(void)
-+{
-+char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
-+char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
-+int i;
-+i = my_vsnprintf (bufs, "%s", "111");
-+if (strcmp (bufs, "1")) exit (1);
-+if (i != 3) exit (1);
-+i = my_vsnprintf (bufd, "%d", 111);
-+if (strcmp (bufd, "1")) exit (1);
-+if (i != 3) exit (1);
-+exit(0);
-+}], ac_cv_have_working_vsnprintf=yes, 

[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/

2021-07-13 Thread Sam James
commit: 7bde590d74b5967aa053cb7c65e2f28f835b35d1
Author: Sam James  gentoo  org>
AuthorDate: Tue Jul 13 23:25:10 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Jul 13 23:25:10 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bde590d

net-misc/bopm: fix group membership

Signed-off-by: Sam James  gentoo.org>

 net-misc/bopm/{bopm-3.1.3-r5.ebuild => bopm-3.1.3-r6.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-misc/bopm/bopm-3.1.3-r5.ebuild 
b/net-misc/bopm/bopm-3.1.3-r6.ebuild
similarity index 96%
rename from net-misc/bopm/bopm-3.1.3-r5.ebuild
rename to net-misc/bopm/bopm-3.1.3-r6.ebuild
index ca2ffd15a08..ae8dd5a2d89 100644
--- a/net-misc/bopm/bopm-3.1.3-r5.ebuild
+++ b/net-misc/bopm/bopm-3.1.3-r6.ebuild
@@ -61,7 +61,7 @@ src_install() {
 
 pkg_postinst() {
if [[ -n "${REPLACING_VERSIONS}" ]] ; then
-   if has_version "<${CATEGORY}/${PF}" ; then
+   if has_version "<${CATEGORY}/${PN}-3.1.3-r6" ; then
ewarn "You need to update permissions on:"
ewarn "- /var/log/bopm"
ewarn "- /etc/bopm.conf"



[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/

2021-07-13 Thread Sam James
commit: 1095c83861c818ccde0cdd2df9aade11e3c9c057
Author: Sam James  gentoo  org>
AuthorDate: Tue Jul 13 22:54:58 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Jul 13 23:06:00 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1095c838

net-misc/bopm: migrate to GLEP 81

Closes: https://bugs.gentoo.org/781407
Signed-off-by: Sam James  gentoo.org>

 .../{bopm-3.1.3-r4.ebuild => bopm-3.1.3-r5.ebuild} | 23 +++---
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/net-misc/bopm/bopm-3.1.3-r4.ebuild 
b/net-misc/bopm/bopm-3.1.3-r5.ebuild
similarity index 78%
rename from net-misc/bopm/bopm-3.1.3-r4.ebuild
rename to net-misc/bopm/bopm-3.1.3-r5.ebuild
index d90d4d376cd..ca2ffd15a08 100644
--- a/net-misc/bopm/bopm-3.1.3-r4.ebuild
+++ b/net-misc/bopm/bopm-3.1.3-r5.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit autotools user
+inherit autotools
 
 DESCRIPTION="Blitzed Open Proxy Monitor"
 HOMEPAGE="https://github.com/blitzed-org/bopm;
@@ -13,16 +13,14 @@ LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~ppc ~x86"
 
+RDEPEND="acct-user/opm"
+
 PATCHES=(
"${FILESDIR}"/${P}-remove-njabl.patch
"${FILESDIR}"/${P}-autotools.patch
"${FILESDIR}"/${P}-quarantine-bad-pid-file.patch
 )
 
-pkg_setup() {
-   enewuser bopm
-}
-
 src_prepare() {
sed -i \
-e "s!/some/path/bopm.pid!/run/${PN}/${PN}.pid!" \
@@ -55,8 +53,19 @@ src_install() {
 
dodir /var/log/bopm
fperms 700 /var/log/bopm
-   fowners bopm:root /var/log/bopm
+   fowners opm:root /var/log/bopm
 
fperms 600 /etc/bopm.conf
-   fowners bopm:root /etc/bopm.conf
+   fowners opm:root /etc/bopm.conf
+}
+
+pkg_postinst() {
+   if [[ -n "${REPLACING_VERSIONS}" ]] ; then
+   if has_version "<${CATEGORY}/${PF}" ; then
+   ewarn "You need to update permissions on:"
+   ewarn "- /var/log/bopm"
+   ewarn "- /etc/bopm.conf"
+   ewarn "to be owned by opm:root"
+   fi
+   fi
 }



[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/

2021-03-22 Thread Sam James
commit: 3788eb246bb12a8a49b778858cc4fb58a6360804
Author: Sam James  gentoo  org>
AuthorDate: Mon Mar 22 22:23:11 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Mar 23 04:48:41 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3788eb24

net-misc/bopm: update EAPI 6 -> 7

Signed-off-by: Sam James  gentoo.org>

 net-misc/bopm/bopm-3.1.3-r4.ebuild | 13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/net-misc/bopm/bopm-3.1.3-r4.ebuild 
b/net-misc/bopm/bopm-3.1.3-r4.ebuild
index 5c2096926f2..d90d4d376cd 100644
--- a/net-misc/bopm/bopm-3.1.3-r4.ebuild
+++ b/net-misc/bopm/bopm-3.1.3-r4.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 inherit autotools user
 
@@ -12,10 +12,6 @@ 
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}"
 
 PATCHES=(
"${FILESDIR}"/${P}-remove-njabl.patch
@@ -50,8 +46,9 @@ src_install() {
default
 
# 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
+   # TODO: Do we really want libopm? It's gone now.
+   # (was: "If anybody wants libopm, please install net-libs/libopm")
+   rm -r "${ED}"/usr/$(get_libdir) "${ED}"/usr/include || die
 
newinitd "${FILESDIR}"/bopm.init.d-r2 ${PN}
newconfd "${FILESDIR}"/bopm.conf.d-r1 ${PN}



[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/

2021-03-16 Thread Sam James
commit: 0ca91a684150c9aef840c978fcc00157c392d958
Author: Sam James  gentoo  org>
AuthorDate: Wed Mar 17 01:48:43 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Mar 17 02:13:02 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ca91a68

net-misc/bopm: adopt package

Signed-off-by: Sam James  gentoo.org>

 net-misc/bopm/metadata.xml | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net-misc/bopm/metadata.xml b/net-misc/bopm/metadata.xml
index 5ed9ca4d7b3..1ce1de9cfec 100644
--- a/net-misc/bopm/metadata.xml
+++ b/net-misc/bopm/metadata.xml
@@ -1,7 +1,10 @@
 
 http://www.gentoo.org/dtd/metadata.dtd;>
 
-   
+   
+   s...@gentoo.org
+   Sam James
+   

blitzed-org/bopm




[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/

2018-01-06 Thread Michał Górny
commit: 185bff2c0d9947cb053cd6d2a851f28dff0052a3
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Jan  6 22:07:49 2018 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Jan  6 22:09:41 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=185bff2c

net-misc/bopm: Remove proxied maintainer

Closes: https://bugs.gentoo.org/632876

 net-misc/bopm/metadata.xml | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/net-misc/bopm/metadata.xml b/net-misc/bopm/metadata.xml
index 1da5439889b..389984f4aa0 100644
--- a/net-misc/bopm/metadata.xml
+++ b/net-misc/bopm/metadata.xml
@@ -1,14 +1,7 @@
 
 http://www.gentoo.org/dtd/metadata.dtd;>
 
-   
-   shent...@gmail.com
-   Shentino
-   
-   
-   proxy-ma...@gentoo.org
-   Proxy Maintainers
-   
+   

blitzed-org/bopm




[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/files/, net-misc/bopm/

2017-10-15 Thread Patrice Clement
commit: b268b306966b45a54da8a5573e09915e0ca92a96
Author: Raymond Jennings  gmail  com>
AuthorDate: Thu Oct 12 06:50:58 2017 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Sun Oct 15 21:11:03 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b268b306

net-misc/bopm: fix security bug with pid file.

In theory, someone who explots a hacked bopm could then use it to
attack root owned processes.

This puts the bopm-written PID file into a disposable junk directory
and lets start-stop-daemon do all the grunt work.

Bug: https://bugs.gentoo.org/631882
Closes: https://github.com/gentoo/gentoo/pull/5924

 .../bopm/{bopm-3.1.3-r3.ebuild => bopm-3.1.3-r4.ebuild}  |  3 ++-
 .../bopm/files/bopm-3.1.3-quarantine-bad-pid-file.patch  | 16 
 net-misc/bopm/files/{bopm.init.d-r1 => bopm.init.d-r2}   |  4 +++-
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/net-misc/bopm/bopm-3.1.3-r3.ebuild 
b/net-misc/bopm/bopm-3.1.3-r4.ebuild
similarity index 93%
rename from net-misc/bopm/bopm-3.1.3-r3.ebuild
rename to net-misc/bopm/bopm-3.1.3-r4.ebuild
index 5e306a50271..5c2096926f2 100644
--- a/net-misc/bopm/bopm-3.1.3-r3.ebuild
+++ b/net-misc/bopm/bopm-3.1.3-r4.ebuild
@@ -20,6 +20,7 @@ DEPEND="${RDEPEND}"
 PATCHES=(
"${FILESDIR}"/${P}-remove-njabl.patch
"${FILESDIR}"/${P}-autotools.patch
+   "${FILESDIR}"/${P}-quarantine-bad-pid-file.patch
 )
 
 pkg_setup() {
@@ -52,7 +53,7 @@ src_install() {
# 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}
+   newinitd "${FILESDIR}"/bopm.init.d-r2 ${PN}
newconfd "${FILESDIR}"/bopm.conf.d-r1 ${PN}
 
dodir /var/log/bopm

diff --git a/net-misc/bopm/files/bopm-3.1.3-quarantine-bad-pid-file.patch 
b/net-misc/bopm/files/bopm-3.1.3-quarantine-bad-pid-file.patch
new file mode 100644
index 000..fedcd0980a0
--- /dev/null
+++ b/net-misc/bopm/files/bopm-3.1.3-quarantine-bad-pid-file.patch
@@ -0,0 +1,16 @@
+Bopm writes its own pid file, but this is handled by the init script via
+openrc-run.
+---
+diff --git a/bopm.conf.sample b/bopm.conf.sample
+index e26dc17..fa5ce1d 100644
+--- a/bopm.conf.sample
 b/bopm.conf.sample
+@@ -9,7 +9,7 @@ options {
+* Full path and filename for storing the process ID of the running
+* BOPM.
+*/
+-  pidfile = "/run/bopm/bopm.pid";
++  pidfile = "/run/bopm/junk/bopm.pid";
+ 
+   /*
+* How many seconds to store the IP address of hosts which are

diff --git a/net-misc/bopm/files/bopm.init.d-r1 
b/net-misc/bopm/files/bopm.init.d-r2
similarity index 70%
rename from net-misc/bopm/files/bopm.init.d-r1
rename to net-misc/bopm/files/bopm.init.d-r2
index 6a292f800be..de6d959b9f7 100644
--- a/net-misc/bopm/files/bopm.init.d-r1
+++ b/net-misc/bopm/files/bopm.init.d-r2
@@ -12,5 +12,7 @@ depend() {
 }
 
 start_pre() {
-   checkpath -o ${BOPM_UID} -d "$(dirname "${PIDFILE}")"
+   checkpath -o 0:0 -d /run/bopm
+   checkpath -o ${BOPM_UID} -d /run/bopm/junk
+   checkpath -o ${BOPM_UID} -f /run/bopm/junk/bopm.pid
 }



[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/

2017-07-30 Thread Michał Górny
commit: fddfe6a9b26d5149bcae05312ffea14316f7705e
Author: David Hicks  hicks  id  au>
AuthorDate: Fri Jul 28 23:18:11 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Jul 30 08:35:54 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fddfe6a9

net-misc/bopm: use HTTPS for GitHub

Package-Manager: Portage-2.3.6, Repoman-2.3.3

 net-misc/bopm/bopm-3.1.3-r3.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net-misc/bopm/bopm-3.1.3-r3.ebuild 
b/net-misc/bopm/bopm-3.1.3-r3.ebuild
index b1db434a9a1..5e306a50271 100644
--- a/net-misc/bopm/bopm-3.1.3-r3.ebuild
+++ b/net-misc/bopm/bopm-3.1.3-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -6,7 +6,7 @@ EAPI=6
 inherit autotools user
 
 DESCRIPTION="Blitzed Open Proxy Monitor"
-HOMEPAGE="http://github.com/blitzed-org/bopm;
+HOMEPAGE="https://github.com/blitzed-org/bopm;
 SRC_URI="http://static.blitzed.org/www.blitzed.org/${PN}/files/${P}.tar.gz;
 
 LICENSE="GPL-2"



[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/files/

2016-08-30 Thread David Seifert
commit: bf07ad320437cecbc578b1289ed2e2c8837a79f6
Author: David Seifert  gentoo  org>
AuthorDate: Tue Aug 30 18:00:39 2016 +
Commit: David Seifert  gentoo  org>
CommitDate: Tue Aug 30 18:00:59 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf07ad32

net-misc/bopm: Add missing AX_FUNC_SNPRINTF macro from autoconf-archive

Gentoo-bug: 592404

Package-Manager: portage-2.3.0

 net-misc/bopm/files/bopm-3.1.3-autotools.patch | 88 ++
 1 file changed, 88 insertions(+)

diff --git a/net-misc/bopm/files/bopm-3.1.3-autotools.patch 
b/net-misc/bopm/files/bopm-3.1.3-autotools.patch
index e336150..e2927b0 100644
--- a/net-misc/bopm/files/bopm-3.1.3-autotools.patch
+++ b/net-misc/bopm/files/bopm-3.1.3-autotools.patch
@@ -44,6 +44,94 @@
  AC_CONFIG_SRCDIR(src/libopm.h)
  AM_CONFIG_HEADER(src/setup.h)
  AM_INIT_AUTOMAKE()
+--- bopm-3.1.3/src/libopm/m4/ax_func_snprintf.m4
 bopm-3.1.3/src/libopm/m4/ax_func_snprintf.m4
+@@ -0,0 +1,85 @@
++# ===
++# http://www.gnu.org/software/autoconf-archive/ax_func_snprintf.html
++# ===
++#
++# SYNOPSIS
++#
++#   AX_FUNC_SNPRINTF
++#
++# DESCRIPTION
++#
++#   Checks for a fully C99 compliant snprintf, in particular checks whether
++#   it does bounds checking and returns the correct string length; does the
++#   same check for vsnprintf. If no working snprintf or vsnprintf is found,
++#   request a replacement and warn the user about it. Note: the mentioned
++#   replacement is freely available and may be used in any project
++#   regardless of it's license.
++#
++# LICENSE
++#
++#   Copyright (c) 2008 Ruediger Kuhlmann 
++#
++#   Copying and distribution of this file, with or without modification, are
++#   permitted in any medium without royalty provided the copyright notice
++#   and this notice are preserved. This file is offered as-is, without any
++#   warranty.
++
++#serial 5
++
++AU_ALIAS([AC_FUNC_SNPRINTF], [AX_FUNC_SNPRINTF])
++AC_DEFUN([AX_FUNC_SNPRINTF],
++[AC_CHECK_FUNCS(snprintf vsnprintf)
++AC_MSG_CHECKING(for working snprintf)
++AC_CACHE_VAL(ac_cv_have_working_snprintf,
++[AC_TRY_RUN(
++[#include 
++
++int main(void)
++{
++char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
++char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
++int i;
++i = snprintf (bufs, 2, "%s", "111");
++if (strcmp (bufs, "1")) exit (1);
++if (i != 3) exit (1);
++i = snprintf (bufd, 2, "%d", 111);
++if (strcmp (bufd, "1")) exit (1);
++if (i != 3) exit (1);
++exit(0);
++}], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no, 
ac_cv_have_working_snprintf=cross)])
++AC_MSG_RESULT([$ac_cv_have_working_snprintf])
++AC_MSG_CHECKING(for working vsnprintf)
++AC_CACHE_VAL(ac_cv_have_working_vsnprintf,
++[AC_TRY_RUN(
++[#include 
++#include 
++
++int my_vsnprintf (char *buf, const char *tmpl, ...)
++{
++int i;
++va_list args;
++va_start (args, tmpl);
++i = vsnprintf (buf, 2, tmpl, args);
++va_end (args);
++return i;
++}
++
++int main(void)
++{
++char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
++char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
++int i;
++i = my_vsnprintf (bufs, "%s", "111");
++if (strcmp (bufs, "1")) exit (1);
++if (i != 3) exit (1);
++i = my_vsnprintf (bufd, "%d", 111);
++if (strcmp (bufd, "1")) exit (1);
++if (i != 3) exit (1);
++exit(0);
++}], ac_cv_have_working_vsnprintf=yes, ac_cv_have_working_vsnprintf=no, 
ac_cv_have_working_vsnprintf=cross)])
++AC_MSG_RESULT([$ac_cv_have_working_vsnprintf])
++if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != 
"xyesyes"; then
++  AC_LIBOBJ(snprintf)
++  AC_MSG_WARN([Replacing missing/broken (v)snprintf() with version from 
http://www.ijs.si/software/snprintf/.])
++  AC_DEFINE(PREFER_PORTABLE_SNPRINTF, 1, "enable replacement (v)snprintf if 
system (v)snprintf is broken")
++fi])
 --- bopm-3.1.3/src/libopm/m4/etr_socket_nsl.m4
 +++ bopm-3.1.3/src/libopm/m4/etr_socket_nsl.m4
 @@ -0,0 +1,81 @@



[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/

2016-08-30 Thread David Seifert
commit: 1c888097c2a0c61dda2632d8b5e0e630c4eb1cf4
Author: Raymond Jennings  gmail  com>
AuthorDate: Mon Aug 29 20:26:43 2016 +
Commit: David Seifert  gentoo  org>
CommitDate: Tue Aug 30 06:12:22 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c888097

net-misc/bopm: remove non-compliant r1 in favor of r3

Closes: https://github.com/gentoo/gentoo/pull/2168

Signed-off-by: David Seifert  gentoo.org>

 net-misc/bopm/bopm-3.1.3-r1.ebuild | 57 --
 1 file changed, 57 deletions(-)

diff --git a/net-misc/bopm/bopm-3.1.3-r1.ebuild 
b/net-misc/bopm/bopm-3.1.3-r1.ebuild
deleted file mode 100644
index 6636224..
--- a/net-misc/bopm/bopm-3.1.3-r1.ebuild
+++ /dev/null
@@ -1,57 +0,0 @@
-# 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
-}



[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/

2016-08-30 Thread David Seifert
commit: 86e4253e5763af3255f06077eaaaf16699da529f
Author: Raymond Jennings  gmail  com>
AuthorDate: Mon Aug 29 19:55:20 2016 +
Commit: David Seifert  gentoo  org>
CommitDate: Tue Aug 30 06:12:18 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86e4253e

net-misc/bopm: remove obsolete EAPI 0 ebuild

Closes: https://github.com/gentoo/gentoo/pull/2168

Signed-off-by: David Seifert  gentoo.org>

 net-misc/bopm/bopm-3.1.3.ebuild | 57 -
 1 file changed, 57 deletions(-)

diff --git a/net-misc/bopm/bopm-3.1.3.ebuild b/net-misc/bopm/bopm-3.1.3.ebuild
deleted file mode 100644
index fcb8b0c..
--- a/net-misc/bopm/bopm-3.1.3.ebuild
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-inherit eutils 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}
-   sys-apps/sed"
-
-src_compile() {
-   econf \
-   --sysconfdir=/etc \
-   --datadir=/usr/share/doc/${PF} \
-   --localstatedir=/var/log/bopm || die "econf failed"
-   emake || die "emake failed"
-}
-
-src_install () {
-   sed -i \
-   -e 's!/some/path/bopm.pid!/var/run/bopm/bopm.pid!' \
-   -e 's!/some/path/scan.log!/var/log/bopm/scan.log!' 
bopm.conf.sample
-
-   make \
-   DESTDIR="${D}" \
-   sysconfdir="${D}"/etc \
-   datadir=/usr/share/doc/${PF} \
-   localstatedir="${D}"/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 "${D}"/usr/lib "${D}"/usr/include
-
-   newinitd "${FILESDIR}"/bopm.init.d bopm
-   newconfd "${FILESDIR}"/bopm.conf.d bopm
-
-   dodoc ChangeLog INSTALL README TODO
-}
-
-pkg_postinst() {
-   enewuser bopm
-
-   install -d -m 0700 -o bopm -g root "${ROOT}"/var/log/bopm
-   install -d -m 0700 -o bopm -g root "${ROOT}"/var/run/bopm
-   chown bopm "${ROOT}"/etc/bopm.conf
-}



[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/, net-misc/bopm/files/

2016-08-29 Thread David Seifert
commit: bcbb6eeb5f4870efac32ce3d72458f276f7a4b3e
Author: David Seifert  gentoo  org>
AuthorDate: Mon Aug 29 19:31:47 2016 +
Commit: David Seifert  gentoo  org>
CommitDate: Mon Aug 29 19:31:47 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcbb6eeb

net-misc/bopm: Install bopm.conf.sample in docdir too

Package-Manager: portage-2.3.0

 net-misc/bopm/{bopm-3.1.3-r2.ebuild => bopm-3.1.3-r3.ebuild} | 11 ++-
 net-misc/bopm/files/bopm-3.1.3-autotools.patch   |  2 +-
 net-misc/bopm/files/bopm-3.1.3-remove-njabl.patch|  6 +++---
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/net-misc/bopm/bopm-3.1.3-r2.ebuild 
b/net-misc/bopm/bopm-3.1.3-r3.ebuild
similarity index 95%
rename from net-misc/bopm/bopm-3.1.3-r2.ebuild
rename to net-misc/bopm/bopm-3.1.3-r3.ebuild
index 75d5f68..fda838c 100644
--- a/net-misc/bopm/bopm-3.1.3-r2.ebuild
+++ b/net-misc/bopm/bopm-3.1.3-r3.ebuild
@@ -28,16 +28,17 @@ pkg_setup() {
 }
 
 src_prepare() {
-   mv bopm.conf{.sample,} || die
-   mv configure.{in,ac} || die
-   mv src/libopm/configure.{in,ac} || die
-
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 || die
+   bopm.conf.sample || die
+
+   mv configure.{in,ac} || die
+   mv src/libopm/configure.{in,ac} || die
 
default
+   cp bopm.conf{.sample,} || die
+
eautoreconf
 }
 

diff --git a/net-misc/bopm/files/bopm-3.1.3-autotools.patch 
b/net-misc/bopm/files/bopm-3.1.3-autotools.patch
index 992a1ff..e336150 100644
--- a/net-misc/bopm/files/bopm-3.1.3-autotools.patch
+++ b/net-misc/bopm/files/bopm-3.1.3-autotools.patch
@@ -14,7 +14,7 @@
  SUBDIRS = src
  
 -data_DATA = bopm.conf.sample bopm.conf.blitzed
-+dist_doc_DATA = bopm.conf.blitzed
++dist_doc_DATA = bopm.conf.sample bopm.conf.blitzed
  
 -EXTRA_DIST = ChangeLog contrib INSTALL README bopm.conf.sample 
bopm.conf.blitzed network-bopm
 +EXTRA_DIST = ChangeLog contrib INSTALL README network-bopm

diff --git a/net-misc/bopm/files/bopm-3.1.3-remove-njabl.patch 
b/net-misc/bopm/files/bopm-3.1.3-remove-njabl.patch
index 588ccd6..318dae6 100644
--- a/net-misc/bopm/files/bopm-3.1.3-remove-njabl.patch
+++ b/net-misc/bopm/files/bopm-3.1.3-remove-njabl.patch
@@ -3,10 +3,10 @@ Remove NJABL as an example blacklist.
 NJABL has been shut down and bopm upstream still lists it in its default
 configuration.
 ---
-diff --git a/bopm.conf b/bopm.conf
+diff --git a/bopm.conf.sample b/bopm.conf.sample
 index 74483e1..bc05bf4 100644
 a/bopm.conf
-+++ b/bopm.conf
+--- a/bopm.conf.sample
 b/bopm.conf.sample
 @@ -363,18 +363,6 @@ OPM {
  #};
  



[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/files/, net-misc/bopm/

2016-08-29 Thread David Seifert
commit: 7676b5d33e6611f855d249fb8fdeb11e467cdb77
Author: Raymond Jennings  gmail  com>
AuthorDate: Sat Aug 27 20:40:33 2016 +
Commit: David Seifert  gentoo  org>
CommitDate: Mon Aug 29 19:07:46 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7676b5d3

net-misc/bopm: revbump, patch config file, and huge cleanup

Fix these issues with r1:

* Upgrade to EAPI 6
* Update the homepage
* Formatting cleanups in the ebuild
* Remove a redundant inherit
* Use fowners and fperms instead of raw chown and chperm
* Nix an unneeded "|| die" call
* Use einstalldocs instead of dodoc
* Use ED instead of D
* Document usage of datadir to store example config file
* Move various operations to the proper ebuild functions

And finally:

* Add patch to remove njabl from example config file
Closes: https://github.com/gentoo/gentoo/pull/2151

Signed-off-by: David Seifert  gentoo.org>

 net-misc/bopm/bopm-3.1.3-r2.ebuild|  64 +++
 net-misc/bopm/files/bopm-3.1.3-autotools.patch| 130 ++
 net-misc/bopm/files/bopm-3.1.3-remove-njabl.patch |  28 +
 3 files changed, 222 insertions(+)

diff --git a/net-misc/bopm/bopm-3.1.3-r2.ebuild 
b/net-misc/bopm/bopm-3.1.3-r2.ebuild
new file mode 100644
index ..75d5f68
--- /dev/null
+++ b/net-misc/bopm/bopm-3.1.3-r2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools user
+
+DESCRIPTION="Blitzed Open Proxy Monitor"
+HOMEPAGE="http://github.com/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}"
+
+PATCHES=(
+   "${FILESDIR}"/${P}-remove-njabl.patch
+   "${FILESDIR}"/${P}-autotools.patch
+)
+
+pkg_setup() {
+   enewuser bopm
+}
+
+src_prepare() {
+   mv bopm.conf{.sample,} || die
+   mv configure.{in,ac} || die
+   mv src/libopm/configure.{in,ac} || die
+
+   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 || die
+
+   default
+   eautoreconf
+}
+
+src_configure() {
+   econf --localstatedir="${EPREFIX}"/var/log/${PN}
+}
+
+src_install() {
+   default
+
+   # 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}
+
+   dodir /var/log/bopm
+   fperms 700 /var/log/bopm
+   fowners bopm:root /var/log/bopm
+
+   fperms 600 /etc/bopm.conf
+   fowners bopm:root /etc/bopm.conf
+}

diff --git a/net-misc/bopm/files/bopm-3.1.3-autotools.patch 
b/net-misc/bopm/files/bopm-3.1.3-autotools.patch
new file mode 100644
index ..992a1ff
--- /dev/null
+++ b/net-misc/bopm/files/bopm-3.1.3-autotools.patch
@@ -0,0 +1,130 @@
+--- bopm-3.1.3/configure.ac
 bopm-3.1.3/configure.ac
+@@ -1,5 +1,6 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(bopm, [3.1.3])
++AC_CONFIG_MACRO_DIR([src/libopm/m4])
+ AC_CONFIG_SRCDIR(src/opercmd.h)
+ AM_CONFIG_HEADER(src/setup.h)
+ AM_INIT_AUTOMAKE()
+--- bopm-3.1.3/Makefile.am
 bopm-3.1.3/Makefile.am
+@@ -2,22 +2,9 @@
+ 
+ SUBDIRS = src
+ 
+-data_DATA = bopm.conf.sample bopm.conf.blitzed
++dist_doc_DATA = bopm.conf.blitzed
+ 
+-EXTRA_DIST = ChangeLog contrib INSTALL README bopm.conf.sample 
bopm.conf.blitzed network-bopm
++EXTRA_DIST = ChangeLog contrib INSTALL README network-bopm
+ 
+-install-data-local:
+-  @if test -f $(sysconfdir)/bopm.conf ; then \
+-  echo "$@ will not overwrite existing $(sysconfdir)/bopm.conf"; \
+-  else \
+-  $(mkinstalldirs) $(sysconfdir); \
+-  echo "$(INSTALL_DATA) bopm.conf.sample 
$(sysconfdir)/bopm.conf"; \
+-  $(INSTALL_DATA) bopm.conf.sample $(sysconfdir)/bopm.conf; \
+-  fi
+-  $(mkinstalldirs) $(localstatedir)
++dist_sysconf_DATA = bopm.conf
+ 
+-uninstall-local:
+-  @if test -f $(sysconfdir)/bopm.conf ; then \
+-  echo "rm -f $(sysconfdir)/bopm.conf"; \
+-  $(RM) -f $(sysconfdir)/bopm.conf; \
+-  fi
+--- bopm-3.1.3/src/libopm/configure.ac
 bopm-3.1.3/src/libopm/configure.ac
+@@ -1,5 +1,6 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(libopm, [0.1])
++AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_SRCDIR(src/libopm.h)
+ AM_CONFIG_HEADER(src/setup.h)
+ AM_INIT_AUTOMAKE()
+--- bopm-3.1.3/src/libopm/m4/etr_socket_nsl.m4
 bopm-3.1.3/src/libopm/m4/etr_socket_nsl.m4
+@@ -0,0 +1,81 @@
++dnl @synopsis ETR_SOCKET_NSL
++dnl
++dnl @obsoleted Use LIB_SOCKET_NSL instead.
++dnl
++dnl This macro 

[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/

2016-08-27 Thread Patrice Clement
commit: d4a1c361913fb410761ab070858258b2093bc55e
Author: Patrice Clement  gentoo  org>
AuthorDate: Sat Aug 27 13:06:32 2016 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Sat Aug 27 13:15:04 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4a1c361

net-misc/bopm: transfert maintainership over to Shentino  
gmail.com>.

Gentoo-Bug: https://bugs.gentoo.org/592150

Package-Manager: portage-2.2.28

 net-misc/bopm/metadata.xml | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/net-misc/bopm/metadata.xml b/net-misc/bopm/metadata.xml
index 6f49eba..ddd2579 100644
--- a/net-misc/bopm/metadata.xml
+++ b/net-misc/bopm/metadata.xml
@@ -1,5 +1,12 @@
 
 http://www.gentoo.org/dtd/metadata.dtd;>
 
-
+   
+   shent...@gmail.com
+   Shentino
+   
+   
+   proxy-ma...@gentoo.org
+   Proxy Maintainers
+   
 



[gentoo-commits] repo/gentoo:master commit in: net-misc/bopm/, net-misc/bopm/files/

2015-10-02 Thread Nathan Phillip Brink
commit: 0528c472627b1698f679374ceaf9534586dabfa2
Author: Nathan Phillip Brink  gentoo  org>
AuthorDate: Sat Oct  3 03:03:06 2015 +
Commit: Nathan Phillip Brink  gentoo  org>
CommitDate: Sat Oct  3 03:03:06 2015 +
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 000..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 000..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 000..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}")"
+}