Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=openjava.git;a=commitdiff;h=8f6c02bbc8e09461da74906eab4d42cb1136c830

commit 8f6c02bbc8e09461da74906eab4d42cb1136c830
Author: James Buren <[email protected]>
Date:   Fri Jun 8 20:31:17 2012 -0500

git-1.7.10.4-2-x86_64
* convert to use systemd schema

diff --git a/source/devel-extra/git/FrugalBuild 
b/source/devel-extra/git/FrugalBuild
index af9374e..e05d245 100644
--- a/source/devel-extra/git/FrugalBuild
+++ b/source/devel-extra/git/FrugalBuild
@@ -7,7 +7,7 @@ USE_HTMLMAN=${USE_HTMLMAN:-"y"}

pkgname=git
pkgver=1.7.10.4
-pkgrel=1
+pkgrel=2
pkgdesc="A fast, scalable, distributed revision control system."
_F_googlecode_dirname="git-core"
_F_archive_grepv="rc"
@@ -22,15 +22,15 @@ fi
groups=('devel-extra')
replaces=('cogito' 'bk-client')
archs=('i686' 'x86_64' 'arm')
-source=(${source[@]} gitweb.modules.d gitweb.conf README.Frugalware rc.git 
git.sysconfig)
+source=(${source[@]} gitweb.modules.d gitweb.conf README.Frugalware 
rc.$pkgname $pkgname.service $pkgname.sysconfig)
sha1sums=('ddc305ab520246790faa72bbaab4b9bf5bcf23fa' \
'c60be6e086241b85b1f0d89db22c24fc21dc6432' \
'58698ef6cf0dad734e1a1ee5689c0c4d83bf27b5' \
'92b64c9b49242935ca6ae35b3a9cad728a0c2d55' \
'ba0faa04dcee0d3ecc37b348263a969b06efd0da' \
-          'cb1abfc0e614cd3df9800bf5f663e3a3afbac7a4')
+          'fb98eb788f2d81f6795d9d83755197f41430ee62' \
+          '66caca0485216bed4814389b8219258f3992601b')
options=('scriptlet')
-Finclude texinfo

subpkgs=('gitweb' 'git-gui' 'gitk')
subdescs=('Web interface for Git.' 'Git GUI tool.' 'Git revision tree 
visualiser.')
@@ -40,6 +40,11 @@ subbackup=('etc/gitweb.conf 
etc/httpd/conf/modules.d/gitweb.conf' '' '')
subgroups=('network-extra' 'xapps-extra' 'xapps-extra')
subarchs=('i686 x86_64 arm' 'i686 x86_64 arm' 'i686 x86_64 arm')

+_F_systemd_scriptlet="$pkgname.install"
+_F_sysvinit_units=($pkgname)
+_F_systemd_units=($pkgname=)
+Finclude systemd
+
build()
{
# don't install the source of the manpages
@@ -96,6 +101,9 @@ build()
Fsplit gitk usr/bin/gitk
Fsplit gitk usr/share/man/man1/gitk.1
Fsplit gitk usr/share/doc/git-$pkgver/gitk.html
+
+       Ffile /lib/systemd/system/$pkgname.service
+       Fgenscriptlet
}

# optimization OK
diff --git a/source/devel-extra/git/git.install 
b/source/devel-extra/git/git.install
new file mode 100644
index 0000000..ef442eb
--- /dev/null
+++ b/source/devel-extra/git/git.install
@@ -0,0 +1,64 @@
+sysvinit_units=(@_F_sysvinit_units@)
+systemd_units=(@_F_systemd_units@)
+
+post_install()
+{
+       echo -n "updating the top-level info node... "
+       mkinfodir /usr/share/info > /usr/share/info/dir 2>/dev/null
+       echo "done."
+
+       local unit
+       local op
+
+       for i in ${sysvinit_units[@]}; do
+               chkconfig --del rc.$i >/dev/null 2>&1
+       done
+
+       for i in ${systemd_units[@]}; do
+               unit=$(echo $i | cut -f 1 -d '=')
+               op=$(echo $i | cut -f 2 -d '=')
+               if echo $op | grep -q 'e'; then
+                       systemctl enable $unit.service >/dev/null 2>&1
+               fi
+               if echo $op | grep -q 's'; then
+                       systemctl start $unit.service >/dev/null 2>&1
+               fi
+       done
+}
+
+post_upgrade()
+{
+       for i in ${sysvinit_units[@]}; do
+               chkconfig --del rc.$i >/dev/null 2>&1
+       done
+
+       systemctl daemon-reload >/dev/null 2>&1
+}
+
+pre_remove()
+{
+       local unit
+
+       for i in ${sysvinit_units[@]}; do
+               chkconfig --del rc.$i >/dev/null 2>&1
+       done
+
+       for i in ${systemd_units[@]}; do
+               unit=$(echo $i | cut -f 1 -d '=')
+               systemctl --no-reload disable $unit.service >/dev/null 2>&1
+               systemctl stop $unit.service >/dev/null 2>&1
+       done
+}
+
+post_remove()
+{
+       echo -n "updating the top-level info node... "
+       mkinfodir /usr/share/info > /usr/share/info/dir 2>/dev/null
+       echo "done."
+
+       systemctl daemon-reload >/dev/null 2>&1
+}
+
+op=$1
+shift
+$op $*
diff --git a/source/devel-extra/git/git.service 
b/source/devel-extra/git/git.service
new file mode 100644
index 0000000..2e196f7
--- /dev/null
+++ b/source/devel-extra/git/git.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=GIT daemon
+After=network.target
+
+[Service]
+EnvironmentFile=/etc/sysconfig/git
+ExecStart=/usr/bin/git daemon --detach --pid-file=/var/run/gitd.pid 
--reuseaddr $GIT_OPTIONS
+PIDFile=/var/run/gitd.pid
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
diff --git a/source/devel-extra/git/git.sysconfig 
b/source/devel-extra/git/git.sysconfig
index 324b90c..827780f 100644
--- a/source/devel-extra/git/git.sysconfig
+++ b/source/devel-extra/git/git.sysconfig
@@ -4,15 +4,5 @@
# confiugation file for the git daemon
#

-# remap all the path requests as relative to this path
-BASE_PATH="/home/ftp"
-
-# allow pulling from all directories that look like git repositories, even if
-# they do not have the git-daemon-export-ok file
-EXPORT="--export-all"
-
-# translate ~user to $HOME/git/public
-USER_PATH="--user-path=git/public"
-
-# the fun part
-GIT_OPTIONS="--reuseaddr --base-path=$BASE_PATH $EXPORT $USER_PATH --detach 
--pid-file=/var/run/gitd.pid"
+# Put all arguments here.
+GIT_OPTIONS="--export-all --base-path=/home/ftp --user-path=git/public"
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to