wok-next view freeradius/receipt @ rev 21722
efivar: typo in post_install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Sep 01 10:31:46 2020 +0000 (2020-09-01) |
parents | 591866d4e88a |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="freeradius"
4 VERSION="3.0.21"
5 CATEGORY="security"
6 SHORT_DESC="Radius server"
7 MAINTAINER="maintainer@slitaz.org"
8 LICENSE="GPL2 LGPL2"
9 WEB_SITE="https://freeradius.org/"
11 TARBALL="freeradius-server-$VERSION.tar.gz"
12 WGET_URL="ftp://ftp.freeradius.org/pub/radius/$TARBALL"
14 BUILD_DEPENDS="gdbm-dev krb5-dev libtool openldap-dev openssl-dev pam-dev talloc-dev"
15 SPLIT="$PACKAGE-dialupadmin $PACKAGE-pam"
17 compile_rules()
18 {
19 export CFLAGS="$CFLAGS -fno-strict-aliasing"
21 ./configure \
22 --with-system-libtool \
23 --with-system-libltdl \
24 $CONFIGURE_ARGS &&
25 fix libtool &&
26 make -j1 &&
27 make R=$install install
28 }
30 genpkg_rules()
31 {
32 case $PACKAGE in
33 freeradius)
34 CONFIG_FILES="/etc/raddb"
35 DEPENDS="cyrus-sasl libcomerr3 libgdbm libkrb5 libldap libltdl \
36 libmysqlclient libunixODBC openssl python readline"
38 mkdir -p $fs/usr/lib
39 mkdir -p $fs/usr/share
40 mkdir -p $fs/etc/init.d
41 mkdir -p $fs/var/run/radiusd
43 cp -a $install/usr/bin $fs/usr
44 cp -a $install/usr/sbin $fs/usr
45 cp -a $install/usr/lib/*.so* $fs/usr/lib
46 cp -a $install/usr/share/freeradius $fs/usr/share
47 cp -a $install/etc $fs
48 cp -a $install/var $fs
49 rm -f $fs/usr/lib/rlm_pam* $fs/etc/raddb/modules/pam
50 cp -a $stuff/freeradius $fs/etc/init.d/
51 ;;
52 freeradius-dialupadmin)
53 CAT="network|web interface"
54 CONFIG_FILES="/etc/dialupadmin"
55 DEPENDS="php"
57 mkdir -p $fs/usr/share
58 mkdir -p $fs/etc/dialupadmin
60 cp -a $src/dialup_admin $fs/usr/share
61 cp -a $src/dialup_admin/conf/* $fs/etc/dialupadmin
62 rm -rf $fs/usr/share/dialup_admin/conf
63 ln -s /etc/dialupadmin $fs/usr/share/dialup_admin
64 ;;
65 freeradius-pam)
66 CAT="security|pam module"
67 PROVIDE="freeradius:pam"
68 DEPENDS="freeradius pam"
70 mkdir -p $fs/usr/lib
71 mkdir -p $fs/etc/raddb/modules
73 cp -a $install/usr/lib/rlm_pam*.so* $fs/usr/lib
74 cp -a $install/etc/raddb/modules/pam $fs/etc/raddb/modules
75 ;;
76 esac
77 }
79 post_install_freeradius_dialupadmin()
80 {
81 # Configure lighttpd server
82 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
83 then
84 if ! grep -q /usr/share/dialup_admin/ "$1/etc/lighttpd/lighttpd.conf"
85 then
86 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"
87 if [ -z "$1" ]
88 then
89 # Start Web server.
90 /etc/init.d/lighttpd stop
91 /etc/init.d/lighttpd start
92 fi
93 fi
94 fi
96 # Configure apache server
97 if [ -f "$1/etc/apache/httpd.conf" ]
98 then
99 if [ ! -f "$1/etc/apache/conf.d/dialupadmin" ]
100 then
101 cat > "$1/etc/apache/conf.d/dialupadmin" <<EOT
102 <IfModule mod_alias.c>
103 Alias /dialupadmin /usr/share/dialup_admin/htdocs
104 </IfModule>
105 <DirectoryMatch /usr/share/dialup_admin/htdocs/>
106 DirectoryIndex index.html
107 Options +FollowSymLinks
108 AllowOverride None
109 Order allow,deny
110 Allow from all
111 </DirectoryMatch>
112 EOT
113 if [ -z "$1" ]
114 then
115 # Start Web server.
116 /etc/init.d/apache stop
117 /etc/init.d/apache start
118 fi
119 fi
120 fi
121 }