summaryrefslogtreecommitdiffstats
path: root/main/trac
diff options
context:
space:
mode:
Diffstat (limited to 'main/trac')
-rw-r--r--main/trac/APKBUILD35
-rw-r--r--main/trac/trac.pre-install5
-rw-r--r--main/trac/tracd.confd13
-rwxr-xr-xmain/trac/tracd.initd27
4 files changed, 80 insertions, 0 deletions
diff --git a/main/trac/APKBUILD b/main/trac/APKBUILD
new file mode 100644
index 000000000..d4e09e554
--- /dev/null
+++ b/main/trac/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=trac
+_realname=Trac
+pkgver=0.11.7
+pkgrel=1
+pkgusers="tracd"
+pkggroups="tracd"
+pkgdesc="Trac is a minimalistic web-based project management, wiki and bug/issue tracking system."
+url="http://trac.edgewall.com/"
+license="GPL"
+depends="python py-setuptools py-genshi py-sqlite"
+makedepends="python-dev"
+install="$pkgname.pre-install"
+source="ftp://ftp.edgewall.com/pub/$pkgname/$_realname-$pkgver.tar.gz
+ tracd.confd
+ tracd.initd"
+
+_builddir="$srcdir"/$_realname-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+package() {
+ cd "$_builddir"
+ install -d -o tracd -g tracd "$pkgdir"/var/lib/trac
+ install -m755 -D "$srcdir"/tracd.initd "$pkgdir"/etc/init.d/tracd
+ install -m644 -D "$srcdir"/tracd.confd "$pkgdir"/etc/conf.d/tracd
+}
+
+md5sums="3cd96dad0e4f25d977c422fd6e985e99 Trac-0.11.7.tar.gz
+95b1311ca65e1ffcd51a191542f45ba4 tracd.confd
+e53761b1e84c5d68c8e6c4b837e57008 tracd.initd"
diff --git a/main/trac/trac.pre-install b/main/trac/trac.pre-install
new file mode 100644
index 000000000..05c659552
--- /dev/null
+++ b/main/trac/trac.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup tracd 2>/dev/null
+adduser -s /bin/false -G tracd -D -H tracd 2>/dev/null
+exit 0
diff --git a/main/trac/tracd.confd b/main/trac/tracd.confd
new file mode 100644
index 000000000..2cb9d292a
--- /dev/null
+++ b/main/trac/tracd.confd
@@ -0,0 +1,13 @@
+# The commented variables in this file are the defaults that are used
+# in the init-script. You don't need to uncomment them except to
+# customize them to different values.
+
+# Port for tracd
+#TRACD_PORT="8000"
+
+# Options for tracd
+#TRACD_OPTS="--env-parent-dir /var/lib/trac/"
+
+# User and group as which to run tracd
+#TRACD_USER="tracd"
+#TRACD_GROUP="tracd"
diff --git a/main/trac/tracd.initd b/main/trac/tracd.initd
new file mode 100755
index 000000000..83f84052d
--- /dev/null
+++ b/main/trac/tracd.initd
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/www-apps/trac/files/tracd.initd,v 1.4 2010/05/28 14:43:40 arfrever Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting tracd"
+ # tracd fails to create pidfile if started as non-root user, thus we are asking
+ # s-s-d to do that. To have correct pid we avoid -d option of tracd and use
+ # --background option of s-s-d.
+ start-stop-daemon --start --chuid ${TRACD_USER:-tracd}:${TRACD_GROUP:-tracd} \
+ --pidfile /var/run/tracd.pid --make-pidfile --background \
+ --env PYTHON_EGG_CACHE="/var/lib/trac/egg-cache" \
+ --exec /usr/bin/python -- /usr/bin/tracd \
+ -p ${TRACD_PORT:-8000} ${TRACD_OPTS:---env-parent-dir /var/lib/trac/}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tracd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/tracd.pid
+ eend $?
+}