summaryrefslogtreecommitdiff
path: root/community/cgit/PKGBUILD
blob: 9f0b824bf31f1aa14e9bd760f98b9b39cac0d0fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# $Id: PKGBUILD 106333 2014-02-28 07:30:32Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Patrick Palka <patrick@parcs.ath.cx>
# Contributor: Loui Chang <louipc.ist at gmail com>
# Contributor: Andreas Baumann <abaumann at yahoo dot com>

pkgname=cgit
pkgver=0.10.1
pkgrel=1
pkgdesc="A web interface for git written in plain C"
arch=('i686' 'x86_64')
url="http://git.zx2c4.com/cgit/"
license=('GPL2')
depends=('openssl' 'luajit')
makedepends=('zlib' 'curl' 'asciidoc')
install=cgit.install
source=("http://git.zx2c4.com/cgit/snapshot/cgit-$pkgver.tar.xz"
	"apache.example.conf")
md5sums=('060ef0aa95ebda6ea7daf823214bc4d0'
         'bd5696bea0654bfcf98f249b1a36737d')

prepare() {
  cd "$pkgname-$pkgver"
  make get-git
}

build() {
  cd "$pkgname-$pkgver"
  make
  make doc-man
}

package() {
  cd "$pkgname-$pkgver"

  make CGIT_SCRIPT_PATH=/usr/share/webapps/cgit DESTDIR="$pkgdir" prefix=/usr 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"
}