wok-next annotate freeradius/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | 835b3b8ce6ac |
children | 0ed3f456a542 |
rev | line source |
---|---|
pascal@20184 | 1 # SliTaz package receipt v2. |
sdaigl@48 | 2 |
sdaigl@48 | 3 PACKAGE="freeradius" |
pascal@12433 | 4 VERSION="2.1.12" |
sdaigl@48 | 5 CATEGORY="security" |
al@20534 | 6 SHORT_DESC="Radius server" |
al@21020 | 7 MAINTAINER="devel@slitaz.org" |
pascal@15215 | 8 LICENSE="GPL2 LGPL2" |
al@21020 | 9 WEB_SITE="http://freeradius.org/" |
al@20534 | 10 |
al@20534 | 11 TARBALL="freeradius-server-$VERSION.tar.gz" |
pascal@12433 | 12 WGET_URL="ftp://ftp.freeradius.org/pub/freeradius/$TARBALL" |
sdaigl@48 | 13 |
al@20534 | 14 BUILD_DEPENDS="libtool openldap-dev openssl-dev pam-dev krb5-dev gdbm-dev libtool" |
al@21020 | 15 SPLIT="$PACKAGE-dialupadmin $PACKAGE-pam" |
erjo@9962 | 16 |
al@20534 | 17 compile_rules() { |
slaxemulator@9374 | 18 export CFLAGS="$CFLAGS -fno-strict-aliasing" |
al@20534 | 19 |
al@20534 | 20 ./configure \ |
slaxemulator@9374 | 21 --with-system-libtool \ |
slaxemulator@10332 | 22 --with-system-libltdl \ |
slaxemulator@10332 | 23 $CONFIGURE_ARGS && |
al@20569 | 24 fix libtool && |
gokhlayeh@9224 | 25 make -j1 && |
al@21020 | 26 make R=$install install |
sdaigl@48 | 27 } |
sdaigl@48 | 28 |
al@20534 | 29 genpkg_rules() { |
pascal@20184 | 30 case $PACKAGE in |
al@20534 | 31 freeradius) |
al@20534 | 32 CONFIG_FILES="/etc/raddb" |
al@20534 | 33 DEPENDS="openssl cyrus-sasl libldap libltdl python readline \ |
pascal@20184 | 34 libunixODBC libkrb5 libcomerr3 libmysqlclient gdbm" |
al@20534 | 35 mkdir -p $fs/usr/lib $fs/usr/share $fs/etc/init.d $fs/var/run/radiusd |
sdaigl@48 | 36 |
al@20534 | 37 cp -a $install/usr/bin $fs/usr |
al@20534 | 38 cp -a $install/usr/sbin $fs/usr |
al@20534 | 39 cp -a $install/usr/lib/*.so* $fs/usr/lib |
al@20534 | 40 cp -a $install/usr/share/freeradius $fs/usr/share |
al@20534 | 41 cp -a $install/etc $fs |
al@20534 | 42 cp -a $install/var $fs |
al@20534 | 43 rm -f $fs/usr/lib/rlm_pam* $fs/etc/raddb/modules/pam |
al@20534 | 44 cp -a $stuff/freeradius $fs/etc/init.d/ |
al@20534 | 45 ;; |
al@20534 | 46 freeradius-dialupadmin) |
al@20534 | 47 CAT="network|web interface" |
al@20534 | 48 CONFIG_FILES="/etc/dialupadmin" |
al@20534 | 49 DEPENDS="php" |
al@20534 | 50 mkdir -p $fs/usr/share $fs/etc/dialupadmin |
al@20534 | 51 cp -a $src/dialup_admin $fs/usr/share |
al@20534 | 52 cp -a $src/dialup_admin/conf/* $fs/etc/dialupadmin |
al@20534 | 53 rm -rf $fs/usr/share/dialup_admin/conf |
al@20534 | 54 ln -s /etc/dialupadmin $fs/usr/share/dialup_admin |
al@20534 | 55 ;; |
al@20534 | 56 freeradius-pam) |
al@20534 | 57 CAT="security|pam module" |
al@20534 | 58 PROVIDE="freeradius:pam" |
al@20534 | 59 DEPENDS="freeradius pam" |
al@20534 | 60 mkdir -p $fs/usr/lib $fs/etc/raddb/modules |
al@20534 | 61 cp -a $install/usr/lib/rlm_pam*.so* $fs/usr/lib |
al@20534 | 62 cp -a $install/etc/raddb/modules/pam $fs/etc/raddb/modules |
al@20534 | 63 ;; |
pascal@20184 | 64 esac |
sdaigl@48 | 65 } |
pascal@20184 | 66 |
al@20534 | 67 post_install_freeradius_dialupadmin() { |
pascal@20184 | 68 # Configure lighttpd server |
pascal@20184 | 69 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
pascal@20184 | 70 if ! grep -q /usr/share/dialup_admin/ "$1/etc/lighttpd/lighttpd.conf"; then |
al@20534 | 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" |
pascal@20184 | 72 if [ -z "$1" ]; then |
pascal@20184 | 73 # Start Web server. |
pascal@20184 | 74 /etc/init.d/lighttpd stop |
pascal@20184 | 75 /etc/init.d/lighttpd start |
pascal@20184 | 76 fi |
pascal@20184 | 77 fi |
pascal@20184 | 78 fi |
pascal@20184 | 79 # Configure apache server |
pascal@20184 | 80 if [ -f "$1/etc/apache/httpd.conf" ]; then |
pascal@20184 | 81 if [ ! -f "$1/etc/apache/conf.d/dialupadmin" ]; then |
pascal@20184 | 82 cat > "$1/etc/apache/conf.d/dialupadmin" <<EOT |
pascal@20184 | 83 <IfModule mod_alias.c> |
pascal@20184 | 84 Alias /dialupadmin /usr/share/dialup_admin/htdocs |
pascal@20184 | 85 </IfModule> |
pascal@20184 | 86 <DirectoryMatch /usr/share/dialup_admin/htdocs/> |
pascal@20184 | 87 DirectoryIndex index.html |
pascal@20184 | 88 Options +FollowSymLinks |
pascal@20184 | 89 AllowOverride None |
pascal@20184 | 90 Order allow,deny |
pascal@20184 | 91 Allow from all |
pascal@20184 | 92 </DirectoryMatch> |
pascal@20184 | 93 EOT |
pascal@20184 | 94 if [ -z "$1" ]; then |
pascal@20184 | 95 # Start Web server. |
pascal@20184 | 96 /etc/init.d/apache stop |
pascal@20184 | 97 /etc/init.d/apache start |
pascal@20184 | 98 fi |
pascal@20184 | 99 fi |
pascal@20184 | 100 fi |
pascal@20184 | 101 } |