summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4ae1378a77ab235be8b70750f433ed925811163e (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
45
# Maintainer: Tatsunori Aoki <ginjiro.135 at gmail dot com>
# Contributor: kuina <kuinanein at gmail dot com>
pkgname=man-pages-ja
pkgver=0.5.0.0.20150805
pkgrel=1
pkgdesc="Man pages for Japanese"
arch=('any')
url="http://sourceforge.jp/projects/linuxjm/"
license=('custom')
makedepends=('git' 'expect')
provides=('man-pages-ja')
conflicts=('man-pages-ja')
source=('git+git://git.sourceforge.jp/gitroot/linuxjm/jm.git'
        'mkconfig.expect'
        'README.en')
md5sums=('SKIP'
         'd9ef996a4bb92abd7dfc7bb19013ce95'
         'eb138d945bba86fbc8c83768581178c8')

pkgver() {
  cd $srcdir/jm
  echo 0.5.0.0.$(git log --pretty=format:%ci -n1 | cut -f 1 -d " " | sed "s/-//g")
}

prepare() {
  cp $srcdir/jm/JM.rules $srcdir/jm/JM.rules.orig
  sed -e "s!JMHOME\=.*\$!JMHOME\=$srcdir/jm/pkgbuild!g" \
    -e "s!POD2MAN\=.*\$!POD2MAN=$(which pod2man)!g" \
    $srcdir/jm/JM.rules.orig > $srcdir/jm/JM.rules
}

build() {
  cd $srcdir/jm
  make tarball
}

package() {
  install -D -m644 $srcdir/README.en "${pkgdir}/usr/share/licenses/${pkgname}/README.en"
  install -D -m644 $srcdir/jm/dist/README "${pkgdir}/usr/share/licenses/${pkgname}/README"
  cd $srcdir/jm/pkgbuild/tmp
  cd $(ls | egrep "man-pages-ja-[0-9]+$")
  cp $srcdir/mkconfig.expect ./
  env PKGDIR="$pkgdir" ./mkconfig.expect
  make install
}