wok-next view freeradius/receipt @ rev 20190
Up wayland-protocols (1.11)
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Fri Nov 03 01:17:08 2017 +0100 (2017-11-03) |
parents | 57fe56973200 |
children | e6615350078d |
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 SOURCE="freeradius-server"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://www.freeradius.org/"
12 WGET_URL="ftp://ftp.freeradius.org/pub/freeradius/$TARBALL"
14 BUILD_DEPENDS="libtool openldap-dev openssl-dev pam-dev krb5-dev gdbm-dev \
15 libtool"
16 SPLIT="freeradius freeradius-dialupadmin freeradius-pam"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 export CFLAGS="$CFLAGS -fno-strict-aliasing"
22 ./configure --sysconfdir=/etc \
23 --localstatedir=/var \
24 --with-system-libtool \
25 --with-system-libltdl \
26 $CONFIGURE_ARGS &&
27 make -j1 &&
28 make R=$DESTDIR install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 case $PACKAGE in
35 freeradius)
36 CONFIG_FILES="/etc/raddb"
37 DEPENDS="libssl cyrus-sasl libldap libltdl python readline \
38 libunixODBC libkrb5 libcomerr3 libmysqlclient gdbm"
39 mkdir -p $fs/usr/lib $fs/usr/share $fs/etc/init.d $fs/var/run/radiusd
41 cp -a $install/usr/bin $fs/usr
42 cp -a $install/usr/sbin $fs/usr
43 cp -a $install/usr/lib/*.so* $fs/usr/lib
44 cp -a $install/usr/share/freeradius $fs/usr/share
45 cp -a $install/etc $fs
46 cp -a $install/var $fs
47 rm -f $fs/usr/lib/rlm_pam* $fs/etc/raddb/modules/pam
48 cp -a $stuff/freeradius $fs/etc/init.d/
49 ;;
50 freeradius-dialupadmin)
51 CAT="network|radius server web interface"
52 CONFIG_FILES="/etc/dialupadmin"
53 DEPENDS="php"
54 mkdir -p $fs/usr/share $fs/etc/dialupadmin
55 cp -a $src/dialup_admin $fs/usr/share
56 cp -a $src/dialup_admin/conf/* $fs/etc/dialupadmin
57 rm -rf $fs/usr/share/dialup_admin/conf
58 ln -s /etc/dialupadmin $fs/usr/share/dialup_admin
59 ;;
60 freeradius-pam)
61 CAT="security|pam module for radius server"
62 PROVIDE="freeradius:pam"
63 DEPENDS="freeradius pam"
64 mkdir -p $fs/usr/lib $fs/etc/raddb/modules
65 cp -a $install/usr/lib/rlm_pam*.so* $fs/usr/lib
66 cp -a $install/etc/raddb/modules/pam $fs/etc/raddb/modules
67 ;;
68 esac
69 }
71 post_install_freeradius_dialupadmin()
72 {
73 # Configure lighttpd server
74 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
75 if ! grep -q /usr/share/dialup_admin/ "$1/etc/lighttpd/lighttpd.conf"; then
76 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"
77 if [ -z "$1" ]; then
78 # Start Web server.
79 /etc/init.d/lighttpd stop
80 /etc/init.d/lighttpd start
81 fi
82 fi
83 fi
84 # Configure apache server
85 if [ -f "$1/etc/apache/httpd.conf" ]; then
86 if [ ! -f "$1/etc/apache/conf.d/dialupadmin" ]; then
87 cat > "$1/etc/apache/conf.d/dialupadmin" <<EOT
88 <IfModule mod_alias.c>
89 Alias /dialupadmin /usr/share/dialup_admin/htdocs
90 </IfModule>
91 <DirectoryMatch /usr/share/dialup_admin/htdocs/>
92 DirectoryIndex index.html
93 Options +FollowSymLinks
94 AllowOverride None
95 Order allow,deny
96 Allow from all
97 </DirectoryMatch>
98 EOT
99 if [ -z "$1" ]; then
100 # Start Web server.
101 /etc/init.d/apache stop
102 /etc/init.d/apache start
103 fi
104 fi
105 fi
106 }