wok annotate kamailio/receipt @ rev 24864

updated lsof (4.93.2 -> 4.94.0)
author Hans-G?nter Theisgen
date Wed Mar 30 06:22:51 2022 +0100 (2022-03-30)
parents 2a0479881723
children
rev   line source
pascal@19513 1 # SliTaz package receipt.
pascal@19513 2
pascal@19513 3 PACKAGE="kamailio"
Hans-G?nter@24696 4 VERSION="5.5.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"
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@24696 14 DEPENDS="curl expat libldap libpostgresqlclient libssl libxml2
Hans-G?nter@22977 15 net-snmp pcre radiusclient-ng"
Hans-G?nter@24696 16 BUILD_DEPENDS="bash bison curl-dev expat-dev flex glibc-dev libxml2-dev
Hans-G?nter@24696 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@24436 22 # What is the latest version available today?
pascal@24436 23 current_version()
pascal@24436 24 {
pascal@24436 25 wget -O - https://www.kamailio.org/pub/kamailio/latest/src/ 2>/dev/null | \
pascal@24436 26 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\)_src.*|\\1|" | sort -Vr | sed q
pascal@24436 27 }
pascal@24436 28
pascal@19513 29 # Rules to configure and make the package.
pascal@19513 30 compile_rules()
pascal@19513 31 {
Hans-G?nter@22979 32 sed -i 's|uname -m|echo i486|' \
Hans-G?nter@22979 33 src/Makefile.defs
Hans-G?nter@24696 34 patch --strip=0 --input=$stuff/patches/Makefile.defs-5.5.4
Hans-G?nter@22977 35
Hans-G?nter@24696 36 make cfg \
Hans-G?nter@24696 37 prefix=/usr \
Hans-G?nter@24696 38 RUNBASEDIR=/ \
Hans-G?nter@22977 39 include_modules="acc_radius app_python auth_radius \
pascal@19513 40 db_postgres ldap presence_conference presence_dialoginfo presence_mwi \
Hans-G?nter@24696 41 presence_profile presence_reginfo presence_xml snmpstats xmpp dialplan" &&
Hans-G?nter@24696 42 make all \
Hans-G?nter@24696 43 prefix=/usr &&
Hans-G?nter@24696 44 make install \
Hans-G?nter@24696 45 prefix=/usr
pascal@19513 46 }
pascal@19513 47
pascal@19513 48 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@19513 49 genpkg_rules()
pascal@19513 50 {
pascal@19513 51 mkdir -p $fs/var/run/kamailio
Hans-G?nter@22977 52
Hans-G?nter@22977 53 cp -a $install/* $fs
Hans-G?nter@22977 54 mv $fs/usr/etc $fs
Hans-G?nter@24696 55 ln -s /etc $fs/usr/etc
pascal@19513 56 }
pascal@19513 57
pascal@19513 58 # Pre and post install commands for Tazpkg.
pascal@19513 59 post_install()
pascal@19513 60 {
pascal@19513 61
pascal@19513 62 local user
pascal@19513 63 local group
pascal@19513 64
pascal@19513 65 user=kamailio
pascal@19513 66 group=kamailio
pascal@19513 67
Hans-G?nter@22977 68 if ! grep -q $user $1/etc/passwd
Hans-G?nter@22977 69 then
Hans-G?nter@24696 70 echo -n "Adding user and group $user..."
pascal@19513 71 chroot $1/ addgroup -S $group
pascal@19513 72 chroot $1/ adduser -s /bin/false -S -D -H -G $group $user
pascal@19513 73 status
pascal@19513 74 fi
pascal@19513 75 chroot "$1/" chown $user:$group /var/run/kamailio
pascal@19513 76 }
pascal@19513 77
pascal@19513 78 post_remove()
pascal@19513 79 {
Hans-G?nter@24696 80 echo "Removing user and group kamailio"
pascal@19513 81 chroot "$1/" deluser kamailio
pascal@19513 82 }