source: npl/commonservers/radius/radius.SlackBuild @ 0bdb49c

perl-5.22
Last change on this file since 0bdb49c was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 2.1 KB
Line 
1#!/bin/sh
2#DEP:openldap
3#DEP:openssl
4#DEP:libtermcap
5#DEP:Linux_PAM
6#DEP:libtool
7#DEP:cyrus_sasl
8
9CWD=`pwd`
10TMP=/tmp/tmp
11PKG=/tmp/pkg
12rm -rf $PKG
13mkdir -p $PKG
14
15VERSION=2.2.9
16ARCH=${ARCH:-i486}
17BUILD=1DatuX
18NAME=radius
19
20mkdir -p $TMP
21cd $TMP
22
23tar xjvf $CWD/freeradius-server-$VERSION.tar.bz2 || exit 1
24cd freeradius-server-$VERSION || exit 1
25echo "Uitvoeren van configure..." &&
26./configure --prefix=/usr \
27 --sysconfdir=/home/system/radius \
28 --localstatedir=/var \
29 --sbindir=/usr/sbin \
30 --libdir=/usr/lib \
31 --libexecdir=/usr/sbin || exit 1                                                                               
32make  || exit 1
33make  R="${PKG}" install || exit 1
34
35#deamontools zooi fixxen
36mkdir -p $PKG/service/radius
37cat << EOF > $PKG/service/radius/run
38#!/bin/sh
39# LDAP Settings.
40LDAPPASSWD="\`cat /etc/webint/LDAP_MASTER_PASSWD\`"
41cat /home/system/radius/raddb/radiusd.conf | sed 's/^\t\tpassword = .*/\t\tpassword = '\$LDAPPASSWD'/' >> /home/system/radius/raddb/radiusd.conf-new
42if [ -s /home/system/radius/raddb/radiusd.conf-new ]; then
43mv /home/system/radius/raddb/radiusd.conf-new /home/system/radius/raddb/radiusd.conf
44fi
45exec /usr/sbin/radiusd -f -l /var/log/radius/radius.log
46EOF
47chmod +x $PKG/service/radius/run
48
49# En uiteraard mag de vette postinstall niet ontbreken.
50mkdir -p $PKG/etc/postinst.d/
51cp $CWD/post.radius $PKG/etc/postinst.d/post.radius
52chmod +x $PKG/etc/postinst.d/post.radius || exit 1
53
54#aangepaste configfiles op plek zetten
55rm -rf $PKG/home/system/radius/raddb || exit 1
56mkdir -p $PKG/home/system/radius/raddb || exit 1
57cp -R $CWD/raddb $PKG/home/system/radius/ || exit 1
58
59#logrotate fixxen voor de logfiles
60mkdir -p $PKG/etc/logrotate.d
61cat <<EOF > $PKG/etc/logrotate.d/radius
62/var/log/radius/radius.log {
63    weekly
64    rotate 4
65    copytruncate
66    compress
67    notifempty
68    missingok
69}
70EOF
71chmod 644 $PKG/etc/logrotate.d/radius     
72
73
74####
75VER=$VERSION
76cd $CWD
77
78#strip bins and other stuff
79syn3_strip /tmp/pkg || exit 1
80
81#move development stuff and create seperate development package
82syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1
83syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1
84
85#make main package
86syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1
87
88
89
Note: See TracBrowser for help on using the repository browser.