forked from eli-schwartz/pkgbuilds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
54 lines (43 loc) · 1.52 KB
/
PKGBUILD
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
46
47
48
49
50
51
52
53
54
# Maintainer: Eli Schwartz <[email protected]>
# All my PKGBUILDs are managed at https://github.com/eli-schwartz/pkgbuilds
_pkgname=FanFicFare
pkgname=fanficfare-git
pkgver=4.2.0.r0.g6d6f2737
pkgrel=1
pkgdesc="A tool for downloading fanfiction to eBook formats"
arch=('any')
url="https://github.com/JimmXinu/${_pkgname}"
license=('Apache')
_deps=('beautifulsoup4' 'brotli' 'chardet' 'cloudscraper' 'html5lib' 'html2text'
'requests-file')
depends=("${_deps[@]/#/python-}")
makedepends=('git')
optdepends=('calibre: use FanFicFare as a calibre plugin'
'python-pillow: support for converting/resizing story images and covers')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+${url}.git"
"0001-makeplugin-do-not-bundle-system-dependencies.patch")
sha256sums=('SKIP'
'6d172dcc98a8f6dcef2048272bfabd810ceeb5740969fbe406ebcd7b638e072c')
pkgver() {
cd "${srcdir}/${_pkgname}"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "${srcdir}/${_pkgname}"
patch -p1 -i ../0001-makeplugin-do-not-bundle-system-dependencies.patch
}
build() {
cd "${srcdir}/${_pkgname}"
python setup.py build
for i in calibre-plugin/translations/*.po; do
msgfmt -vv "$i" -o "${i%.po}.mo"
done
python makeplugin.py
}
package() {
cd "${srcdir}/${_pkgname}"
python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 FanFicFare.zip "${pkgdir}"/usr/share/calibre/system-plugins/FanFicFare.zip
}