1 |
commit: 6b0c497b4d0f022fc6fe3179e4c62e4cb92e8437 |
2 |
Author: Alexander Tsoy <alexander <AT> tsoy <DOT> me> |
3 |
AuthorDate: Mon Feb 3 08:10:41 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 20 13:17:20 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b0c497b |
7 |
|
8 |
net-p2p/amule: add live ebuild |
9 |
|
10 |
Closes: https://bugs.gentoo.org/362781 |
11 |
Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/14537 |
13 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
14 |
|
15 |
net-p2p/amule/amule-9999.ebuild | 141 ++++++++++++++++++++++++++++++++++++++++ |
16 |
1 file changed, 141 insertions(+) |
17 |
|
18 |
diff --git a/net-p2p/amule/amule-9999.ebuild b/net-p2p/amule/amule-9999.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..c18f9ad656b |
21 |
--- /dev/null |
22 |
+++ b/net-p2p/amule/amule-9999.ebuild |
23 |
@@ -0,0 +1,141 @@ |
24 |
+# Copyright 1999-2020 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=7 |
28 |
+WX_GTK_VER="3.0-gtk3" |
29 |
+ |
30 |
+inherit wxwidgets xdg-utils |
31 |
+ |
32 |
+if [[ ${PV} == 9999 ]] ; then |
33 |
+ EGIT_REPO_URI="https://github.com/amule-project/amule" |
34 |
+ inherit autotools git-r3 |
35 |
+else |
36 |
+ MY_P="${PN/m/M}-${PV}" |
37 |
+ SRC_URI="https://download.sourceforge.net/${PN}/${MY_P}.tar.xz" |
38 |
+ S="${WORKDIR}/${MY_P}" |
39 |
+ KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" |
40 |
+fi |
41 |
+ |
42 |
+DESCRIPTION="aMule, the all-platform eMule p2p client" |
43 |
+HOMEPAGE="http://www.amule.org/" |
44 |
+ |
45 |
+LICENSE="GPL-2+" |
46 |
+SLOT="0" |
47 |
+IUSE="daemon debug geoip nls remote stats upnp +X" |
48 |
+ |
49 |
+RDEPEND=" |
50 |
+ dev-libs/boost:= |
51 |
+ dev-libs/crypto++:= |
52 |
+ sys-libs/binutils-libs:0= |
53 |
+ sys-libs/zlib |
54 |
+ >=x11-libs/wxGTK-3.0.4:${WX_GTK_VER}[X?] |
55 |
+ daemon? ( acct-user/amule ) |
56 |
+ geoip? ( dev-libs/geoip ) |
57 |
+ nls? ( virtual/libintl ) |
58 |
+ remote? ( |
59 |
+ acct-user/amule |
60 |
+ media-libs/libpng:0= |
61 |
+ ) |
62 |
+ stats? ( media-libs/gd:=[jpeg,png] ) |
63 |
+ upnp? ( net-libs/libupnp:0 ) |
64 |
+" |
65 |
+DEPEND="${RDEPEND} |
66 |
+ nls? ( sys-devel/gettext ) |
67 |
+ X? ( dev-util/desktop-file-utils ) |
68 |
+" |
69 |
+BDEPEND="virtual/pkgconfig" |
70 |
+ |
71 |
+PATCHES=( |
72 |
+) |
73 |
+ |
74 |
+pkg_setup() { |
75 |
+ setup-wxwidgets |
76 |
+} |
77 |
+ |
78 |
+src_prepare() { |
79 |
+ default |
80 |
+ |
81 |
+ if [[ "${PV}" == *9999 ]]; then |
82 |
+ ./autogen.sh || die |
83 |
+ fi |
84 |
+} |
85 |
+ |
86 |
+src_configure() { |
87 |
+ local myconf=( |
88 |
+ --with-denoise-level=0 |
89 |
+ --with-wx-config="${WX_CONFIG}" |
90 |
+ --enable-amulecmd |
91 |
+ --with-boost |
92 |
+ $(use_enable debug) |
93 |
+ $(use_enable daemon amule-daemon) |
94 |
+ $(use_enable geoip) |
95 |
+ $(use_enable nls) |
96 |
+ $(use_enable remote webserver) |
97 |
+ $(use_enable stats cas) |
98 |
+ $(use_enable stats alcc) |
99 |
+ $(use_enable upnp) |
100 |
+ ) |
101 |
+ |
102 |
+ if use X; then |
103 |
+ myconf+=( |
104 |
+ $(use_enable remote amule-gui) |
105 |
+ $(use_enable stats alc) |
106 |
+ $(use_enable stats wxcas) |
107 |
+ ) |
108 |
+ else |
109 |
+ myconf+=( |
110 |
+ --disable-monolithic |
111 |
+ --disable-amule-gui |
112 |
+ --disable-alc |
113 |
+ --disable-wxcas |
114 |
+ ) |
115 |
+ fi |
116 |
+ |
117 |
+ econf "${myconf[@]}" |
118 |
+} |
119 |
+ |
120 |
+src_install() { |
121 |
+ default |
122 |
+ |
123 |
+ if use daemon; then |
124 |
+ newconfd "${FILESDIR}"/amuled.confd-r1 amuled |
125 |
+ newinitd "${FILESDIR}"/amuled.initd amuled |
126 |
+ fi |
127 |
+ if use remote; then |
128 |
+ newconfd "${FILESDIR}"/amuleweb.confd-r1 amuleweb |
129 |
+ newinitd "${FILESDIR}"/amuleweb.initd amuleweb |
130 |
+ fi |
131 |
+ |
132 |
+ if use daemon || use remote; then |
133 |
+ keepdir /var/lib/${PN} |
134 |
+ fowners amule:amule /var/lib/${PN} |
135 |
+ fperms 0750 /var/lib/${PN} |
136 |
+ fi |
137 |
+} |
138 |
+ |
139 |
+pkg_postinst() { |
140 |
+ local ver |
141 |
+ |
142 |
+ if use daemon || use remote; then |
143 |
+ for ver in ${REPLACING_VERSIONS}; do |
144 |
+ if ver_test ${ver} -lt "2.3.2-r4"; then |
145 |
+ elog "Default user under which amuled and amuleweb daemons are started" |
146 |
+ elog "have been changed from p2p to amule. Default home directory have been" |
147 |
+ elog "changed as well." |
148 |
+ echo |
149 |
+ elog "If you want to preserve old download/share location, you can create" |
150 |
+ elog "symlink /var/lib/amule/.aMule pointing to the old location and adjust" |
151 |
+ elog "files ownership *or* restore AMULEUSER and AMULEHOME variables in" |
152 |
+ elog "/etc/conf.d/{amuled,amuleweb} to the old values." |
153 |
+ |
154 |
+ break |
155 |
+ fi |
156 |
+ done |
157 |
+ fi |
158 |
+ |
159 |
+ use X && xdg_desktop_database_update |
160 |
+} |
161 |
+ |
162 |
+pkg_postrm() { |
163 |
+ use X && xdg_desktop_database_update |
164 |
+} |