1 |
commit: 2784a682377000f2cf606029c7462a52bcd625ef |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 18 07:57:05 2017 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 18 07:57:05 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2784a682 |
7 |
|
8 |
net-dialup/freeradius: Bump to version 3.0.15 |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
11 |
|
12 |
net-dialup/freeradius/Manifest | 1 + |
13 |
net-dialup/freeradius/freeradius-3.0.15.ebuild | 225 +++++++++++++++++++++++++ |
14 |
2 files changed, 226 insertions(+) |
15 |
|
16 |
diff --git a/net-dialup/freeradius/Manifest b/net-dialup/freeradius/Manifest |
17 |
index 70e021568a1..1ca03b85b15 100644 |
18 |
--- a/net-dialup/freeradius/Manifest |
19 |
+++ b/net-dialup/freeradius/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST freeradius-server-3.0.14.tar.gz 4816144 SHA256 fcd6174d986a942db7a0defbccf6ffb6e692264a87915659493abb466c075909 SHA512 5f81f09a843bf59b16ed4c9c311013e3e839911ed926c56151502a00bb86cc3a593906059ec08b994cfbc4c36d1bc6005d62c5d253ddb5cc3894324c4aaeb308 WHIRLPOOL f679bd442ffc43fe6535a29e345290efa46837f2b31e5789920b9844b01a874ccc2bec6466bf99c6f60c587926a58cd537d4817def16fa89411ead9200c4a1e3 |
22 |
+DIST freeradius-server-3.0.15.tar.gz 4818244 SHA256 fd29c5eda3f69f2d823d07745d24a80197df3c1284f2efe6a15f76e16271cfe3 SHA512 9b92045b445032bde9d421499fdc0f6a08d602c501730c31a8d3974b21cc5c12c78abb024ed62a176c7aa7fe260fe1d19386aaf558e0fecfcd3a0ba7aa47499c WHIRLPOOL 102719d62417870bad1c698d3e999cf3829397f8b310c898d7cbb551a44bdbf302dd9e4e2610287c281318930f057446f20b3f994c56ceeadf0864795c92a5d0 |
23 |
|
24 |
diff --git a/net-dialup/freeradius/freeradius-3.0.15.ebuild b/net-dialup/freeradius/freeradius-3.0.15.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..e5c5443ca3c |
27 |
--- /dev/null |
28 |
+++ b/net-dialup/freeradius/freeradius-3.0.15.ebuild |
29 |
@@ -0,0 +1,225 @@ |
30 |
+# Copyright 1999-2017 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=6 |
34 |
+ |
35 |
+PYTHON_COMPAT=( python2_7 ) |
36 |
+inherit autotools pam python-single-r1 systemd user |
37 |
+ |
38 |
+MY_P="${PN}-server-${PV}" |
39 |
+ |
40 |
+DESCRIPTION="Highly configurable free RADIUS server" |
41 |
+SRC_URI=" |
42 |
+ ftp://ftp.freeradius.org/pub/radius/${MY_P}.tar.gz |
43 |
+ ftp://ftp.freeradius.org/pub/radius/old/${MY_P}.tar.gz |
44 |
+" |
45 |
+HOMEPAGE="http://www.freeradius.org/" |
46 |
+ |
47 |
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
48 |
+LICENSE="GPL-2" |
49 |
+SLOT="0" |
50 |
+ |
51 |
+IUSE=" |
52 |
+ debug firebird iodbc kerberos ldap mysql odbc oracle pam pcap |
53 |
+ postgres python readline sqlite ssl |
54 |
+" |
55 |
+RESTRICT="test firebird? ( bindist )" |
56 |
+ |
57 |
+RDEPEND="!net-dialup/cistronradius |
58 |
+ !net-dialup/gnuradius |
59 |
+ sys-devel/libtool |
60 |
+ dev-lang/perl:= |
61 |
+ sys-libs/gdbm |
62 |
+ sys-libs/talloc |
63 |
+ python? ( ${PYTHON_DEPS} ) |
64 |
+ readline? ( sys-libs/readline:0= ) |
65 |
+ pcap? ( net-libs/libpcap ) |
66 |
+ mysql? ( virtual/mysql ) |
67 |
+ postgres? ( dev-db/postgresql:= ) |
68 |
+ firebird? ( dev-db/firebird ) |
69 |
+ pam? ( virtual/pam ) |
70 |
+ ssl? ( dev-libs/openssl:0= ) |
71 |
+ ldap? ( net-nds/openldap ) |
72 |
+ kerberos? ( virtual/krb5 ) |
73 |
+ sqlite? ( dev-db/sqlite:3 ) |
74 |
+ odbc? ( dev-db/unixODBC ) |
75 |
+ iodbc? ( dev-db/libiodbc ) |
76 |
+ oracle? ( dev-db/oracle-instantclient-basic )" |
77 |
+DEPEND="${RDEPEND}" |
78 |
+ |
79 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
80 |
+ |
81 |
+S="${WORKDIR}/${MY_P}" |
82 |
+ |
83 |
+pkg_setup() { |
84 |
+ enewgroup radius |
85 |
+ enewuser radius -1 -1 /var/log/radius radius |
86 |
+ |
87 |
+ python-single-r1_pkg_setup |
88 |
+ export PYTHONBIN="${EPYTHON}" |
89 |
+} |
90 |
+ |
91 |
+src_prepare() { |
92 |
+ # most of the configuration options do not appear as ./configure |
93 |
+ # switches. Instead it identifies the directories that are available |
94 |
+ # and run through them. These might check for the presence of |
95 |
+ # various libraries, in which case they are not built. To avoid |
96 |
+ # automagic dependencies, we just remove all the modules that we're |
97 |
+ # not interested in using. |
98 |
+ |
99 |
+ use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; } |
100 |
+ use ldap || { rm -r src/modules/rlm_ldap || die ; } |
101 |
+ use kerberos || { rm -r src/modules/rlm_krb5 || die ; } |
102 |
+ use pam || { rm -r src/modules/rlm_pam || die ; } |
103 |
+ use python || { rm -r src/modules/rlm_python || die ; } |
104 |
+ # Do not install ruby rlm module, bug #483108 |
105 |
+ rm -r src/modules/rlm_ruby || die |
106 |
+ |
107 |
+ # these are all things we don't have in portage/I don't want to deal |
108 |
+ # with myself |
109 |
+ rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library |
110 |
+ rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2 |
111 |
+ rm -r src/modules/rlm_opendirectory || die # requires some membership.h |
112 |
+ rm -r src/modules/rlm_redis{,who} || die # requires redis |
113 |
+ rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds} || die |
114 |
+ |
115 |
+ # sql drivers that are not part of experimental are loaded from a |
116 |
+ # file, so we have to remove them from the file itself when we |
117 |
+ # remove them. |
118 |
+ usesqldriver() { |
119 |
+ local flag=$1 |
120 |
+ local driver=rlm_sql_${2:-${flag}} |
121 |
+ |
122 |
+ if ! use ${flag}; then |
123 |
+ rm -r src/modules/rlm_sql/drivers/${driver} || die |
124 |
+ sed -i -e /${driver}/d src/modules/rlm_sql/stable || die |
125 |
+ fi |
126 |
+ } |
127 |
+ |
128 |
+ sed -i \ |
129 |
+ -e 's:^#\tuser = :\tuser = :g' \ |
130 |
+ -e 's:^#\tgroup = :\tgroup = :g' \ |
131 |
+ -e 's:/var/run/radiusd:/run/radiusd:g' \ |
132 |
+ -e '/^run_dir/s:${localstatedir}::g' \ |
133 |
+ raddb/radiusd.conf.in || die |
134 |
+ |
135 |
+ # verbosity |
136 |
+ # build shared libraries using jlibtool --shared |
137 |
+ sed -i \ |
138 |
+ -e '/$(LIBTOOL)/s|--quiet ||g' \ |
139 |
+ -e 's:--mode=\(compile\|link\):& --shared:g' \ |
140 |
+ Make.inc.in || die |
141 |
+ |
142 |
+ sed -i \ |
143 |
+ -e 's|--silent ||g' \ |
144 |
+ -e 's:--mode=\(compile\|link\):& --shared:g' \ |
145 |
+ scripts/libtool.mk || die |
146 |
+ |
147 |
+ # crude measure to stop jlibtool from running ranlib and ar |
148 |
+ sed -i \ |
149 |
+ -e '/LIBRARIAN/s|".*"|"true"|g' \ |
150 |
+ -e '/RANLIB/s|".*"|"true"|g' \ |
151 |
+ scripts/jlibtool.c || die |
152 |
+ |
153 |
+ usesqldriver mysql |
154 |
+ usesqldriver postgres postgresql |
155 |
+ usesqldriver firebird |
156 |
+ usesqldriver iodbc |
157 |
+ usesqldriver odbc unixodbc |
158 |
+ usesqldriver oracle |
159 |
+ usesqldriver sqlite |
160 |
+ |
161 |
+ default |
162 |
+ |
163 |
+ eautoreconf |
164 |
+} |
165 |
+ |
166 |
+src_configure() { |
167 |
+ # fix bug #77613 |
168 |
+ local myeconfargs=() |
169 |
+ if has_version app-crypt/heimdal; then |
170 |
+ myeconfargs+=( --enable-heimdal-krb5 ) |
171 |
+ fi |
172 |
+ |
173 |
+ use readline || export ac_cv_lib_readline=no |
174 |
+ use pcap || export ac_cv_lib_pcap_pcap_open_live=no |
175 |
+ |
176 |
+ # do not try to enable static with static-libs; upstream is a |
177 |
+ # massacre of libtool best practices so you also have to make sure |
178 |
+ # to --enable-shared explicitly. |
179 |
+ myeconfargs+=( |
180 |
+ --enable-shared |
181 |
+ --disable-static |
182 |
+ --disable-ltdl-install |
183 |
+ --with-system-libtool |
184 |
+ --with-system-libltdl |
185 |
+ --with-ascend-binary |
186 |
+ --with-udpfromto |
187 |
+ --with-dhcp |
188 |
+ --with-iodbc-include-dir=/usr/include/iodbc |
189 |
+ --with-experimental-modules |
190 |
+ --with-docdir=/usr/share/doc/${PF} |
191 |
+ --with-logdir=/var/log/radius |
192 |
+ $(use_enable debug developer) |
193 |
+ $(use_with ldap edir) |
194 |
+ $(use_with ssl openssl) |
195 |
+ ) |
196 |
+ econf "${myeconfargs[@]}" |
197 |
+} |
198 |
+ |
199 |
+src_compile() { |
200 |
+ # verbose, do not generate certificates |
201 |
+ emake \ |
202 |
+ Q='' ECHO=true \ |
203 |
+ LOCAL_CERT_PRODUCTS='' |
204 |
+} |
205 |
+ |
206 |
+src_install() { |
207 |
+ dodir /etc |
208 |
+ diropts -m0750 -o root -g radius |
209 |
+ dodir /etc/raddb |
210 |
+ diropts -m0750 -o radius -g radius |
211 |
+ dodir /var/log/radius |
212 |
+ keepdir /var/log/radius/radacct |
213 |
+ diropts |
214 |
+ |
215 |
+ # verbose, do not install certificates |
216 |
+ # Parallel install fails (#509498) |
217 |
+ emake -j1 \ |
218 |
+ Q='' ECHO=true \ |
219 |
+ LOCAL_CERT_PRODUCTS='' \ |
220 |
+ R="${D}" \ |
221 |
+ install |
222 |
+ |
223 |
+ fowners -R root:radius /etc/raddb |
224 |
+ |
225 |
+ pamd_mimic_system radiusd auth account password session |
226 |
+ |
227 |
+ dodoc CREDITS |
228 |
+ |
229 |
+ rm "${D}/usr/sbin/rc.radiusd" || die |
230 |
+ |
231 |
+ newinitd "${FILESDIR}/radius.init-r3" radiusd |
232 |
+ newconfd "${FILESDIR}/radius.conf-r4" radiusd |
233 |
+ |
234 |
+ systemd_newtmpfilesd "${FILESDIR}"/freeradius.tmpfiles freeradius.conf |
235 |
+ systemd_dounit "${FILESDIR}"/freeradius.service |
236 |
+ |
237 |
+ find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die |
238 |
+} |
239 |
+ |
240 |
+pkg_config() { |
241 |
+ if use ssl; then |
242 |
+ cd "${ROOT}"/etc/raddb/certs |
243 |
+ ./bootstrap |
244 |
+ |
245 |
+ chown -R root:radius "${ROOT}"/etc/raddb/certs |
246 |
+ fi |
247 |
+} |
248 |
+ |
249 |
+pkg_preinst() { |
250 |
+ if ! has_version ${CATEGORY}/${PN} && use ssl; then |
251 |
+ elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able" |
252 |
+ elog "to start the radiusd service." |
253 |
+ fi |
254 |
+} |