PKGBUILD 1.22 KB
Newer Older
Jeff Huang's avatar
Jeff Huang committed
1
# Contributions from Arch:
2 3 4 5 6 7 8
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: dickeny@gmail.com
# Contributor: cuihao <cuihao dot leo at gmail dot com>

pkgbase=man-pages-zh
pkgname=(man-pages-zh_cn man-pages-zh_tw)
_pkgname=manpages-zh
9
pkgver=1.6.3.3
10 11
pkgrel=1
arch=('any')
12
url='https://github.com/man-pages-zh/manpages-zh'
13 14
license=('GPL2')
depends=('man-db')
Jeff Huang's avatar
Jeff Huang committed
15
makedepends=('opencc' 'python3' 'git')
16
conflicts=('man-pages-zh' 'manpages-zh')
Jeff Huang's avatar
Jeff Huang committed
17 18
source=("git+https://github.com/man-pages-zh/manpages-zh.git#tag=v$pkgver")
md5sums=('SKIP')
19 20

build() {
Jeff Huang's avatar
Jeff Huang committed
21 22
    cd "${srcdir}/manpages-zh"
    autoreconf -i
23 24 25 26 27 28 29
    ./configure --prefix=/usr
    make
}

package_man-pages-zh_cn() {
    pkgdesc='Simplified Chinese Linux man pages'

Jeff Huang's avatar
Jeff Huang committed
30
    cd "${srcdir}/manpages-zh"
31 32 33 34 35 36
    make install DESTDIR="${pkgdir}"

    rm -r "${pkgdir}/usr/share/man/zh_TW"

    # remove conflicted files with shadow
    cd "${pkgdir}/usr/share/man/zh_CN"
Jeff Huang's avatar
Jeff Huang committed
37
    rm -f ./man1/groups*
38 39 40 41 42
}

package_man-pages-zh_tw() {
    pkgdesc='Traditional Chinese Linux man pages'

Jeff Huang's avatar
Jeff Huang committed
43
    cd "${srcdir}/manpages-zh"
44 45 46 47 48 49
    make install DESTDIR="${pkgdir}"

    rm -r "${pkgdir}/usr/share/man/zh_CN"

    # remove conflicted files with shadow
    cd "${pkgdir}/usr/share/man/zh_TW"
Jeff Huang's avatar
Jeff Huang committed
50
    rm -f ./man1/groups*
51
}