Commit 0f1cf321 authored by Natanael Copa's avatar Natanael Copa

main/git: add init.d script for git-daemon

parent 2c55ddfb
# 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"
# 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"
#!/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 $?
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment