diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2019-11-04 19:40:19 +0300 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2019-11-04 19:50:27 +0300 |
commit | 51abeb57143e77e3c5751f6be5e3cd543c8fde1f (patch) | |
tree | ab20bde8cb698569fc48e64c9434f5c2a6780cef /net-misc/l7-protocols | |
parent | net-wireless/hostapd: fix and stabilize for bug #696032 (diff) | |
download | gentoo-51abeb57143e77e3c5751f6be5e3cd543c8fde1f.tar.gz gentoo-51abeb57143e77e3c5751f6be5e3cd543c8fde1f.tar.bz2 gentoo-51abeb57143e77e3c5751f6be5e3cd543c8fde1f.zip |
net-misc/l7-protocols: bugfixes and cleanup
- Bump to EAPI 7.
- l7-protocols is only useful with l7-filter-userspace, so drop
keywords not supported by l7-filter-userspace --- they are
remnants from the long gone l7-filter-kernel package.
- Install helper binaries to /usr/lib/$PN instead of
/usr/share/$PN.
Closes: https://bugs.gentoo.org/305255
Closes: https://bugs.gentoo.org/697240
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'net-misc/l7-protocols')
-rw-r--r-- | net-misc/l7-protocols/l7-protocols-2009.05.28-r1.ebuild | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/net-misc/l7-protocols/l7-protocols-2009.05.28-r1.ebuild b/net-misc/l7-protocols/l7-protocols-2009.05.28-r1.ebuild new file mode 100644 index 000000000000..2508abfe2017 --- /dev/null +++ b/net-misc/l7-protocols/l7-protocols-2009.05.28-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit eutils fixheadtails toolchain-funcs + +IUSE="" + +MY_P=${PN}-${PV//./-} + +DESCRIPTION="Protocol definitions of l7-filter kernel modules" +HOMEPAGE="http://l7-filter.sourceforge.net/protocols" + +SRC_URI="mirror://sourceforge/l7-filter/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +S=${WORKDIR}/${MY_P} + +src_prepare() { + sed -e "s|gcc.*\-o|$(tc-getCC) ${CFLAGS} ${LDFLAGS} -o|" \ + -e "s|g++.*\-o|$(tc-getCXX) ${CFLAGS} ${LDFLAGS} -o|" \ + -i testing/Makefile || die + sed -e "s|f in data|f in ${EPREFIX}/usr/share/l7-protocols/data|" \ + testing/timeit.sh || die + ht_fix_file testing/*.sh + eapply_user +} + +src_compile() { + emake -C testing +} + +# NOTE Testing mechanism is currently broken: +# stack smashing attack in function main() + +# Is also extraordinarly inefficent getting random data. +# +#src_test() { +# cd testing +# find ${S} -name \*.pat -print -exec ./test_match.sh {} \; \ +# -exec ./timeit.sh {} \; || die "failed tests" +# einfo "patterns past testing" +#} + +src_install() { + dodir /usr/{share,lib}/${PN} + mv testing/data example_traffic "${ED}"/usr/share/${PN} || die + + pushd testing >/dev/null || die + cp -pPR randprintable randchars test_speed-{kernel,userspace} README \ + match_kernel *.sh "${ED}"/usr/lib/${PN} || die + popd >/dev/null || die + + dodoc README CHANGELOG HOWTO WANTED + for dir in extra file_types malware ; do + newdoc ${dir}/README README.${dir} + done + rm -rf README CHANGELOG HOWTO LICENSE Makefile WANTED */README testing || die + + dodir /etc/l7-protocols + cp -R * "${ED}"/etc/l7-protocols || die + chown -R root:0 "${ED}" || die +} |