diff options
author | Stuart Shelton <stuart@shelton.me> | 2016-09-22 13:28:28 +0100 |
---|---|---|
committer | Stuart Shelton <stuart@shelton.me> | 2016-09-22 13:28:28 +0100 |
commit | 4df9f437423b25d34b5e49246929ef10b00fc9b0 (patch) | |
tree | c5f3bb7d7cb262f4b052a63e3a396f1e679d8b56 /net-dialup | |
parent | Add app-shells/bash-4.3_p46-r1 (diff) | |
download | srcshelton-4df9f437423b25d34b5e49246929ef10b00fc9b0.tar.gz srcshelton-4df9f437423b25d34b5e49246929ef10b00fc9b0.tar.bz2 srcshelton-4df9f437423b25d34b5e49246929ef10b00fc9b0.zip |
Add net-dialup/freeradius-2.2.9-r2
Diffstat (limited to 'net-dialup')
-rw-r--r-- | net-dialup/freeradius/Manifest | 1 | ||||
-rw-r--r-- | net-dialup/freeradius/freeradius-2.2.9-r2.ebuild | 197 |
2 files changed, 198 insertions, 0 deletions
diff --git a/net-dialup/freeradius/Manifest b/net-dialup/freeradius/Manifest index eeb5019f..14b839b9 100644 --- a/net-dialup/freeradius/Manifest +++ b/net-dialup/freeradius/Manifest @@ -7,4 +7,5 @@ DIST freeradius-server-2.2.9.tar.gz 4424239 SHA256 e1b8fcdb7467719ecd760678b628a EBUILD freeradius-2.2.5-r1.ebuild 4947 SHA256 ef3918089d1c3307c6c4b7eae853a3cc9e6ff7ea0e755141094c77ad2ac5e21e SHA512 5b2d67d7e74e41acca9cf21fee5a523e1d85c5c9b540300a0c52a90fd029418f01a61e028532d928de4ec8dc97c08465401eb91c30178a4d55d8ee66fcc11e9f WHIRLPOOL 4adfc823813a15a89922c0bfb3fbeac8f046e8075287d5d3cb0f808607834592a3bf4c90a8b656e64a36045c0933b0bf35aaef29b70ee95f7ebd20009a858c72 EBUILD freeradius-2.2.5.ebuild 4947 SHA256 75e31a66a3343eede94756ae1690f14cbf71bc245e1190c9308566453d8f4a2a SHA512 7d49f71d469087b3eb3cd48b1294ac0336a1b6af67dfb8e213ff055ef5d0decce3fd10127ac33259eb75e1d5087c052befa6b7ec8d1d667764687d623ff88570 WHIRLPOOL 2d1a0b72042075ee195fd37fff3f794afc49debb3cdad1078097c3947762fc9465acbaec5f25927b903529307456c2434dd33f1ea8d61858f806178b31a87867 EBUILD freeradius-2.2.9-r1.ebuild 5226 SHA256 c7a2124d144fe1ed6b44e82dd6234dfe1882e8c32468202566a53c4d2fe38e44 SHA512 08f7924d1c6586039a486ec202896d328cd71a67d2c927c495a2e66035966cae88849e84b2852aefeb48fdf7aaa704cde697f628953a4a85183f5b309bd940f8 WHIRLPOOL f93963ed5b7109c9fc29afcbe6c8ed38117a5d9b8d56c3e7a0d7f15d5e4ea0d2924d93774b1a4af6fd574d8c008e91384f5f62b8fdee467e7593c1b5e3d8beec +EBUILD freeradius-2.2.9-r2.ebuild 5228 SHA256 36e12a97db626f42c86dcb35b3635cf63b597253b5dd70f4d04cd0bcf8b19ea4 SHA512 e242b8424a061587ae36a67a5ea89e3be0bf1c5f068ed4dc7c22406ddbc1dc6ae01833009d6d59bb617f82b33651dd710df542865e7540d789fb8c0ac8acbc88 WHIRLPOOL 7cd2201b4a91cf3eb419cbed241c96629c5d5c44a0292b2b9905d847ec8ff58bad687b98e422c5056d8612b9f637d3d8f6dd21db1bf09bfd01a7bbcfeef5dff6 EBUILD freeradius-2.2.9.ebuild 5227 SHA256 ece53949482aa88388f051cf1c7482a52a44397caf0836fd56b35b897dbe7e89 SHA512 9cb3c36e71d31d12ceb33ab2ad07b3da042bd2d947641af3a7bd3f3b3344d08d9df508cd66f7baff02ef3cf4404623740d17b13810578dc7b0362c58ee31724c WHIRLPOOL aa6b54ca27cc8a46435d1a9357f4a284bdb4b389118290060787d0f1a64514d78311a50f2d6aebdfbfe791866f2e5294da77bc75e491857e72856e2787d47c8d diff --git a/net-dialup/freeradius/freeradius-2.2.9-r2.ebuild b/net-dialup/freeradius/freeradius-2.2.9-r2.ebuild new file mode 100644 index 00000000..d64238a2 --- /dev/null +++ b/net-dialup/freeradius/freeradius-2.2.9-r2.ebuild @@ -0,0 +1,197 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id: 1ee8990b5e78daa0545337cce50dbd5cc8c581b1 $ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +inherit autotools eutils pam python-any-r1 user + +PATCHSET=4 + +MY_P="${PN}-server-${PV}" + +DESCRIPTION="Highly configurable free RADIUS server" +SRC_URI=" + ftp://ftp.freeradius.org/pub/radius/${MY_P}.tar.gz + ftp://ftp.freeradius.org/pub/radius/old/${MY_P}.tar.gz + https://dev.gentoo.org/~flameeyes/${PN}/${PN}-2.2.0-patches-${PATCHSET}.tar.xz + +" +HOMEPAGE="http://www.freeradius.org/" + +KEYWORDS="amd64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd" +LICENSE="GPL-2" +SLOT="0" + +IUSE=" + debug firebird iodbc kerberos ldap mysql odbc oracle pam pcap + postgres python readline sqlite ssl +" +RESTRICT="firebird? ( bindist )" + +RDEPEND="!net-dialup/cistronradius + !net-dialup/gnuradius + sys-devel/libtool + dev-lang/perl:= + sys-libs/gdbm + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:0= ) + pcap? ( net-libs/libpcap ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + firebird? ( dev-db/firebird ) + pam? ( virtual/pam ) + ssl? ( dev-libs/openssl:0= ) + ldap? ( net-nds/openldap ) + kerberos? ( virtual/krb5 ) + sqlite? ( dev-db/sqlite:3 ) + odbc? ( dev-db/unixODBC ) + iodbc? ( dev-db/libiodbc ) + oracle? ( dev-db/oracle-instantclient-basic )" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup radius + enewuser radius -1 -1 /var/log/radius radius + + python-any-r1_pkg_setup + export PYTHONBIN="${EPYTHON}" +} + +src_prepare() { + eapply \ + "${WORKDIR}"/patches/0002*patch \ + "${WORKDIR}"/patches/0004*patch \ + "${FILESDIR}"/${PN}-2.2.5-gentoo.patch + + # most of the configuration options do not appear as ./configure + # switches. Instead it identifies the directories that are available + # and run through them. These might check for the presence of + # various libraries, in which case they are not built. To avoid + # automagic dependencies, we just remove all the modules that we're + # not interested in using. + + use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; } + use ldap || { rm -r src/modules/rlm_ldap || die ; } + use kerberos || { rm -r src/modules/rlm_krb5 || die ; } + use pam || { rm -r src/modules/rlm_pam || die ; } + use python || { rm -r src/modules/rlm_python || die ; } + # Do not install ruby rlm module, bug #483108 + rm -r src/modules/rlm_ruby || die + + # these are all things we don't have in portage/I don't want to deal + # with myself + rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library + rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2 + rm -r src/modules/rlm_opendirectory || die # requires some membership.h + rm -r src/modules/rlm_redis{,who} || die # requires redis + rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds,sybase} || die + + # sql drivers that are not part of experimental are loaded from a + # file, so we have to remove them from the file itself when we + # remove them. + usesqldriver() { + local flag=$1 + local driver=rlm_sql_${2:-${flag}} + + if ! use ${flag}; then + rm -r src/modules/rlm_sql/drivers/${driver} || die + sed -i -e /${driver}/d src/modules/rlm_sql/stable || die + fi + } + + usesqldriver mysql + usesqldriver postgres postgresql + usesqldriver firebird + usesqldriver iodbc + usesqldriver odbc unixodbc + usesqldriver oracle + usesqldriver sqlite + + # remove bundled ltdl to avoid conflicts + rm -r libltdl + + default + + eautoreconf +} + +src_configure() { + # fix bug #77613 + if has_version app-crypt/heimdal; then + myconf+=( --enable-heimdal-krb5 ) + fi + + use readline || export ac_cv_lib_readline=no + use pcap || export ac_cv_lib_pcap_pcap_open_live=no + + # do not try to enable static with static-libs; upstream is a + # massacre of libtool best practices so you also have to make sure + # to --enable-shared explicitly. + econf \ + --enable-shared --disable-static \ + --disable-ltdl-install \ + --with-system-libtool \ + --with-system-libltdl \ + --with-ascend-binary \ + --with-udpfromto \ + --with-dhcp \ + --with-iodbc-include-dir=/usr/include/iodbc \ + --with-experimental-modules \ + --with-docdir=/usr/share/doc/${PF} \ + --with-logdir=/var/log/radius \ + $(use_enable debug developer) \ + $(use_with ldap edir) \ + $(use_with ssl openssl) \ + ${myconf[@]} +} + +src_compile() { + emake LIBTOOL=libtool +} + +src_install() { + dodir /etc + diropts -m0750 -o root -g radius + dodir /etc/raddb + diropts -m0750 -o radius -g radius + dodir /var/log/radius + keepdir /var/log/radius/radacct + diropts + + emake LIBTOOL=libtool R="${D}" install + + fowners -R root:radius /etc/raddb + + # Fix pidfile location (#546482) + # (localstatedir == /var/lib) + sed \ + '/^run_dir =/s@${localstatedir}@/var@' \ + -i "${D}"/etc/raddb/radiusd.conf || die + + pamd_mimic_system radiusd auth account password session + + dodoc CREDITS + + rm "${D}/usr/sbin/rc.radiusd" || die + + newinitd "${FILESDIR}/radius.init-r3" radiusd + newconfd "${FILESDIR}/radius.conf-r3" radiusd +} + +pkg_config() { + if use ssl; then + cd "${ROOT}"/etc/raddb/certs + ./bootstrap + fi +} + +pkg_preinst() { + if ! has_version ${CATEGORY}/${PN} && use ssl; then + elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able" + elog "to start the radiusd service." + fi +} |