You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
1.9 KiB
79 lines
1.9 KiB
2 years ago
|
# Copyright 1999-2023 Gentoo Authors
|
||
8 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
2 years ago
|
EAPI=8
|
||
8 years ago
|
|
||
3 years ago
|
inherit autotools
|
||
8 years ago
|
|
||
|
DESCRIPTION="Blitzed Open Proxy Monitor"
|
||
7 years ago
|
HOMEPAGE="https://github.com/blitzed-org/bopm"
|
||
8 years ago
|
SRC_URI="http://static.blitzed.org/www.blitzed.org/${PN}/files/${P}.tar.gz"
|
||
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~alpha ~amd64 ~ppc ~x86"
|
||
|
|
||
3 years ago
|
RDEPEND="acct-user/opm"
|
||
2 years ago
|
BDEPEND="
|
||
|
acct-user/opm
|
||
|
sys-devel/autoconf-archive
|
||
|
"
|
||
3 years ago
|
|
||
8 years ago
|
PATCHES=(
|
||
|
"${FILESDIR}"/${P}-remove-njabl.patch
|
||
|
"${FILESDIR}"/${P}-autotools.patch
|
||
7 years ago
|
"${FILESDIR}"/${P}-quarantine-bad-pid-file.patch
|
||
8 years ago
|
)
|
||
|
|
||
|
src_prepare() {
|
||
|
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
|
||
|
|
||
|
mv configure.{in,ac} || die
|
||
|
mv src/libopm/configure.{in,ac} || die
|
||
2 years ago
|
mkdir src/libopm/m4 || die
|
||
|
cp "${BROOT}"/usr/share/aclocal/ax_func_snprintf.m4 src/libopm/m4/ax_func_snprintf.m4 || die
|
||
8 years ago
|
|
||
|
default
|
||
|
cp bopm.conf{.sample,} || die
|
||
|
|
||
|
eautoreconf
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
2 years ago
|
# 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
|
||
8 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
|
default
|
||
|
|
||
|
# Remove libopm related files, because bopm links statically to it
|
||
4 years ago
|
# 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
|
||
8 years ago
|
|
||
7 years ago
|
newinitd "${FILESDIR}"/bopm.init.d-r2 ${PN}
|
||
8 years ago
|
newconfd "${FILESDIR}"/bopm.conf.d-r1 ${PN}
|
||
|
|
||
|
dodir /var/log/bopm
|
||
|
fperms 700 /var/log/bopm
|
||
3 years ago
|
fowners opm:root /var/log/bopm
|
||
8 years ago
|
|
||
|
fperms 600 /etc/bopm.conf
|
||
3 years ago
|
fowners opm:root /etc/bopm.conf
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
if [[ -n "${REPLACING_VERSIONS}" ]] ; 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"
|
||
|
ewarn "to be owned by opm:root"
|
||
|
fi
|
||
|
fi
|
||
8 years ago
|
}
|