]> git.draconx.ca Git - gentoo-draconx.git/blob - net-p2p/ipfilter/ipfilter-1812.ebuild
Add net-p2p/ipfilter ebuild.
[gentoo-draconx.git] / net-p2p / ipfilter / ipfilter-1812.ebuild
1 # Copyright © 2019 Nick Bowler
2 # License GPLv3+: GNU General Public License version 3 or any later version.
3 # There is NO WARRANTY, to the extent permitted by law.
4
5 EAPI=7
6
7 DESCRIPTION="IP filter list from eMule Security"
8 HOMEPAGE="http://www.emule-security.org/"
9 SRC_URI="http://upd.emule-security.org/ipfilter.zip -> $P.zip"
10
11 LICENSE="all-rights-reserved"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="+amule"
15
16 BDEPEND="|| ( app-arch/gzip app-arch/unzip )
17         app-text/dos2unix"
18
19 src_unpack() {
20         gunzip -c "$DISTDIR/$A" >ipfilter.dat && return
21         unzip "$DISTDIR/$A" && mv -f guarding.p2p ipfilter.dat && return
22         die "failed to unpack"
23 }
24
25 S=$WORKDIR
26
27 src_compile() {
28         dos2unix ipfilter.dat
29 }
30
31 src_install() {
32         insinto /usr/share
33         doins ipfilter.dat
34
35         if use amule; then
36                 dodir /usr/share/amule
37                 dosym ../ipfilter.dat /usr/share/amule/ipfilter.dat
38         fi
39 }