wok-next view freeradius/receipt @ rev 20674
Up putty (0.70)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat May 12 05:17:48 2018 +0300 (2018-05-12) |
parents | 757d032c55c7 |
children | d5aab818505e |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="freeradius"
4 VERSION="2.1.12"
5 CATEGORY="security"
6 SHORT_DESC="Radius server"
7 MAINTAINER="sdaigl@lacitec.on.ca"
8 LICENSE="GPL2 LGPL2"
9 WEB_SITE="http://www.freeradius.org/"
11 TARBALL="freeradius-server-$VERSION.tar.gz"
12 WGET_URL="ftp://ftp.freeradius.org/pub/freeradius/$TARBALL"
14 BUILD_DEPENDS="libtool openldap-dev openssl-dev pam-dev krb5-dev gdbm-dev libtool"
15 SPLIT="freeradius freeradius-dialupadmin freeradius-pam"
17 compile_rules() {
18 export CFLAGS="$CFLAGS -fno-strict-aliasing"
20 ./configure \
21 --with-system-libtool \
22 --with-system-libltdl \
23 $CONFIGURE_ARGS &&
24 fix libtool &&
25 make -j1 &&
26 make R=$DESTDIR install
27 }
29 genpkg_rules() {
30 case $PACKAGE in
31 freeradius)
32 CONFIG_FILES="/etc/raddb"
33 DEPENDS="openssl cyrus-sasl libldap libltdl python readline \
34 libunixODBC libkrb5 libcomerr3 libmysqlclient gdbm"
35 mkdir -p $fs/usr/lib $fs/usr/share $fs/etc/init.d $fs/var/run/radiusd
37 cp -a $install/usr/bin $fs/usr
38 cp -a $install/usr/sbin $fs/usr
39 cp -a $install/usr/lib/*.so* $fs/usr/lib
40 cp -a $install/usr/share/freeradius $fs/usr/share
41 cp -a $install/etc $fs
42 cp -a $install/var $fs
43 rm -f $fs/usr/lib/rlm_pam* $fs/etc/raddb/modules/pam
44 cp -a $stuff/freeradius $fs/etc/init.d/
45 ;;
46 freeradius-dialupadmin)
47 CAT="network|web interface"
48 CONFIG_FILES="/etc/dialupadmin"
49 DEPENDS="php"
50 mkdir -p $fs/usr/share $fs/etc/dialupadmin
51 cp -a $src/dialup_admin $fs/usr/share
52 cp -a $src/dialup_admin/conf/* $fs/etc/dialupadmin
53 rm -rf $fs/usr/share/dialup_admin/conf
54 ln -s /etc/dialupadmin $fs/usr/share/dialup_admin
55 ;;
56 freeradius-pam)
57 CAT="security|pam module"
58 PROVIDE="freeradius:pam"
59 DEPENDS="freeradius pam"
60 mkdir -p $fs/usr/lib $fs/etc/raddb/modules
61 cp -a $install/usr/lib/rlm_pam*.so* $fs/usr/lib
62 cp -a $install/etc/raddb/modules/pam $fs/etc/raddb/modules
63 ;;
64 esac
65 }
67 post_install_freeradius_dialupadmin() {
68 # Configure lighttpd server
69 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
70 if ! grep -q /usr/share/dialup_admin/ "$1/etc/lighttpd/lighttpd.conf"; then
71 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/dialupadmin/" => "/usr/share/dialup_admin/htdocs/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
72 if [ -z "$1" ]; then
73 # Start Web server.
74 /etc/init.d/lighttpd stop
75 /etc/init.d/lighttpd start
76 fi
77 fi
78 fi
79 # Configure apache server
80 if [ -f "$1/etc/apache/httpd.conf" ]; then
81 if [ ! -f "$1/etc/apache/conf.d/dialupadmin" ]; then
82 cat > "$1/etc/apache/conf.d/dialupadmin" <<EOT
83 <IfModule mod_alias.c>
84 Alias /dialupadmin /usr/share/dialup_admin/htdocs
85 </IfModule>
86 <DirectoryMatch /usr/share/dialup_admin/htdocs/>
87 DirectoryIndex index.html
88 Options +FollowSymLinks
89 AllowOverride None
90 Order allow,deny
91 Allow from all
92 </DirectoryMatch>
93 EOT
94 if [ -z "$1" ]; then
95 # Start Web server.
96 /etc/init.d/apache stop
97 /etc/init.d/apache start
98 fi
99 fi
100 fi
101 }