[arch-commits] Commit in cgit/trunk (PKGBUILD cgit.install)

Lukas Fleischer lfleischer at nymeria.archlinux.org
Thu Aug 29 18:03:01 UTC 2013


    Date: Thursday, August 29, 2013 @ 20:03:00
  Author: lfleischer
Revision: 96461

cgit: Several improvements

* Use `make get-git` instead of hardcoding the Git version.
* Add quotes around some variables.
* Improve install message.

Modified:
  cgit/trunk/PKGBUILD
  cgit/trunk/cgit.install

--------------+
 PKGBUILD     |   26 ++++++++++++--------------
 cgit.install |    6 ++----
 2 files changed, 14 insertions(+), 18 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-08-29 16:47:40 UTC (rev 96460)
+++ PKGBUILD	2013-08-29 18:03:00 UTC (rev 96461)
@@ -1,13 +1,12 @@
 # $Id$
 # Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Current Maintainer:  Patrick Palka <patrick at parcs.ath.cx>
-# Previous Maintainer:  Loui Chang <louipc.ist at gmail com>
+# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: Patrick Palka <patrick at parcs.ath.cx>
+# Contributor: Loui Chang <louipc.ist at gmail com>
 # Contributor: Andreas Baumann <abaumann at yahoo dot com>
-# Development: http://closure.ath.cx/aur-dev
 
 pkgname=cgit
 pkgver=0.9.2
-_gitver=1.8.3
 pkgrel=2
 pkgdesc="A web interface for git written in plain C"
 arch=('i686' 'x86_64')
@@ -17,18 +16,17 @@
 makedepends=('zlib' 'curl' 'asciidoc')
 install=cgit.install
 source=("http://git.zx2c4.com/cgit/snapshot/cgit-$pkgver.tar.xz"
-	"git-${_gitver}.tar.gz::https://github.com/git/git/archive/v${_gitver}.tar.gz"
 	"apache.example.conf")
 md5sums=('fe11018eff8d79caad112f4fac64b90f'
-         '73224d3dc86c4999cc49484b49c9acc4'
          'bd5696bea0654bfcf98f249b1a36737d')
 
+prepare() {
+  cd "$pkgname-$pkgver"
+  make get-git
+}
+
 build() {
   cd "$pkgname-$pkgver"
-  _cgit_gitver=`grep 'GIT_VER = ' Makefile | cut -f3 -d\ `
-  [ "x${_gitver}" == "x${_cgit_gitver}" ] || { msg "Bad git version"; return 1; }
-  rm -rf git/*
-  mv ../git-${_gitver}/* git/
   make
   make doc-man
 }
@@ -37,8 +35,8 @@
   cd "$pkgname-$pkgver"
   make CGIT_SCRIPT_PATH=/usr/share/webapps/cgit DESTDIR="$pkgdir" install install-man
   install -vd "$pkgdir/var/cache/$pkgname"
-  install -vDm0644 $srcdir/apache.example.conf $pkgdir/etc/webapps/cgit/apache.example.conf
-  mkdir -p $pkgdir/usr/lib/cgit
-  mv $pkgdir/usr/share/webapps/cgit/cgit.cgi $pkgdir/usr/lib/cgit
-  ln -sf ../../../lib/cgit/cgit.cgi $pkgdir/usr/share/webapps/cgit/cgit.cgi
+  install -vDm0644 "$srcdir/apache.example.conf" "$pkgdir/etc/webapps/cgit/apache.example.conf"
+  mkdir -p "$pkgdir/usr/lib/cgit"
+  mv "$pkgdir/usr/share/webapps/cgit/cgit.cgi" "$pkgdir/usr/lib/cgit"
+  ln -sf ../../../lib/cgit/cgit.cgi "$pkgdir/usr/share/webapps/cgit/cgit.cgi"
 }

Modified: cgit.install
===================================================================
--- cgit.install	2013-08-29 16:47:40 UTC (rev 96460)
+++ cgit.install	2013-08-29 18:03:00 UTC (rev 96461)
@@ -1,7 +1,5 @@
 post_install() {
-   echo -n "Setting ownership of /var/cache/cgit to http:http ... "
    chown -v http:http var/cache/cgit
-   echo "done."
-   echo -n "cgit looks at /etc/cgitrc for configuration. there is "
-   echo "an example configuration file in its manpage."
+   echo "==> cgit looks at /etc/cgitrc for configuration. There is"
+   echo "==> an example configuration file in the cgitrc(5) man page."
 }




More information about the arch-commits mailing list