net-im/tencent-qq: bump version to 3.2.15_p241224
[gentoo-zh.git] / net-p2p / amule-dlp / amule-dlp-9999.ebuild
blobdb0a0758f8d29e6dab0a3be03fe8b3401eb8937e
1 # Copyright 1999-2021 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=7
5 WX_GTK_VER="3.0-gtk3"
7 inherit wxwidgets xdg-utils autotools git-r3
8 DESCRIPTION="aMule with DLP patch, the all-platform eMule p2p client"
9 HOMEPAGE="https://github.com/persmule/amule-dlp"
10 EGIT_REPO_URI="https://github.com/persmule/amule-dlp"
12 LICENSE="GPL-2+"
13 SLOT="0"
14 IUSE="daemon debug geoip nls remote stats upnp +X"
16 RDEPEND="
17 dev-libs/boost:=
18 dev-libs/crypto++:=
19 sys-libs/binutils-libs:0=
20 sys-libs/readline:0=
21 sys-libs/zlib
22 >=x11-libs/wxGTK-3.0.4:${WX_GTK_VER}[X?]
23 daemon? ( acct-user/amule )
24 geoip? ( dev-libs/geoip )
25 nls? ( virtual/libintl )
26 remote? (
27 acct-user/amule
28 media-libs/libpng:0=
30 stats? ( media-libs/gd:=[jpeg,png] )
31 upnp? ( net-libs/libupnp:0 )
32 !net-p2p/amule
34 DEPEND="${RDEPEND}
35 X? ( dev-util/desktop-file-utils )
37 BDEPEND="
38 virtual/pkgconfig
39 nls? ( sys-devel/gettext )
42 pkg_setup() {
43 setup-wxwidgets
46 src_prepare() {
47 default
49 if [[ ${PV} == 9999 ]]; then
50 ./autogen.sh || die
54 src_configure() {
55 local myconf=(
56 --with-denoise-level=0
57 --with-wx-config="${WX_CONFIG}"
58 --enable-amulecmd
59 --with-boost
60 $(use_enable debug)
61 $(use_enable daemon amule-daemon)
62 $(use_enable geoip)
63 $(use_enable nls)
64 $(use_enable remote webserver)
65 $(use_enable stats cas)
66 $(use_enable stats alcc)
67 $(use_enable upnp)
70 if use X; then
71 myconf+=(
72 $(use_enable remote amule-gui)
73 $(use_enable stats alc)
74 $(use_enable stats wxcas)
76 else
77 myconf+=(
78 --disable-monolithic
79 --disable-amule-gui
80 --disable-alc
81 --disable-wxcas
85 econf "${myconf[@]}"
88 src_install() {
89 default
91 if use daemon; then
92 newconfd "${FILESDIR}"/amuled.confd-r1 amuled
93 newinitd "${FILESDIR}"/amuled.initd amuled
95 if use remote; then
96 newconfd "${FILESDIR}"/amuleweb.confd-r1 amuleweb
97 newinitd "${FILESDIR}"/amuleweb.initd amuleweb
100 if use daemon || use remote; then
101 keepdir /var/lib/${PN}
102 fowners amule:amule /var/lib/${PN}
103 fperms 0750 /var/lib/${PN}
107 pkg_postinst() {
108 local ver
110 if use daemon || use remote; then
111 for ver in ${REPLACING_VERSIONS}; do
112 if ver_test ${ver} -lt "2.3.2-r4"; then
113 elog "Default user under which amuled and amuleweb daemons are started"
114 elog "have been changed from p2p to amule. Default home directory have been"
115 elog "changed as well."
116 echo
117 elog "If you want to preserve old download/share location, you can create"
118 elog "symlink /var/lib/amule/.aMule pointing to the old location and adjust"
119 elog "files ownership *or* restore AMULEUSER and AMULEHOME variables in"
120 elog "/etc/conf.d/{amuled,amuleweb} to the old values."
122 break
124 done
127 use X && xdg_desktop_database_update
130 pkg_postrm() {
131 use X && xdg_desktop_database_update