wok view kamailio/receipt @ rev 23929

efivar: typo in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 01 10:25:24 2020 +0000 (2020-09-01)
parents 67b6f615fc27
children 2a0479881723
line source
1 # SliTaz package receipt.
3 PACKAGE="kamailio"
4 VERSION="5.3.2"
5 CATEGORY="network"
6 SHORT_DESC="Open Source SIP Server."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.kamailio.org/"
11 TARBALL="$PACKAGE-${VERSION}_src.tar.gz"
12 WGET_URL="${WEB_SITE}pub/kamailio/$VERSION/src/$TARBALL"
14 DEPENDS="curl expat libldap libssl libpostgresqlclient libxml2
15 net-snmp pcre radiusclient-ng"
16 BUILD_DEPENDS="bison curl-dev expat-dev flex libxml2-dev
17 net-snmp-dev openldap-dev openssl-dev pcre-dev
18 postgresql-dev python-dev radiusclient-ng-dev"
20 CONFIG_FILES="/etc/kamailio"
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 sed -i 's|uname -m|echo i486|' \
26 src/Makefile.defs
28 make \
29 PREFIX="/usr" \
30 include_modules="acc_radius app_python auth_radius \
31 db_postgres ldap presence_conference presence_dialoginfo presence_mwi \
32 presence_profile presence_reginfo presence_xml snmpstats xmpp dialplan" \
33 cfg &&
34 make all &&
35 make DESTDIR=$DESTDIR install
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/var/run/kamailio
43 cp -a $install/* $fs
44 mv $fs/usr/etc $fs
45 ln -s /etc $fs/usr/etc
46 }
48 # Pre and post install commands for Tazpkg.
49 post_install()
50 {
52 local user
53 local group
55 user=kamailio
56 group=kamailio
58 if ! grep -q $user $1/etc/passwd
59 then
60 echo -n "Adding user/group $user..."
61 chroot $1/ addgroup -S $group
62 chroot $1/ adduser -s /bin/false -S -D -H -G $group $user
63 status
64 fi
65 chroot "$1/" chown $user:$group /var/run/kamailio
66 }
68 post_remove()
69 {
70 echo "Removing user/group kamailio"
71 chroot "$1/" deluser kamailio
72 }