summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 01ad77b801a93dead25893d16011c0c4df4e8a05 (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
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Gadget3000 <gadget3000 at msn dot com>
# Contributor: sssslang <xofyarg at gmail dot com>
# Contributor: Rick W. Chen <stuffcorpse@archlinux.us>

# Change to yanyu for experimental content
_branch=master

pkgname=fortune-mod-zh-git
pkgver=1.8.r38.g3a06c3c
pkgrel=1
pkgdesc="Chinese poems for fortune-mod"
url="http://packages.qa.debian.org/f/fortune-zh.html"
license="GPL"
depends=('fortune-mod')
makedepends=('git')
conflicts=('fortune-mod-zh')
source=("git+https://anonscm.debian.org/git/chinese/fortune-zh.git#branch=$_branch")
md5sums=('SKIP')
arch=('i686' 'x86_64')

pkgver() {
  cd fortune-zh
  git describe --long | sed 's#^debian/##;s/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  # Fix path in fortune-zh executable
  cd fortune-zh
  sed -i "s|/usr/games/fortune|/usr/bin/fortune|" fortune-zh
}

build() {
  cd fortune-zh
  make
}

package() {
  cd fortune-zh
  make DESTDIR="$pkgdir" FORTUNES=/usr/share/fortune GAMES=/usr/bin install
}