pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
siproxd: Install documentation and rc.d script, patch paths
Module Name: pkgsrc-wip
Committed By: Hauke Fath <hauke%NetBSD.org@localhost>
Pushed By: hauke
Date: Wed Nov 7 16:21:47 2018 +0100
Changeset: c0eb01b71e509e89633e879b7bb97ada9d574dbd
Modified Files:
siproxd/Makefile
siproxd/PLIST
siproxd/distinfo
Added Files:
siproxd/files/siproxd.sh
siproxd/patches/patch-doc_siproxd.conf.example
Removed Files:
siproxd/files/siproxd
Log Message:
siproxd: Install documentation and rc.d script, patch paths
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c0eb01b71e509e89633e879b7bb97ada9d574dbd
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
siproxd/Makefile | 51 +++++++++++++++++++---
siproxd/PLIST | 9 +++-
siproxd/distinfo | 1 +
siproxd/files/siproxd | 29 -------------
siproxd/files/siproxd.sh | 29 +++++++++++++
siproxd/patches/patch-doc_siproxd.conf.example | 58 ++++++++++++++++++++++++++
6 files changed, 142 insertions(+), 35 deletions(-)
diffs:
diff --git a/siproxd/Makefile b/siproxd/Makefile
index 3d1ba7f995..d99b87c5a7 100644
--- a/siproxd/Makefile
+++ b/siproxd/Makefile
@@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.23 2013/12/28 14:42:28 imilh Exp $
DISTNAME= siproxd-0.8.2
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=siproxd/}
@@ -12,16 +13,56 @@ LICENSE= gnu-gpl-v2
GNU_CONFIGURE= YES
USE_TOOLS+= gmake
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+= VARBASE
+
+SIPROXD_USER?= siproxd
+SIPROXD_GROUP?= siproxd
+SIPROXD_HOME?= ${VARBASE}/chroot/${PKGBASE}
+
+PKG_GROUPS= ${SIPROXD_GROUP}
+PKG_USERS= ${SIPROXD_USER}:${SIPROXD_GROUP}
+
+PKG_GECOS.${SIPROXD_USER}= SIP proxy
+PKG_HOME.${SIPROXD_USER}= ${SIPROXD_HOME}
+
+PKG_GROUPS_VARS+= SIPROXD_GROUP
+PKG_USERS_VARS+= SIPROXD_USER
+
+FILES_SUBST+= SIPROXD_USER=${SIPROXD_USER:Q}
+FILES_SUBST+= SIPROXD_GROUP=${SIPROXD_GROUP:Q}
+FILES_SUBST+= SIPROXD_HOME=${SIPROXD_HOME:Q}
+
+RCD_SCRIPTS+= siproxd
+PKG_SYSCONFSUBDIR= siproxd
+
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --with-libosip-prefix=${BUILDLINK_PREFIX.libosip2}
-EGDIR= ${PREFIX}/share/examples/siproxd
+DOCDIR= share/doc/siproxd
+EGDIR= share/examples/siproxd
+
+CONF_FILES= ${PREFIX}/${EGDIR}/siproxd.conf.example \
+ ${PKG_SYSCONFDIR}/siproxd.conf
+CONF_FILES+= ${PREFIX}/${EGDIR}/siproxd_passwd.cfg \
+ ${PKG_SYSCONFDIR}/siproxd_passwd.cfg
+
+INSTALLATION_DIRS= sbin ${DOCDIR} ${EGDIR}
-CONF_FILES= ${EGDIR}/siproxd.conf.example ${PKG_SYSCONFDIR}/siproxd.conf \
- ${EGDIR}/siproxd_passwd.cfg \
- ${PKG_SYSCONFDIR}/siproxd_passwd.cfg
+SUBST_CLASSES+= paths
+SUBST_STAGE.paths= pre-configure
+SUBST_FILES.paths= doc/siproxd.conf.example
+SUBST_MESSAGE.paths= performing pathname substitutions
+SUBST_VARS.paths= VARBASE PKG_SYSCONFDIR SIPROXD_USER SIPROXD_HOME
-INSTALLATION_DIRS= sbin share/examples/siproxd
+post-install:
+.for ff in README RELNOTES doc/FAQ doc/KNOWN_BUGS doc/RFC3261_compliance.txt
+ ${INSTALL_DATA} ${WRKSRC}/${ff} ${DESTDIR}${PREFIX}/${DOCDIR}/
+.endfor
+.for ff in sample_asterisk.txt sample_cfg_budgetone.txt sample_cfg_x-lite.txt
+ ${INSTALL_DATA} ${WRKSRC}/doc/${ff} ${DESTDIR}${PREFIX}/${EGDIR}/
+.endfor
.include "../../mk/pthread.buildlink3.mk"
PTHREAD_LIBS+= ${PTHREAD_LDFLAGS}
diff --git a/siproxd/PLIST b/siproxd/PLIST
index 3c6a00682c..43f5475712 100644
--- a/siproxd/PLIST
+++ b/siproxd/PLIST
@@ -13,6 +13,13 @@ lib/siproxd/plugin_siptrunk.la
lib/siproxd/plugin_stripheader.la
lib/siproxd/plugin_stun.la
sbin/siproxd
+share/doc/siproxd/FAQ
+share/doc/siproxd/KNOWN_BUGS
+share/doc/siproxd/README
+share/doc/siproxd/RELNOTES
+share/doc/siproxd/RFC3261_compliance.txt
+share/examples/siproxd/sample_asterisk.txt
+share/examples/siproxd/sample_cfg_budgetone.txt
+share/examples/siproxd/sample_cfg_x-lite.txt
share/examples/siproxd/siproxd.conf.example
share/examples/siproxd/siproxd_passwd.cfg
-@pkgdir share/doc/siproxd
diff --git a/siproxd/distinfo b/siproxd/distinfo
index 9769e097d8..61000f60c8 100644
--- a/siproxd/distinfo
+++ b/siproxd/distinfo
@@ -5,5 +5,6 @@ RMD160 (siproxd-0.8.2.tar.gz) = 57c76ef20ee4e9f1c5910526ed8e72129587a17e
SHA512 (siproxd-0.8.2.tar.gz) = 25bc4fd4353574fff3253b06f75ad17435d993270780b9f3c8e520c982587247adb7794563083c349aee95e1fa2b0255187c8baa5ec3d72db39b67787f5a85b3
Size (siproxd-0.8.2.tar.gz) = 846148 bytes
SHA1 (patch-aa) = 5cbd0460e12609f0551959e266ce4b9ca37c7559
+SHA1 (patch-doc_siproxd.conf.example) = f862925d400f2ffdae3c37148e0d714d656bdd06
SHA1 (patch-src_plugins.h) = 678f5c87e8695137c3f9290f55b3070d5262e247
SHA1 (patch-src_rtpproxy.h) = 4189e1fa35e878ba836eb860a7143515f51aa5c1
diff --git a/siproxd/files/siproxd b/siproxd/files/siproxd
deleted file mode 100644
index 87916801b3..0000000000
--- a/siproxd/files/siproxd
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD$
-#
-
-# PROVIDE: siproxd
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-
-$_rc_subr_loaded . /etc/rc.subr
-
-name="siproxd"
-rcvar=$name
-command="/usr/pkg/sbin/${name}"
-pidfile="/var/run/${name}/${name}.pid"
-required_files="/etc/pkg/siproxd.conf"
-start_precmd="siproxd_precmd"
-
-siproxd_precmd()
-{
- rc_flags="-p ${pidfile} $rc_flags"
-
- local piddir="$(dirname "${pidfile}")"
- mkdir -p "${piddir}"
- chown siproxd:siproxd "${piddir}"
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/siproxd/files/siproxd.sh b/siproxd/files/siproxd.sh
new file mode 100644
index 0000000000..f1710bf310
--- /dev/null
+++ b/siproxd/files/siproxd.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $NetBSD$
+#
+
+# PROVIDE: siproxd
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="siproxd"
+rcvar=$name
+command="@PREFIX@/sbin/${name}"
+pidfile="@VARBASE@/run/${name}/${name}.pid"
+required_files="@PKG_SYSCONFDIR@/siproxd.conf"
+start_precmd="siproxd_precmd"
+
+siproxd_precmd()
+{
+ rc_flags="-p ${pidfile} $rc_flags"
+
+ local piddir="$(dirname "${pidfile}")"
+ mkdir -p "${piddir}"
+ chown @SIPROXD_USER@:@SIPROXD_GROUP@ "${piddir}"
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/siproxd/patches/patch-doc_siproxd.conf.example b/siproxd/patches/patch-doc_siproxd.conf.example
new file mode 100644
index 0000000000..6815ccf54b
--- /dev/null
+++ b/siproxd/patches/patch-doc_siproxd.conf.example
@@ -0,0 +1,58 @@
+$NetBSD$
+
+--- doc/siproxd.conf.example.orig 2016-03-25 18:44:51.000000000 +0000
++++ doc/siproxd.conf.example
+@@ -1,5 +1,5 @@
+ #
+-# /etc/siproxd.conf - siproxd configuration file
++# @PKG_SYSCONFDIR@/siproxd.conf - siproxd configuration file
+ #
+ # !! This is a sample file, adapt it to your needs before using it !!
+ #
+@@ -78,8 +78,8 @@ silence_log = 1
+ # Secure Enviroment settings:
+ # user: uid/gid to switch to after startup
+ # chrootjail: path to chroot to (chroot jail)
+-user = nobody
+-#chrootjail = /var/lib/siproxd/
++user = @SIPROXD_USER@
++#chrootjail = @SIPROXD_HOME@/
+
+ ######################################################################
+ # Memory settings
+@@ -100,7 +100,7 @@ user = nobody
+ # the specified directory path does exist!
+ # Note: If running in chroot jail, this path starts relative
+ # to the jail.
+-registration_file = /var/lib/siproxd/siproxd_registrations
++registration_file = @VARBASE@/run/siproxd/siproxd_registrations
+
+ ######################################################################
+ # Automatically save current registrations every 'n' seconds
+@@ -113,7 +113,7 @@ autosave_registrations = 300
+ # This file holds the PID of the main thread of siproxd.
+ # Note: If running in chroot jail, this path starts relative
+ # to the jail.
+-pid_file = /var/run/siproxd/siproxd.pid
++pid_file = @VARBASE@/run/siproxd/siproxd.pid
+
+ ######################################################################
+ # global switch to control the RTP proxy behaviour
+@@ -213,7 +213,7 @@ tcp_keepalive = 20
+ #
+ # OR use individual per user passwords stored in a file
+ #
+-#proxy_auth_pwfile = /etc/siproxd_passwd.cfg
++#proxy_auth_pwfile = @PKG_SYSCONFDIR@/siproxd_passwd.cfg
+ #
+ # 'proxy_auth_pwfile' has precedence over 'proxy_auth_passwd'
+
+@@ -323,7 +323,7 @@ debug_port = 0
+ # the processing order is given by the load order.
+ #
+ # plugin_dir: MUST be terminated with '/'
+-plugindir=/usr/lib/siproxd/
++plugindir=@PREFIX@/lib/siproxd/
+ #
+ # List of plugins to load. MUST use the .la file extension!
+ #load_plugin=plugin_demo.la
Home |
Main Index |
Thread Index |
Old Index