diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /www-apps/freeradius-dialupadmin |
reinit the tree, so we can have metadata
Diffstat (limited to 'www-apps/freeradius-dialupadmin')
8 files changed, 381 insertions, 0 deletions
diff --git a/www-apps/freeradius-dialupadmin/Manifest b/www-apps/freeradius-dialupadmin/Manifest new file mode 100644 index 000000000000..76956c6b2913 --- /dev/null +++ b/www-apps/freeradius-dialupadmin/Manifest @@ -0,0 +1,11 @@ +AUX freeradius-dialupadmin-1.70.3-sqldebug.patch 370 SHA256 ee25d726bddaa4b29d8146a5d1574e0253a4dbb1786fcfaa4903e9bb8735f844 SHA512 41b4902a452bd051e4e4b80b8661154806f276da99b0fa17baee0f9c45927b6abd41815fc19f8a89b481e7855eaf92c1bff3e53c4deaa5b9dc1d00c7626a7297 WHIRLPOOL ed6d165f96fe1d856985a21cac9467bedd1f7866208a0c51de50441442f12185c2247b3c331ee5ba9532b34b75ffb4c48aec33708d9afd6d8c0ff489e9fff186 +AUX freeradius-dialupadmin-1.80-gentoo.patch 1162 SHA256 0efb7da6e8d37214c7042a5e5f96cee0649e79094abde5a0a89a2024e2d7f17d SHA512 a6b0cc0601ea8365dcad2804d6130e95ef9258c0445b8a7a82583fb93f1b80fb6d8e264387219b891f47ee618ccf7912c6880af1d7bc06335a957324bdc4c36d WHIRLPOOL 3d3c199ff891ec5349004c660e9530670f06e0e1ec70a4e6b670506ced605254c79803b6859063afce6984fa21cd71f8c6d4fa65c9f7ce8ef301a37a063a702d +AUX freeradius-dialupadmin-1.80-tmpfile.patch 8171 SHA256 268dc9012720a35741cbf7c59874274a3ebb9f48a0d53c7759ed14d174a75bb2 SHA512 5726e15b43ed52cd0f548933bc9c12fbcae8fb15a60e1ef0074bc7c2e4d85475145e4ddba669a84c7330f404e462d174301b11c9596c11e2f957e17fbaf97695 WHIRLPOOL 7fa482b05da0bf1b5bfb527b8bf42ddbe0840964df6e63fa565231aa409c2e00a8a8cd7b8f397b4b7667af67383a238c175b49d4af5b16fb09033f1f265a3dcc +AUX setrootpath 200 SHA256 4088512950a512a6c1b02e0355e00750dca37136ec32611a0099d00fdbdd54de SHA512 efa8c8ca5242f2b51b46ab25876bdf4cc3ca789a706567cad5e6e8889bcc94fff8b6bebfa8e1416d9f7a6ce8c832f37b17261516d79b970619ba024d8be10f38 WHIRLPOOL 222fb07dd00d10541019db58b4e50c244beaa864f831cc35e7d12b906fb94cebdf4e197b1bb200b4183b5a72ea25467beeb3cf1d176dadb61fab0e79f12cdba4 +DIST freeradius-1.1.6.tar.gz 3175652 SHA256 d503bac14ca37eab4798f6ab3dbdfb744aa846f7dc76ded45966d127948e71f8 SHA512 437a1705d559849bce3c11216b0b25392668ee96300d455a2ae92b6ca233f0308eca62c06d659f26900509855237f7d17c5eb566b13bbc4cda8999a18da4b8a1 WHIRLPOOL ad484519bb073fe6e399477b2b9cc2c1d38d4a75efaa77d4516fb29a4ccc2d4cc7f8f92df697fa79b8c241d1639478bcddc79b4a57ccab3eb94a6bb0b12a48f7 +DIST freeradius-server-2.1.1.tar.gz 3648766 SHA256 48139053bd4498e6ef0535178059286fafd5ad6642b0348936060fd373194147 SHA512 68f9abda7f3219ab2be6393021866ac3fda5302aa2cae85877666f3db86a09f293286003815e596cb1dfd67479b6577f7568d412953b7a2d22a7cbdc00c71b88 WHIRLPOOL 47a7b98009f6d71b8e38420b441b477713b6cf3aaca52e66d92d593b2f97744030e0ee668e1080a452b7bfe2d186ffaba5309fd4decdd6048f6fa8d3d52d460d +EBUILD freeradius-dialupadmin-1.70.3.ebuild 1879 SHA256 6e52fe4c2105d5e420ffdbde22e2c84641af999356cbc4135eeaae461d55a5f2 SHA512 a74d0724cf2a9b453ea46ae53d9e268804fe9efed5aba1752d630ef2ceeea5dc56f39d7f64705934578beeccaeecc9cc675b5b7b92aede12735b2e5b190c6906 WHIRLPOOL abf68f71f5e622f3e5b4b155c57a928795a1327950d2e39bf3bd3d2dce0b35435ebdd78d0eb5e082db63e93957ff61e85d26b304dcf20e6cb5a2528e06007120 +EBUILD freeradius-dialupadmin-1.80.ebuild 1952 SHA256 52de6259b14b33b600d0c5fe67546f1dae1fe46a0a47b5be2baaf67f30d307ff SHA512 e423fb6e5f727a97c6d00211f6e71b67f1df96032696d8774f027b32877865485708461ae300f8eab01c8081d230a66b2c16bf0a85b8ea3ac7634be1e1f91048 WHIRLPOOL 355d6e79245e06fdcfc370a7807a78306b4ad00378936d331ba62108776414024b9c3af23f3a276de837e104c18991361a4f6c5bb54d48b94c1dab32a94ab089 +MISC ChangeLog 2972 SHA256 45f7ca391c87260bb4c1db6a0bdd39ab631d9974d0bab492862fbdbcab079864 SHA512 d6e74e2179311064e341fffb4414e670299e210b6790462ff33dd5425e4eb2447baffed455bd7a6e9ae03798ce3f67c1235e5a7518bb29c32f40ca7e9d71eb45 WHIRLPOOL 45df43b0d16f272938c9163edf0d549ab5cb978fac9bbf102a33341e8da26694c4ccab5679a4d367f039208f419f2fa5e3052d3abe035fab0b627cac433d5085 +MISC ChangeLog-2015 2512 SHA256 d61f24b26151b2bf94acd194b6ebf69d7473304679be874717198108332af861 SHA512 1166b5ab47add27284cd98f33399ddc66243dede10193202ce685a10971dd0de7402110db71dc9843554ef95ddd2a01fd7dd040b1d8aed2691b34e835e135c79 WHIRLPOOL b2eee5284df86141fec279cb1cb7614b8e94d439cc0dd72e73ba4ae0c9e5f750ab17211aa0120eb400f8b4f2ce81f35c482e55bdbd6faec4f50e5658b4d27af0 +MISC metadata.xml 534 SHA256 95e4bfb933911abd22acf3ad7bd0481b01bf6a538c470f41e8db5ded0525c164 SHA512 546c777bb50229dcf29c18d4f62a78c20e2715e49f97134c397133d632423b683426da3f37ceb7e1ccbcf392ed4dce6e5c97fb702d256a71844b09db074c845e WHIRLPOOL 9366c4b2f9bf9fe3a1a0134483c43ec8c883a92b438c4fdf2a2e3f0fbd10f79b17ed7bfada2e2f06160f075ec6e2535d18c04eae68367f9ab749d0e255a36b18 diff --git a/www-apps/freeradius-dialupadmin/files/freeradius-dialupadmin-1.70.3-sqldebug.patch b/www-apps/freeradius-dialupadmin/files/freeradius-dialupadmin-1.70.3-sqldebug.patch new file mode 100644 index 000000000000..1fab1838917b --- /dev/null +++ b/www-apps/freeradius-dialupadmin/files/freeradius-dialupadmin-1.70.3-sqldebug.patch @@ -0,0 +1,11 @@ +--- dialup_admin/conf/admin.conf~ 2005-07-24 17:32:01.000000000 -0400 ++++ dialup_admin/conf/admin.conf 2005-07-24 17:32:24.000000000 -0400 +@@ -247,7 +247,7 @@ + # + # Uncomment to enable sql debug + # +-sql_debug: true ++#sql_debug: true + # + # If set to yes then the HTTP credentials (http authentication) + # will be used to connect to the sql server instead of sql_username diff --git a/www-apps/freeradius-dialupadmin/files/freeradius-dialupadmin-1.80-gentoo.patch b/www-apps/freeradius-dialupadmin/files/freeradius-dialupadmin-1.80-gentoo.patch new file mode 100644 index 000000000000..7501ba11f1e4 --- /dev/null +++ b/www-apps/freeradius-dialupadmin/files/freeradius-dialupadmin-1.80-gentoo.patch @@ -0,0 +1,32 @@ +diff -Nru freeradius-server-2.1.1.orig/dialup_admin/Makefile freeradius-server-2.1.1/dialup_admin/Makefile +--- freeradius-server-2.1.1.orig/dialup_admin/Makefile 2008-10-12 10:13:16.000000000 +0000 ++++ freeradius-server-2.1.1/dialup_admin/Makefile 2008-10-12 10:16:16.000000000 +0000 +@@ -4,7 +4,6 @@ + # Version: $Id$ + # + +-include ../Make.inc + + DIALUP_PREFIX := /usr/local/dialup_admin + DIALUP_DOCDIR := $(DIALUP_PREFIX)/doc +diff -Nru freeradius-server-2.1.1.orig/dialup_admin/conf/admin.conf freeradius-server-2.1.1/dialup_admin/conf/admin.conf +--- freeradius-server-2.1.1.orig/dialup_admin/conf/admin.conf 2008-09-25 08:41:26.000000000 +0000 ++++ freeradius-server-2.1.1/dialup_admin/conf/admin.conf 2008-10-12 09:14:12.000000000 +0000 +@@ -204,7 +204,7 @@ + # + # Uncomment to enable ldap debug + # +-ldap_debug: true ++#ldap_debug: true + # + # Allow for defining the ldap filter used when searching for a user + # Variables supported: +@@ -274,7 +274,7 @@ + # + # Uncomment to enable sql debug + # +-sql_debug: true ++#sql_debug: true + # + # If set to yes then the HTTP credentials (http authentication) + # will be used to connect to the sql server instead of sql_username diff --git a/www-apps/freeradius-dialupadmin/files/freeradius-dialupadmin-1.80-tmpfile.patch b/www-apps/freeradius-dialupadmin/files/freeradius-dialupadmin-1.80-tmpfile.patch new file mode 100644 index 000000000000..1da5671761ff --- /dev/null +++ b/www-apps/freeradius-dialupadmin/files/freeradius-dialupadmin-1.80-tmpfile.patch @@ -0,0 +1,148 @@ +diff -Nru freeradius-server-2.1.1.orig/dialup_admin/bin/clean_radacct freeradius-server-2.1.1/dialup_admin/bin/clean_radacct +--- freeradius-server-2.1.1.orig/dialup_admin/bin/clean_radacct 2008-09-25 08:41:26.000000000 +0000 ++++ freeradius-server-2.1.1/dialup_admin/bin/clean_radacct 2008-10-12 09:29:50.000000000 +0000 +@@ -5,6 +5,7 @@ + # Works with mysql and postgresql + # + use POSIX; ++use File::Temp; + + $conf=shift||'/usr/local/dialup_admin/conf/admin.conf'; + $back_days = 35; +@@ -42,11 +43,10 @@ + + $query = "DELETE FROM $sql_accounting_table WHERE AcctStopTime IS NULL AND AcctStartTime < '$date';"; + print "$query\n"; +-open TMP, ">/tmp/clean_radacct.query" +- or die "Could not open tmp file\n"; +-print TMP $query; +-close TMP; +-$command = "$sqlcmd -h$sql_server -u$sql_username $sql_password $sql_database </tmp/clean_radacct.query" if ($sql_type eq 'mysql'); +-$command = "$sqlcmd -U $sql_username -f /tmp/clean_radacct.query $sql_database" if ($sql_type eq 'pg'); +-$command = "$sqlcmd '$sql_server' '$sql_port' '' '$sql_username' '$sql_password' </tmp/clean_radacct.query" if ($sql_type eq 'sqlrelay'); ++my ($fh, $tmp_filename) = tempfile() or die "Could not open tmp file\n"; ++print $fh $query; ++close $fh; ++$command = "$sqlcmd -h$sql_server -u$sql_username $sql_password $sql_database < $tmp_filename" if ($sql_type eq 'mysql'); ++$command = "$sqlcmd -U $sql_username -f $tmp_filename $sql_database" if ($sql_type eq 'pg'); ++$command = "$sqlcmd '$sql_server' '$sql_port' '' '$sql_username' '$sql_password' < $tmp_filename" if ($sql_type eq 'sqlrelay'); + `$command`; +diff -Nru freeradius-server-2.1.1.orig/dialup_admin/bin/log_badlogins freeradius-server-2.1.1/dialup_admin/bin/log_badlogins +--- freeradius-server-2.1.1.orig/dialup_admin/bin/log_badlogins 2008-09-25 08:41:26.000000000 +0000 ++++ freeradius-server-2.1.1/dialup_admin/bin/log_badlogins 2008-10-12 10:09:58.000000000 +0000 +@@ -14,6 +14,7 @@ + + use Date::Manip qw(ParseDate UnixDate); + use Digest::MD5; ++use File::Temp; + $|=1; + + $file=shift||'none'; +@@ -29,7 +30,8 @@ + # CHANGE THESE TO MATCH YOUR SETUP + # + #$regexp = 'from client localhost port 135|from client blabla '; +-$tmpfile='/var/tmp/sql.input'; ++$tmpdir=tempdir( CLEANUP => 1 ); ++$tmpfile="$tmpdir/sql.input"; + # + $verbose = 0; + # +diff -Nru freeradius-server-2.1.1.orig/dialup_admin/bin/monthly_tot_stats freeradius-server-2.1.1/dialup_admin/bin/monthly_tot_stats +--- freeradius-server-2.1.1.orig/dialup_admin/bin/monthly_tot_stats 2008-09-25 08:41:26.000000000 +0000 ++++ freeradius-server-2.1.1/dialup_admin/bin/monthly_tot_stats 2008-10-12 09:29:50.000000000 +0000 +@@ -1,5 +1,6 @@ + #!/usr/bin/perl + use POSIX; ++use File::Temp; + + # Log in the mtotacct table aggregated accounting information for + # each user spaning in one month period. +@@ -51,14 +52,13 @@ + AcctDate <= '$date_end' GROUP BY UserName,NASIPAddress;"; + print "$query1\n"; + print "$query2\n"; +-open TMP, ">/tmp/tot_stats.query" +- or die "Could not open tmp file\n"; +-print TMP "ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM';\n" if ($sql_type eq 'oracle'); +-print TMP $query1; +-print TMP $query2; +-close TMP; +-$command = "$sqlcmd -h $sql_server -u $sql_username $sql_password $sql_database </tmp/tot_stats.query" if ($sql_type eq 'mysql'); +-$command = "$sqlcmd -U $sql_username -f /tmp/tot_stats.query $sql_database" if ($sql_type eq 'pg'); ++my ($fh, $tmp_filename) = tempfile() or die "Could not open tmp file\n"; ++print $fh "ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM';\n" if ($sql_type eq 'oracle'); ++print $fh $query1; ++print $fh $query2; ++close $fh; ++$command = "$sqlcmd -h $sql_server -u $sql_username $sql_password $sql_database < $tmp_filename" if ($sql_type eq 'mysql'); ++$command = "$sqlcmd -U $sql_username -f $tmp_filename $sql_database" if ($sql_type eq 'pg'); + $command = "$sqlcmd $sql_username/$pass" . "@" . "$sql_database <$tmpfile.$server" if ($sql_type eq 'oracle'); +-$command = "$sqlcmd '$sql_server' '$sql_port' '' '$sql_username' '$sql_password' </tmp/tot_stats.query" if ($sql_type eq 'sqlrelay'); ++$command = "$sqlcmd '$sql_server' '$sql_port' '' '$sql_username' '$sql_password' < $tmp_filename" if ($sql_type eq 'sqlrelay'); + `$command`; +diff -Nru freeradius-server-2.1.1.orig/dialup_admin/bin/tot_stats freeradius-server-2.1.1/dialup_admin/bin/tot_stats +--- freeradius-server-2.1.1.orig/dialup_admin/bin/tot_stats 2008-09-25 08:41:26.000000000 +0000 ++++ freeradius-server-2.1.1/dialup_admin/bin/tot_stats 2008-10-12 09:29:50.000000000 +0000 +@@ -1,5 +1,6 @@ + #!/usr/bin/perl + use POSIX; ++use File::Temp; + + # Log in the totacct table aggregated daily accounting information for + # each user. +@@ -48,14 +49,13 @@ + AcctStopTime < '$date_end' GROUP BY UserName,NASIPAddress;"; + print "$query1\n"; + print "$query2\n"; +-open TMP, ">/tmp/tot_stats.query" +- or die "Could not open tmp file\n"; +-print TMP "ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM';\n" if ($sql_type eq 'oracle'); +-print TMP $query1; +-print TMP $query2; +-close TMP; +-$command = "$sqlcmd -h $sql_server -u $sql_username $sql_password $sql_database </tmp/tot_stats.query" if ($sql_type eq 'mysql'); +-$command = "$sqlcmd -U $sql_username -f /tmp/tot_stats.query $sql_database" if ($sql_type eq 'pg'); ++my ($fh, $tmp_filename) = tempfile() or die "Could not open tmp file\n"; ++print $fh "ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM';\n" if ($sql_type eq 'oracle'); ++print $fh $query1; ++print $fh $query2; ++close $fh; ++$command = "$sqlcmd -h $sql_server -u $sql_username $sql_password $sql_database < $tmp_filename" if ($sql_type eq 'mysql'); ++$command = "$sqlcmd -U $sql_username -f $tmp_filename $sql_database" if ($sql_type eq 'pg'); + $command = "$sqlcmd $sql_username/$pass" . "@" . "$sql_database <$tmpfile.$server" if ($sql_type eq 'oracle'); +-$command = "$sqlcmd '$sql_server' '$sql_port' '' '$sql_username' '$sql_password' </tmp/tot_stats.query" if ($sql_type eq 'sqlrelay'); ++$command = "$sqlcmd '$sql_server' '$sql_port' '' '$sql_username' '$sql_password' < $tmp_filename" if ($sql_type eq 'sqlrelay'); + `$command`; +diff -Nru freeradius-server-2.1.1.orig/dialup_admin/bin/truncate_radacct freeradius-server-2.1.1/dialup_admin/bin/truncate_radacct +--- freeradius-server-2.1.1.orig/dialup_admin/bin/truncate_radacct 2008-09-25 08:41:26.000000000 +0000 ++++ freeradius-server-2.1.1/dialup_admin/bin/truncate_radacct 2008-10-12 09:29:50.000000000 +0000 +@@ -5,6 +5,7 @@ + # Works with mysql and postgresql + # + use POSIX; ++use File::Temp; + + $conf=shift||'/usr/local/dialup_admin/conf/admin.conf'; + $back_days = 90; +@@ -44,13 +45,12 @@ + $query .= "DELETE FROM $sql_accounting_table WHERE AcctStopTime < '$date' AND AcctStopTime IS NOT NULL ;"; + $query .= "UNLOCK TABLES;" if ($sql_type eq 'mysql'); + print "$query\n"; +-open TMP, ">/tmp/truncate_radacct.query" +- or die "Could not open tmp file\n"; +-print TMP "ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM';\n" if ($sql_type eq 'oracle'); +-print TMP $query; +-close TMP; +-$command = "$sqlcmd -h$sql_server -u$sql_username $sql_password $sql_database </tmp/truncate_radacct.query" if ($sql_type eq 'mysql'); +-$command = "$sqlcmd -U $sql_username -f /tmp/truncate_radacct.query $sql_database" if ($sql_type eq 'pg'); ++my ($fh, $tmp_filename) = tempfile() or die "Could not open tmp file\n"; ++print $fh "ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF TZH:TZM';\n" if ($sql_type eq 'oracle'); ++print $fh $query; ++close $fh; ++$command = "$sqlcmd -h$sql_server -u$sql_username $sql_password $sql_database < $tmp_filename" if ($sql_type eq 'mysql'); ++$command = "$sqlcmd -U $sql_username -f $tmp_filename $sql_database" if ($sql_type eq 'pg'); + $command = "$sqlcmd $sql_username/$pass" . "@" . "$sql_database <$tmpfile.$server" if ($sql_type eq 'oracle'); +-$command = "$sqlcmd '$sql_server' '$sql_port' '' '$sql_username' '$sql_password' </tmp/truncate_radacct.query" if ($sql_type eq 'sqlrelay'); ++$command = "$sqlcmd '$sql_server' '$sql_port' '' '$sql_username' '$sql_password' < $tmp_filename" if ($sql_type eq 'sqlrelay'); + `$command`; diff --git a/www-apps/freeradius-dialupadmin/files/setrootpath b/www-apps/freeradius-dialupadmin/files/setrootpath new file mode 100644 index 000000000000..124364c291ac --- /dev/null +++ b/www-apps/freeradius-dialupadmin/files/setrootpath @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ "$1" = "install" ]; then + sed -i -e "s:/usr/\(local/\)\?dialup_admin:${VHOST_ROOT}:" "${VHOST_ROOT}"/{conf/._*admin.conf,conf/admin.conf,bin/*} + chmod -R o-rwx "${VHOST_ROOT}"/conf +fi diff --git a/www-apps/freeradius-dialupadmin/freeradius-dialupadmin-1.70.3.ebuild b/www-apps/freeradius-dialupadmin/freeradius-dialupadmin-1.70.3.ebuild new file mode 100644 index 000000000000..00b0e8d6afa6 --- /dev/null +++ b/www-apps/freeradius-dialupadmin/freeradius-dialupadmin-1.70.3.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit eutils webapp +MY_FREERADIUS_P="freeradius-1.1.6" + +DESCRIPTION="Web administration interface of freeradius server" +SRC_URI="ftp://ftp.freeradius.org/pub/radius/${MY_FREERADIUS_P}.tar.gz" +HOMEPAGE="http://www.freeradius.org/dialupadmin.html" + +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" +LICENSE="GPL-2" + +DEPEND="dev-lang/php + dev-perl/Date-Manip + sys-apps/findutils + >=net-dialup/${MY_FREERADIUS_P}" + +S="${WORKDIR}/${MY_FREERADIUS_P}/dialup_admin" + +src_unpack() { + unpack ${A} + + cd "${S}" + epatch "${FILESDIR}/${P}-sqldebug.patch" + + sed -i -e 's:/usr/local:/usr:' \ + -e 's:/usr/etc/raddb:${general_raddb_dir}:' \ + -e 's:/usr/radiusd::' \ + conf/admin.conf + sed -i -e 's:/usr/local:/usr:' bin/* + + #rename files .php3 -> .php + (find . -iname '*.php3' | ( + local PHPFILE + while read PHPFILE; do + mv "${PHPFILE}" "${PHPFILE/.php3/.php}" + done + )) && \ + (find . -type f | xargs sed -i -e 's:[.]php3:.php:g') || \ + die "failed to replace php3 with php" + + # remove cvs data + ecvs_clean + + # fix dangling ../ to deal with the way webapp-config installs files + find . -name '*.php' | xargs sed -i \ + -e 's:../conf/:../../conf/:' \ + -e 's:../html/:../../html/:' \ + -e 's:../lib/:../../lib/:' +} + +src_install() { + webapp_src_preinst + + insinto "${MY_HTDOCSDIR}" + doins -r htdocs/* + insinto "${MY_HOSTROOTDIR}" + doins -r conf html lib + exeinto "${MY_HOSTROOTDIR}/bin" + dodoc bin/*.cron bin/Changelog* + rm bin/*.cron bin/Changelog* + doexe bin/* + + insinto "${MY_SQLSCRIPTSDIR}" + doins sql/* + + dodoc Changelog README doc/* + + webapp_hook_script "${FILESDIR}/setrootpath" + + cd "${D}/${MY_HOSTROOTDIR}" + local CONFFILE + for CONFFILE in conf/* ; do + webapp_configfile "${MY_HOSTROOTDIR}/${CONFFILE}" + webapp_serverowned "${MY_HOSTROOTDIR}/${CONFFILE}" + done + + webapp_src_install +} diff --git a/www-apps/freeradius-dialupadmin/freeradius-dialupadmin-1.80.ebuild b/www-apps/freeradius-dialupadmin/freeradius-dialupadmin-1.80.ebuild new file mode 100644 index 000000000000..d2c682b129ad --- /dev/null +++ b/www-apps/freeradius-dialupadmin/freeradius-dialupadmin-1.80.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit eutils webapp +MY_FREERADIUS_PV="2.1.1" + +DESCRIPTION="Web administration interface of freeradius server" +SRC_URI="ftp://ftp.freeradius.org/pub/radius/freeradius-server-${MY_FREERADIUS_PV}.tar.gz" +HOMEPAGE="http://www.freeradius.org/dialupadmin.html" + +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" +LICENSE="GPL-2" + +DEPEND="sys-apps/findutils + sys-apps/sed" +RDEPEND="dev-lang/php + dev-perl/Date-Manip + >=net-dialup/freeradius-${MY_FREERADIUS_PV}" + +S="${WORKDIR}/freeradius-server-${MY_FREERADIUS_PV}/dialup_admin" + +src_unpack() { + unpack ${A} + + cd "${S}" + epatch "${FILESDIR}/${P}-gentoo.patch" + epatch "${FILESDIR}/${P}-tmpfile.patch" + + sed -i -e 's:/usr/local:/usr:' \ + -e 's:/usr/etc/raddb:${general_raddb_dir}:' \ + -e 's:/usr/radiusd::' \ + conf/admin.conf + sed -i -e 's:/usr/local:/usr:' bin/* + + #rename files .php3 -> .php + (find . -iname '*.php3' | ( + local PHPFILE + while read PHPFILE; do + mv "${PHPFILE}" "${PHPFILE/.php3/.php}" + done + )) && \ + (find . -type f | xargs sed -i -e 's:[.]php3:.php:g') || \ + die "failed to replace php3 with php" + + # fix dangling ../ to deal with the way webapp-config installs files + find . -name '*.php' | xargs sed -i \ + -e 's:../conf/:../../conf/:' \ + -e 's:../html/:../../html/:' \ + -e 's:../lib/:../../lib/:' +} + +src_install() { + webapp_src_preinst + + insinto "${MY_HTDOCSDIR}" + doins -r htdocs/* + insinto "${MY_HOSTROOTDIR}" + doins -r conf html lib + exeinto "${MY_HOSTROOTDIR}/bin" + dodoc bin/*.cron bin/Changelog* + rm bin/*.cron bin/Changelog* + doexe bin/* + + insinto "${MY_SQLSCRIPTSDIR}" + doins -r sql/* + + dodoc Changelog README doc/* + + webapp_hook_script "${FILESDIR}/setrootpath" + + cd "${D}/${MY_HOSTROOTDIR}" + local CONFFILE + for CONFFILE in conf/* ; do + webapp_configfile "${MY_HOSTROOTDIR}/${CONFFILE}" + webapp_serverowned "${MY_HOSTROOTDIR}/${CONFFILE}" + done + + webapp_src_install +} diff --git a/www-apps/freeradius-dialupadmin/metadata.xml b/www-apps/freeradius-dialupadmin/metadata.xml new file mode 100644 index 000000000000..f6fe7565b8f6 --- /dev/null +++ b/www-apps/freeradius-dialupadmin/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> +<longdescription> +The FreeRADIUS server comes including a powerfull web interface written in PHP +to administer radius users, called dialupadmin. Dialup Admin supports users +either in SQL (MySQL or PostgreSQL are supported) or in LDAP. Apart from the +web pages, it also includes a number of scripts to make the administrator's +life a lot easier. +</longdescription> +</pkgmetadata> |