wok annotate kamailio/receipt @ rev 22977
updated kamailio (4.4.4 -> 5.3.2)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Feb 29 16:18:56 2020 +0100 (2020-02-29) |
parents | 3705d68ed8f3 |
children | 7ec8a84c5522 |
rev | line source |
---|---|
pascal@19513 | 1 # SliTaz package receipt. |
pascal@19513 | 2 |
pascal@19513 | 3 PACKAGE="kamailio" |
Hans-G?nter@22977 | 4 VERSION="5.3.2" |
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" |
Hans-G?nter@22977 | 9 WEB_SITE="https://www.kamailio.org/" |
Hans-G?nter@22977 | 10 |
pascal@19513 | 11 TARBALL="$PACKAGE-${VERSION}_src.tar.gz" |
pascal@19513 | 12 WGET_URL="${WEB_SITE}pub/kamailio/$VERSION/src/$TARBALL" |
Hans-G?nter@22977 | 13 |
Hans-G?nter@22977 | 14 DEPENDS="curl expat libldap libssl libpostgresqlclient libxml2 |
Hans-G?nter@22977 | 15 net-snmp pcre radiusclient-ng" |
Hans-G?nter@22977 | 16 BUILD_DEPENDS="bison curl-dev expat-dev flex libxml2-dev |
Hans-G?nter@22977 | 17 net-snmp-dev openldap-dev openssl-dev pcre-dev |
Hans-G?nter@22977 | 18 postgresql-dev python-dev radiusclient-ng-dev" |
Hans-G?nter@22977 | 19 |
pascal@19513 | 20 CONFIG_FILES="/etc/kamailio" |
pascal@19513 | 21 |
pascal@19513 | 22 # Rules to configure and make the package. |
pascal@19513 | 23 compile_rules() |
pascal@19513 | 24 { |
pascal@20212 | 25 sed -i 's|uname -m|echo i486|' Makefile.defs |
Hans-G?nter@22977 | 26 |
Hans-G?nter@22977 | 27 make \ |
Hans-G?nter@22977 | 28 PREFIX="/usr" \ |
Hans-G?nter@22977 | 29 include_modules="acc_radius app_python auth_radius \ |
pascal@19513 | 30 db_postgres ldap presence_conference presence_dialoginfo presence_mwi \ |
Hans-G?nter@22977 | 31 presence_profile presence_reginfo presence_xml snmpstats xmpp dialplan" \ |
Hans-G?nter@22977 | 32 cfg && |
Hans-G?nter@22977 | 33 make all && |
pascal@19513 | 34 make DESTDIR=$DESTDIR install |
pascal@19513 | 35 } |
pascal@19513 | 36 |
pascal@19513 | 37 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@19513 | 38 genpkg_rules() |
pascal@19513 | 39 { |
pascal@19513 | 40 mkdir -p $fs/var/run/kamailio |
Hans-G?nter@22977 | 41 |
Hans-G?nter@22977 | 42 cp -a $install/* $fs |
Hans-G?nter@22977 | 43 mv $fs/usr/etc $fs |
Hans-G?nter@22977 | 44 ln -s /etc $fs/usr/etc |
pascal@19513 | 45 } |
pascal@19513 | 46 |
pascal@19513 | 47 # Pre and post install commands for Tazpkg. |
pascal@19513 | 48 post_install() |
pascal@19513 | 49 { |
pascal@19513 | 50 |
pascal@19513 | 51 local user |
pascal@19513 | 52 local group |
pascal@19513 | 53 |
pascal@19513 | 54 user=kamailio |
pascal@19513 | 55 group=kamailio |
pascal@19513 | 56 |
Hans-G?nter@22977 | 57 if ! grep -q $user $1/etc/passwd |
Hans-G?nter@22977 | 58 then |
pascal@19513 | 59 echo -n "Adding user/group $user..." |
pascal@19513 | 60 chroot $1/ addgroup -S $group |
pascal@19513 | 61 chroot $1/ adduser -s /bin/false -S -D -H -G $group $user |
pascal@19513 | 62 status |
pascal@19513 | 63 fi |
pascal@19513 | 64 chroot "$1/" chown $user:$group /var/run/kamailio |
pascal@19513 | 65 } |
pascal@19513 | 66 |
pascal@19513 | 67 post_remove() |
pascal@19513 | 68 { |
pascal@19513 | 69 echo "Removing user/group kamailio" |
pascal@19513 | 70 chroot "$1/" deluser kamailio |
pascal@19513 | 71 } |