wok-6.x annotate kamailio/receipt @ rev 20325
typo
author | Erkan Yilmaz <erkan@slitaz.org> |
---|---|
date | Tue May 22 07:22:16 2018 +0000 (2018-05-22) |
parents | 099a4d67f199 |
children | 67b6f615fc27 |
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@19514 | 15 radiusclient-ng libpostgresqlclient libldap net-snmp expat" |
pascal@19513 | 16 BUILD_DEPENDS="flex bison openssl-dev curl-dev libxml2-dev pcre-dev \ |
pascal@19514 | 17 radiusclient-ng-dev postgresql-dev openldap-dev net-snmp-dev expat-dev \ |
pascal@19514 | 18 python-dev" |
pascal@19513 | 19 |
pascal@19513 | 20 # Rules to configure and make the package. |
pascal@19513 | 21 compile_rules() |
pascal@19513 | 22 { |
pascal@20212 | 23 sed -i 's|uname -m|echo i486|' Makefile.defs |
pascal@19513 | 24 make PREFIX="/usr" include_modules="acc_radius app_python auth_radius \ |
pascal@19513 | 25 db_postgres ldap presence_conference presence_dialoginfo presence_mwi \ |
pascal@19513 | 26 presence_profile presence_reginfo presence_xml snmpstats xmpp dialplan" cfg |
pascal@19513 | 27 make all |
pascal@19513 | 28 make DESTDIR=$DESTDIR install |
pascal@19513 | 29 } |
pascal@19513 | 30 |
pascal@19513 | 31 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@19513 | 32 genpkg_rules() |
pascal@19513 | 33 { |
pascal@19513 | 34 mkdir -p $fs/var/run/kamailio |
pascal@19513 | 35 cp -a $install/* $fs |
pascal@19513 | 36 mv $fs/usr/etc $fs ; ln -s /etc $fs/usr/etc |
pascal@19513 | 37 } |
pascal@19513 | 38 |
pascal@19513 | 39 # Pre and post install commands for Tazpkg. |
pascal@19513 | 40 post_install() |
pascal@19513 | 41 { |
pascal@19513 | 42 |
pascal@19513 | 43 local user |
pascal@19513 | 44 local group |
pascal@19513 | 45 |
pascal@19513 | 46 user=kamailio |
pascal@19513 | 47 group=kamailio |
pascal@19513 | 48 |
pascal@19513 | 49 if ! grep -q $user $1/etc/passwd; then |
pascal@19513 | 50 echo -n "Adding user/group $user..." |
pascal@19513 | 51 chroot $1/ addgroup -S $group |
pascal@19513 | 52 chroot $1/ adduser -s /bin/false -S -D -H -G $group $user |
pascal@19513 | 53 status |
pascal@19513 | 54 fi |
pascal@19513 | 55 chroot "$1/" chown $user:$group /var/run/kamailio |
pascal@19513 | 56 } |
pascal@19513 | 57 |
pascal@19513 | 58 post_remove() |
pascal@19513 | 59 { |
pascal@19513 | 60 echo "Removing user/group kamailio" |
pascal@19513 | 61 chroot "$1/" deluser kamailio |
pascal@19513 | 62 } |