diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/git/APKBUILD | 13 | ||||
-rw-r--r-- | main/git/git-daemon.confd | 19 | ||||
-rw-r--r-- | main/git/git-daemon.initd | 30 |
3 files changed, 60 insertions, 2 deletions
diff --git a/main/git/APKBUILD b/main/git/APKBUILD index dec110927..1d37437f2 100644 --- a/main/git/APKBUILD +++ b/main/git/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=git pkgver=1.7.3.2 -pkgrel=0 +pkgrel=1 pkgdesc="GIT - the stupid content tracker" url="http://git.or.cz/" license="GPL2" @@ -10,6 +10,8 @@ subpackages="$pkgname-doc $pkgname-perl" makedepends="zlib-dev openssl-dev curl-dev expat-dev perl-dev python-dev" source="http://kernel.org/pub/software/scm/git/git-$pkgver.tar.bz2 bb-tar.patch + git-daemon.initd + git-daemon.confd " _makeopts="NO_ICONV=YesPlease @@ -26,6 +28,11 @@ build() { package() { cd "$srcdir"/$pkgname-$pkgver make prefix=/usr DESTDIR="$pkgdir" $_makeopts install + mkdir -p "$pkgdir"/var/git + install -Dm755 "$srcdir"/git-daemon.initd \ + "$pkgdir"/etc/init.d/git-daemon + install -Dm644 "$srcdir"/git-daemon.confd \ + "$pkgdir"/etc/conf.d/git-daemon } perl() { @@ -43,4 +50,6 @@ perl() { md5sums="902f7f07a789fedc0d2ac03656b85969 git-1.7.3.2.tar.bz2 -e63a201556c4f089de790805c09a2e5b bb-tar.patch" +e63a201556c4f089de790805c09a2e5b bb-tar.patch +1afefbcc6f7535f94aea279bfd7dc9ce git-daemon.initd +6d2fbf726d0a6fd49227e6f148ffbe25 git-daemon.confd" diff --git a/main/git/git-daemon.confd b/main/git/git-daemon.confd new file mode 100644 index 000000000..75b421680 --- /dev/null +++ b/main/git/git-daemon.confd @@ -0,0 +1,19 @@ +# conf.d file for git-daemon +# +# Please check man 1 git-daemon for more information about the options +# git-daemon accepts. You MUST edit this to include your repositories you wish +# to serve. +# +# Some of the meaningful options are: +# --syslog --- Enables syslog logging +# --verbose --- Enables verbose logging +# --export-all --- Exports all repositories +# --port=XXXX --- Starts in port XXXX instead of 9418 +# +GITDAEMON_OPTS="--syslog /var/git" + +# To run an anonymous git safely, the following user should be able to only +# read your Git repositories. It should not able able to write to anywhere on +# your system, esp. not the repositories. +GIT_USER="nobody" +GIT_GROUP="nobody" diff --git a/main/git/git-daemon.initd b/main/git/git-daemon.initd new file mode 100644 index 000000000..c6ee19f5c --- /dev/null +++ b/main/git/git-daemon.initd @@ -0,0 +1,30 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/files/git-daemon.initd,v 1.1 2010/03/17 15:13:27 sping Exp $ + +PIDFILE=/var/run/git-daemon.pid + +depend() { + need net + use logger +} + +start() { + [ -e /lib/librc.so ] || BL1_COMPAT="--name git-daemon" + ebegin "Starting git-daemon" + start-stop-daemon --start --quiet --background \ + --pidfile ${PIDFILE} ${BL1_COMPAT} \ + --exec /usr/bin/git -- daemon \ + --pid-file=${PIDFILE} \ + --user=${GIT_USER} --group=${GIT_GROUP} \ + ${GITDAEMON_OPTS} + eend $? +} + +stop() { + ebegin "Stopping git-daemon" + start-stop-daemon --stop --quiet \ + --pidfile ${PIDFILE} + eend $? +} |