aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/openxcap
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-07 22:32:50 -0300
committerFrancesco Colista <fcolista@alpinelinux.org>2019-09-09 09:59:26 +0000
commitca75928c7a7bf50ea8b679a19295cf71bc2f92f0 (patch)
tree7adc7c68f246b0c499ac67c162215f8727f54529 /unmaintained/openxcap
parent399ef5e6582e03dbd64d7e046ac9a4a1e39fedc9 (diff)
downloadaports-ca75928c7a7bf50ea8b679a19295cf71bc2f92f0.tar.bz2
aports-ca75928c7a7bf50ea8b679a19295cf71bc2f92f0.tar.xz
unmaintained/openxcap: move from testing
- Python2 only
Diffstat (limited to 'unmaintained/openxcap')
-rw-r--r--unmaintained/openxcap/APKBUILD43
-rw-r--r--unmaintained/openxcap/config.ini118
-rw-r--r--unmaintained/openxcap/openxcap.initd31
-rwxr-xr-xunmaintained/openxcap/openxcap.pre-install6
4 files changed, 198 insertions, 0 deletions
diff --git a/unmaintained/openxcap/APKBUILD b/unmaintained/openxcap/APKBUILD
new file mode 100644
index 0000000000..416cd1ccb4
--- /dev/null
+++ b/unmaintained/openxcap/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=openxcap
+pkgver=2.2.0
+pkgrel=1
+pkgdesc="Open source fully featured XCAP server"
+url="http://openxcap.org"
+pkgusers="openxcap"
+pkggroups="openxcap"
+arch="noarch"
+license="GPL"
+depends="python2 py-application py-gnutls py-twisted py-pillow
+ py-lxml py-mysqldb"
+makedepends="python2-dev"
+install="$pkgname.pre-install"
+source="http://download.ag-projects.com/XCAP/$pkgname-$pkgver.tar.gz
+ config.ini
+ openxcap.initd
+"
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ mkdir -p "$pkgdir"/usr/lib/python2.6/site-packages
+ python2 setup.py install --root="$pkgdir" || return 1
+ echo "/usr/lib/python2.6/site-packages/$pkgname-$pkgver-py2.6.egg" \
+ > "$pkgdir"/usr/lib/python2.6/site-packages/$pkgname.pth
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/config.ini \
+ "$pkgdir"/etc/openxcap/config.ini
+ install -d -o openxcap "$pkgdir"/var/run/openxcap
+ chown -R $pkgusers:$pkggroups "$pkgdir"/var/run/openxcap
+
+ chgrp $pkggroups "$pkgdir"/etc/openxcap/config.ini
+}
+
+md5sums="14eacc9b5daa9451b2a585a82e24eff1 openxcap-2.2.0.tar.gz
+7a18872843586717eaf3879444cc13d2 config.ini
+eb916ed5abe002493a2721f7769e8ee5 openxcap.initd"
+sha256sums="4b932cade046e4723f7339fa8270997501c52fb2c3eb6b33a684537386fcc007 openxcap-2.2.0.tar.gz
+078f4a5787a6c6c07e3fe279e2767eb33bcd2d9ce6c624ecb11f6e5778c2495c config.ini
+59df4642575f778da2f3b8a730fa06c6a820498507c13a3c9ffd042828ab8c95 openxcap.initd"
+sha512sums="2e1b857d5083f34d42d621db7109fe1f0ba1f026220325ae9be54a9e5b7e4046798331ef2ebe56f5026d2c676da23dbde7b56317793ece173ac92e99274ff5cb openxcap-2.2.0.tar.gz
+176399345d19dcfe6f8b5d341490c5d48dbbb8c00a3dc22e76287814988f26bf4aab7b5229e3ce049141d6861ff1bc1d7b973e74434377e619cb6eaa8715861c config.ini
+df4874b0654ad89ab458a6b2924aa16be955e6d58ea28285c9dde48d7645361a57497b31e64197a0dfd5e740e158486a6330b3c0d65dcef940f5e20b0b319dde openxcap.initd"
diff --git a/unmaintained/openxcap/config.ini b/unmaintained/openxcap/config.ini
new file mode 100644
index 0000000000..bcf5b22f23
--- /dev/null
+++ b/unmaintained/openxcap/config.ini
@@ -0,0 +1,118 @@
+;
+; Configuration file for OpenXCAP
+;
+; The values in the commented lines represent the defaults built in the
+; server software
+;
+[Server]
+
+; IP address to listen for requests
+; 0.0.0.0 means any address of this host
+
+; address = 0.0.0.0
+
+; This is a comma separated list of XCAP root URIs. The first is the
+; primary XCAP root URI, while the others (if specified) are aliases.
+; The primary root URI is used when generating xcap-diff
+; If the scheme is https, then the server will listen for requests in TLS mode.
+
+root = http://xcap.example.com/xcap-root
+
+; The backend to be used for storage and authentication. Current supported
+; values are Database and OpenSIPS. OpenSIPS backend inherits all the settings
+; from the Database backend but performs extra actions related to the
+; integration with OpenSIPS for which it read the settings from [OpenSIPS]
+; section
+
+backend = OpenSIPS
+
+; Validate XCAP documents against XML schemas
+
+; document_validation = Yes
+
+
+[Logging]
+
+; Start, stop and major server error messages are always logged to syslog.
+
+; This section can be used to log more details about XCAP clients accessing
+; the server. The values in the commented lines represent the defaults built
+; in the server software
+
+; Directory where to write access.log file that will contain requests and/or
+; responses to OpenXCAP server in Apache style. If set to an empty string,
+; access logs will be printed to stdout if the server runs in no-fork mode
+; or to syslog if the server runs in the background
+
+; directory=/var/log/openxcap
+
+; The following parameters control what kind of information (like
+; stacktrace, body or headers) is logged for which response codes. The
+; values must be a comma-separated list of HTTP response codes or the
+; keyword 'any' that matches all response codes.
+
+; log_stacktrace=500
+; log_response_headers=500
+; log_response_body=500
+; log_request_headers=500
+; log_request_body=500
+
+
+[Authentication]
+
+; The HTTP authentication type, this can be either 'basic' or 'digest'. The
+; standard states 'digest' as the mandatory, however it can be changed to
+; basic
+
+; type = digest
+
+; Specify if the passwords are stored as plain text - Yes
+; or in a hashed format MD5('username:domain:password') - No
+; cleartext_passwords = Yes
+
+; The default authentication realm, if none indicated in the HTTP request
+; URI
+default_realm = example.com
+
+; A comma-separated list of hosts or networks to trust.
+; The elements can be an IP address in CIDR format, a
+; hostname or an IP address (in the latter 2 a mask of 32
+; is assumed), or the special keywords 'any' and 'none'
+; (being equivalent to 0.0.0.0/0 and 0.0.0.0/32
+; respectively).
+; trusted_peers =
+
+
+[TLS]
+
+; Location of X509 certificate and private key that identify this server.
+; The path is relative to /etc/openxcap, or it can be given as an absolute
+; path.
+
+; Server X509 certificate
+; certificate =
+
+; Server X509 private key
+; private_key =
+
+
+[Database]
+
+; The database connection URI for the datase with subscriber accounts
+authentication_db_uri = pgsql://username:password@db/opensips
+
+; The database connection URI for the database that stores the XCAP documents
+storage_db_uri = mysql://username:password@db/opensips
+
+; Authentication and storage tables
+; subscriber_table = subscriber
+; xcap_table = xcap
+
+
+[OpenSIPS]
+
+; The address and port of the xml-rpc management interface
+xmlrpc_url = http://sip.example.com:8080
+
+; Publish xcap-diff event via OpenSIPS management interface
+; enable_publish_xcapdiff = yes
diff --git a/unmaintained/openxcap/openxcap.initd b/unmaintained/openxcap/openxcap.initd
new file mode 100644
index 0000000000..7a2f667e1b
--- /dev/null
+++ b/unmaintained/openxcap/openxcap.initd
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+INSTALL_DIR="/usr/bin"
+RUNTIME_DIR="/var/run/openxcap"
+DEFAULTS="/etc/default/openxcap"
+SERVER="$INSTALL_DIR/openxcap"
+PID="$RUNTIME_DIR/openxcap.pid"
+OPTIONS=""
+NAME="openxcap"
+DESC="OpenXCAP server"
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting $DESC: $NAME "
+ start-stop-daemon --start --quiet --pidfile $PID --exec $SERVER -- $OPTIONS
+ eend $?
+}
+
+stop () {
+ ebegin -n "Stopping $DESC: $NAME "
+ start-stop-daemon --stop --quiet --oknodo --signal 15 --pidfile $PID
+ eend $?
+}
+
+exit 0
+
diff --git a/unmaintained/openxcap/openxcap.pre-install b/unmaintained/openxcap/openxcap.pre-install
new file mode 100755
index 0000000000..0a932aa4fe
--- /dev/null
+++ b/unmaintained/openxcap/openxcap.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S openxcap 2>/dev/null
+adduser -S -D -H -h /var/run/openxcap -s /bin/false -G openxcap -g openxcap openxcap 2>/dev/null
+
+exit 0