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