summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Hesse2015-06-30 10:02:53 +0200
committerChristian Hesse2015-06-30 10:02:53 +0200
commita53055ab7cd6b954911234a6ca9782342301eda5 (patch)
tree6f1417ac8865a1bc97cd334d67e3885b6348d36f
downloadaur-gitosis-git.tar.gz
initial import of gitosis-git 0.2.r49.gdedb3dc-2
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD48
-rw-r--r--gitosis.install22
3 files changed, 88 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..34bbe5e92c10
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = gitosis-git
+ pkgdesc = Software for hosting git repositories - git checkout
+ pkgver = 0.2.r49.gdedb3dc
+ pkgrel = 2
+ url = https://github.com/tv42/gitosis
+ install = gitosis.install
+ arch = any
+ license = GPL2
+ depends = python2
+ depends = python2-distribute
+ depends = git
+ provides = gitosis
+ conflicts = gitosis
+ source = git://github.com/tv42/gitosis.git
+ sha1sums = SKIP
+
+pkgname = gitosis-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..348ff2c279fa
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Alper KANAT <alperkanat@raptiye.org>
+# Contributor: Christian Hesse <mail@eworm.de>
+
+pkgname=gitosis-git
+pkgver=0.2.r49.gdedb3dc
+pkgrel=2
+pkgdesc='Software for hosting git repositories - git checkout'
+url='https://github.com/tv42/gitosis'
+arch=('any')
+license=('GPL2')
+depends=('python2' 'python2-distribute' 'git')
+conflicts=('gitosis')
+provides=('gitosis')
+install=gitosis.install
+source=('git://github.com/tv42/gitosis.git')
+sha1sums=('SKIP')
+
+pkgver() {
+ cd gitosis/
+
+ if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
+ echo "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG}).r$(git rev-list --count ${GITTAG}..).g$(git log -1 --format="%h")"
+ else
+ echo "0.r$(git rev-list --count master).g$(git log -1 --format="%h")"
+ fi
+}
+
+build() {
+ cd gitosis/
+
+ python2 setup.py build
+}
+
+package() {
+ cd gitosis/
+
+ python2 setup.py install --root="${pkgdir}"
+
+ # license
+ install -Dm644 "COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+
+ # example configs
+ install -Dm644 "README.rst" "${pkgdir}/usr/share/doc/gitosis/README.rst"
+ install -Dm644 "example.conf" "${pkgdir}/usr/share/doc/gitosis/example.conf"
+ install -Dm644 "gitweb.conf" "${pkgdir}/usr/share/doc/gitosis/gitweb.conf"
+ install -Dm644 "lighttpd-gitweb.conf" "${pkgdir}/usr/share/doc/gitosis/lighttpd-gitweb.conf"
+}
+
diff --git a/gitosis.install b/gitosis.install
new file mode 100644
index 000000000000..98d949965079
--- /dev/null
+++ b/gitosis.install
@@ -0,0 +1,22 @@
+post_install() {
+ groupadd -r git &> /dev/null
+ useradd -r -m -k /dev/null -g git -d /srv/gitosis -s /bin/sh git &> /dev/null
+ mkdir -p /srv/gitosis
+ chmod 0700 /srv/gitosis
+
+ echo " > Example config files are installed in:"
+ echo " > /usr/share/doc/gitosis"
+ echo " >"
+ echo " > You can get more information from:"
+ echo " > https://wiki.archlinux.org/index.php/Gitosis"
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ userdel git &> /dev/null
+ groupdel git &> /dev/null
+}
+