summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorspecter1192019-10-27 19:02:23 +0800
committerspecter1192019-10-27 19:02:23 +0800
commitb2174b26c69bb7859dc096467a9c6864d6a5f9a9 (patch)
tree5489ea0f16e15802438ffbefeb7813835d545864 /PKGBUILD
parentf440e8dec840924b6348b7418829ef0e107f3a75 (diff)
downloadaur-b2174b26c69bb7859dc096467a9c6864d6a5f9a9.tar.gz
build locale file .mo and add .gitignore
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD30
1 files changed, 19 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 7027659d957..4196fe2e47f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,41 @@
# Maintainer: Ke Liu <spcter119@gmail.com>
pkgname=python-efb-wechat-slave-git
-pkgver=r148.5f033a9
+_provide=${pkgname%-git}
+_name=${_provide#python-}
+pkgver=r152.d6a3be6
pkgrel=1
pkgdesc='EFB WeChat Slave, a channel for EH Forwarder Bot.'
arch=('any')
url='https://github.com/blueset/efb-wechat-slave'
license=('AGPL-3')
groups=('efb')
-depends=('python-ehforwarderbot' 'python-itchat' 'python-magic-ahupp' 'python-pillow' 'libwebp' 'python-pyqrcode' 'python-xmltodict' 'python-yaml' 'python-requests' 'python-typing-extensions' 'python-bullet' 'python-cjkwrap')
-makedepends=('git')
-provides=("${pkgname%-git}")
-conflicts=("${pkgname%-git}")
-source=("${pkgname%-git}"::"git+${url}.git")
+depends=(
+ 'python-ehforwarderbot' 'python-itchat' 'python-magic-ahupp' 'python-pillow' 'libwebp' 'python-pyqrcode' 'python-xmltodict' 'python-yaml' 'python-requests' 'python-typing-extensions' 'python-bullet' 'python-cjkwrap')
+makedepends=('git' 'python-setuptools')
+provides=($_provide)
+conflicts=($_provide)
+source=("$_provide"::"git+${url}.git")
md5sums=('SKIP')
pkgver() {
- cd "$srcdir/${pkgname%-git}"
+ cd "$srcdir/$_provide"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
- cd "$srcdir/${pkgname%-git}"
+ cd "$srcdir/$_provide"
python setup.py clean --all
python setup.py build
+ cd "build/lib/${_name//-/_}/locale/"
+ for _locale in $(ls); do
+ (cd "$_locale/LC_MESSAGES/"; msgfmt "${_name//-/_}.po" -o "${_name//-/_}.mo")
+ done
}
package() {
- cd "$srcdir/${pkgname%-git}"
- python setup.py install --root "$pkgdir"
- install -Dm644 "$srcdir/${pkgname%-git}/LICENSE.md" "$pkgdir/usr/share/licenses/${pkgname%-git}/LICENSE.md"
+ cd "$srcdir/$_provide"
+ python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+ install -Dm644 "$srcdir/$_provide/LICENSE.md" "$pkgdir/usr/share/licenses/$_provide/LICENSE.md"
}
+