From 329fa06ddd72e53143c6efda7f7792417a29714c Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 9 Feb 2009 11:44:25 +0000 Subject: testing/subversion: new aport --- testing/subversion/APKBUILD | 37 +++++++++++++++++++++++++++++ testing/subversion/subversion.install | 10 ++++++++ testing/subversion/svnserve.confd | 10 ++++++++ testing/subversion/svnserve.initd | 44 +++++++++++++++++++++++++++++++++++ 4 files changed, 101 insertions(+) create mode 100644 testing/subversion/APKBUILD create mode 100644 testing/subversion/subversion.install create mode 100644 testing/subversion/svnserve.confd create mode 100644 testing/subversion/svnserve.initd diff --git a/testing/subversion/APKBUILD b/testing/subversion/APKBUILD new file mode 100644 index 00000000..463d6856 --- /dev/null +++ b/testing/subversion/APKBUILD @@ -0,0 +1,37 @@ +# Maintainer: Natanael Copa +pkgname=subversion +pkgver=1.5.5 +pkgrel=0 +pkgdesc="Replacement for CVS, another versioning system (svn)" +url="http://subversion.tigris.org/" +license="apache bsd" +depends="apr apr-util expat neon openssl uclibc zlib" +makedepends="apr-dev apr-util-dev expat-dev neon-dev openssl-dev zlib-dev + e2fsprogs-dev libuuid" +install="$pkgname.install" +source="http://svn.collab.net/tarballs/$pkgname-$pkgver.tar.gz + svnserve.confd + svnserve.initd + $install + " + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr \ + --disable-nls \ + --without-apxs \ + --disable-javahl \ + --without-jdk + + make external-all || return 1 + make local-all || return 1 + make -j1 DESTDIR="$pkgdir" install || return 1 + + install -Dm755 "$srcdir"/svnserve.initd "$pkgdir"/etc/init.d/svnserve + install -Dm644 "$srcdir"/svnserve.confd "$pkgdir"/etc/conf.d/svnserve +} +md5sums="532c7d49b3cd33d712289a5ef03b7749 subversion-1.5.5.tar.gz +d084a7558053784886bc858b94fa9186 svnserve.confd +06cf9328f63a935654971052a2c3594a svnserve.initd +517b0819f3544df9dbee1f90f4289f34 subversion.install" diff --git a/testing/subversion/subversion.install b/testing/subversion/subversion.install new file mode 100644 index 00000000..b61563cc --- /dev/null +++ b/testing/subversion/subversion.install @@ -0,0 +1,10 @@ +#!/bin/sh + +case "$1" in + pre_install) + addgroup svnusers 2>/dev/null + adduser svn -D -h /var/svn -G svnusers 2>/dev/null + ;; +esac +exit 0 + diff --git a/testing/subversion/svnserve.confd b/testing/subversion/svnserve.confd new file mode 100644 index 00000000..b487a409 --- /dev/null +++ b/testing/subversion/svnserve.confd @@ -0,0 +1,10 @@ +# 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. + +# Options for svnserve +#SVNSERVE_OPTS="--root=/var/svn" + +# User and group as which to run svnserve +SVNSERVE_USER="svn" +SVNSERVE_GROUP="svnusers" diff --git a/testing/subversion/svnserve.initd b/testing/subversion/svnserve.initd new file mode 100644 index 00000000..036d0187 --- /dev/null +++ b/testing/subversion/svnserve.initd @@ -0,0 +1,44 @@ +#!/sbin/runscript +# Copyright 2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/files/svnserve.initd,v 1.2 2005/08/25 13:59:48 pauldv Exp $ + +opts="$opts setup" + +depend() { + need net +} + +start() { + ebegin "Starting svnserve" + # Ensure that we run from a readable working dir, and that we do not + # lock filesystems when being run from such a location. + cd / + start-stop-daemon --start --quiet --background --make-pidfile \ + --pidfile /var/run/svnserve.pid --exec /usr/bin/svnserve \ + --chuid ${SVNSERVE_USER:-apache}:${SVNSERVE_GROUP:-apache} -- \ + --foreground --daemon ${SVNSERVE_OPTS:---root=/var/svn} + eend $? +} + +stop() { + ebegin "Stopping svnserve" + start-stop-daemon --stop --quiet --pidfile /var/run/svnserve.pid + eend $? +} + +setup() { + local root=${SVNSERVE_ROOT:-/var/svn} + ebeging "Setting up svnserve repositories in $root" + if [ -e "$root/repos" ]; then + eend 1 "$root/repos already exist" + return 1 + fi + + svnadmin create "$root"/repos + chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "$root/repos" + mkdir -p "$root/conf" + chmod -Rf go-rwx "$root/conf" + chmod -Rf o-rwx "$root/repos" + eend $? +} -- cgit v1.2.3