wok rev 19513
Add kamailio
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Nov 22 17:47:37 2016 +0100 (2016-11-22) |
parents | beee0d431f3b |
children | 099a4d67f199 |
files | kamailio/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/kamailio/receipt Tue Nov 22 17:47:37 2016 +0100 1.3 @@ -0,0 +1,60 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="kamailio" 1.7 +VERSION="4.4.4" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Open Source SIP Server." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +LICENSE="GPL2" 1.12 +TARBALL="$PACKAGE-${VERSION}_src.tar.gz" 1.13 +WEB_SITE="https://www.kamailio.org/" 1.14 +WGET_URL="${WEB_SITE}pub/kamailio/$VERSION/src/$TARBALL" 1.15 +CONFIG_FILES="/etc/kamailio" 1.16 + 1.17 +DEPENDS="libssl curl libxml2 pcre \ 1.18 +radiusclient-ng libpostgresqlclient libldap net-snmp-dev expat" 1.19 +BUILD_DEPENDS="flex bison openssl-dev curl-dev libxml2-dev pcre-dev \ 1.20 +radiusclient-ng-dev postgresql-dev openldap-dev net-snmp-dev expat-dev" 1.21 + 1.22 +# Rules to configure and make the package. 1.23 +compile_rules() 1.24 +{ 1.25 + make PREFIX="/usr" include_modules="acc_radius app_python auth_radius \ 1.26 +db_postgres ldap presence_conference presence_dialoginfo presence_mwi \ 1.27 +presence_profile presence_reginfo presence_xml snmpstats xmpp dialplan" cfg 1.28 + make all 1.29 + make DESTDIR=$DESTDIR install 1.30 +} 1.31 + 1.32 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.33 +genpkg_rules() 1.34 +{ 1.35 + mkdir -p $fs/var/run/kamailio 1.36 + cp -a $install/* $fs 1.37 + mv $fs/usr/etc $fs ; ln -s /etc $fs/usr/etc 1.38 +} 1.39 + 1.40 +# Pre and post install commands for Tazpkg. 1.41 +post_install() 1.42 +{ 1.43 + 1.44 + local user 1.45 + local group 1.46 + 1.47 + user=kamailio 1.48 + group=kamailio 1.49 + 1.50 + if ! grep -q $user $1/etc/passwd; then 1.51 + echo -n "Adding user/group $user..." 1.52 + chroot $1/ addgroup -S $group 1.53 + chroot $1/ adduser -s /bin/false -S -D -H -G $group $user 1.54 + status 1.55 + fi 1.56 + chroot "$1/" chown $user:$group /var/run/kamailio 1.57 +} 1.58 + 1.59 +post_remove() 1.60 +{ 1.61 + echo "Removing user/group kamailio" 1.62 + chroot "$1/" deluser kamailio 1.63 +}