Skip to content

Commit cb6ea79

Browse files
committed
arch-wiki-docs-zh: update
1 parent f56b00d commit cb6ea79

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

archlinuxcn/arch-wiki-docs-zh/PKGBUILD

+26-12
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,50 @@
22
# Maintainer: George Rawlinson <[email protected]>
33
# Maintainer: Sergej Pupykin <[email protected]>
44

5-
pkgname=arch-wiki-docs-zh
6-
pkgver=20221208
5+
pkgbase=arch-wiki-docs-zh
6+
pkgname=(arch-wiki-docs-zh-cn arch-wiki-docs-zh-tw)
7+
pkgver=20221209
78
pkgrel=1
89
pkgdesc='Pages from www.archlinuxcn.org optimized for offline browsing'
910
arch=('any')
10-
url='https://github.com/lahwaacz/arch-wiki-docs'
11+
url='https://github.com/archlinuxcn/arch-wiki-docs-zh'
1112
license=('FDL')
1213
makedepends=(
1314
'git' 'python' 'python-simplemediawiki' 'python-lxml' 'python-cssselect' 'python-requests'
1415
)
1516
options=('!strip')
16-
_commit='8082524dda618479fca65ab6cb13d69822d444bd'
17-
source=("$pkgname::git+https://github.com/lahwaacz/arch-wiki-docs#commit=$_commit")
17+
source=("$pkgbase::git+https://github.com/archlinuxcn/arch-wiki-docs-zh.git")
1818
b2sums=('SKIP')
1919

2020
pkgver() {
2121
date "+%Y%m%d"
2222
}
2323

24-
prepare() {
25-
cd "$pkgname"
24+
build() {
25+
cd "$pkgbase"
2626

27-
sed -i 's|^url = .*|url = "https://wiki.archlinuxcn.org/wzh/api.php"|' ArchWiki/ArchWiki.py
2827
LANG=en_US.UTF-8 python \
2928
arch-wiki-docs.py \
30-
--output-directory "$srcdir/build_wiki" \
29+
--output-directory "$srcdir/build_wiki_zh-cn" \
30+
--variant "zh-cn" \
3131
--clean
32+
33+
LANG=en_US.UTF-8 python \
34+
arch-wiki-docs.py \
35+
--output-directory "$srcdir/build_wiki_zh-tw" \
36+
--variant "zh-tw" \
37+
--clean
38+
}
39+
40+
package_arch-wiki-docs-zh-cn() {
41+
_package zh-cn
42+
}
43+
44+
package_arch-wiki-docs-zh-tw() {
45+
_package zh-tw
3246
}
3347

34-
package() {
35-
install -vdm755 "$pkgdir/usr/share/doc/arch-wiki-zh/html"
36-
cp -r build_wiki/* "$pkgdir/usr/share/doc/arch-wiki-zh/html"
48+
_package() {
49+
install -vdm755 "$pkgdir/usr/share/doc/arch-wiki-$1/html"
50+
cp -r build_wiki_$1/* "$pkgdir/usr/share/doc/arch-wiki-$1/html"
3751
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
arch-wiki-docs-zh-cn
2+
arch-wiki-docs-zh-tw

0 commit comments

Comments
 (0)