wok-6.x annotate kamailio/receipt @ rev 19513

Add kamailio
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Nov 22 17:47:37 2016 +0100 (2016-11-22)
parents
children 099a4d67f199
rev   line source
pascal@19513 1 # SliTaz package receipt.
pascal@19513 2
pascal@19513 3 PACKAGE="kamailio"
pascal@19513 4 VERSION="4.4.4"
pascal@19513 5 CATEGORY="network"
pascal@19513 6 SHORT_DESC="Open Source SIP Server."
pascal@19513 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@19513 8 LICENSE="GPL2"
pascal@19513 9 TARBALL="$PACKAGE-${VERSION}_src.tar.gz"
pascal@19513 10 WEB_SITE="https://www.kamailio.org/"
pascal@19513 11 WGET_URL="${WEB_SITE}pub/kamailio/$VERSION/src/$TARBALL"
pascal@19513 12 CONFIG_FILES="/etc/kamailio"
pascal@19513 13
pascal@19513 14 DEPENDS="libssl curl libxml2 pcre \
pascal@19513 15 radiusclient-ng libpostgresqlclient libldap net-snmp-dev expat"
pascal@19513 16 BUILD_DEPENDS="flex bison openssl-dev curl-dev libxml2-dev pcre-dev \
pascal@19513 17 radiusclient-ng-dev postgresql-dev openldap-dev net-snmp-dev expat-dev"
pascal@19513 18
pascal@19513 19 # Rules to configure and make the package.
pascal@19513 20 compile_rules()
pascal@19513 21 {
pascal@19513 22 make PREFIX="/usr" include_modules="acc_radius app_python auth_radius \
pascal@19513 23 db_postgres ldap presence_conference presence_dialoginfo presence_mwi \
pascal@19513 24 presence_profile presence_reginfo presence_xml snmpstats xmpp dialplan" cfg
pascal@19513 25 make all
pascal@19513 26 make DESTDIR=$DESTDIR install
pascal@19513 27 }
pascal@19513 28
pascal@19513 29 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@19513 30 genpkg_rules()
pascal@19513 31 {
pascal@19513 32 mkdir -p $fs/var/run/kamailio
pascal@19513 33 cp -a $install/* $fs
pascal@19513 34 mv $fs/usr/etc $fs ; ln -s /etc $fs/usr/etc
pascal@19513 35 }
pascal@19513 36
pascal@19513 37 # Pre and post install commands for Tazpkg.
pascal@19513 38 post_install()
pascal@19513 39 {
pascal@19513 40
pascal@19513 41 local user
pascal@19513 42 local group
pascal@19513 43
pascal@19513 44 user=kamailio
pascal@19513 45 group=kamailio
pascal@19513 46
pascal@19513 47 if ! grep -q $user $1/etc/passwd; then
pascal@19513 48 echo -n "Adding user/group $user..."
pascal@19513 49 chroot $1/ addgroup -S $group
pascal@19513 50 chroot $1/ adduser -s /bin/false -S -D -H -G $group $user
pascal@19513 51 status
pascal@19513 52 fi
pascal@19513 53 chroot "$1/" chown $user:$group /var/run/kamailio
pascal@19513 54 }
pascal@19513 55
pascal@19513 56 post_remove()
pascal@19513 57 {
pascal@19513 58 echo "Removing user/group kamailio"
pascal@19513 59 chroot "$1/" deluser kamailio
pascal@19513 60 }