summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6e86cdfe6066f5d039b6332dfdb91b0dec0564d3 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Maintainer: VCalV

_pkgname=epub_to_audiobook
_gituser=p0n1
pkgname=epub_to_audiobook-git
pkgdesc="command-line tool to convert EPUB ebooks into audiobooks"
pkgver=r205.466ba82
pkgrel=1
#epoch=1
arch=("any")
url="https://github.com/$_gituser/$_pkgname"
license=("MIT")
makedepends=('git')
depends=(
	ffmpeg
	python-beautifulsoup4
	python-ebooklib
	python-mutagen
	python-requests
	python-socksio
	python-pydub
	python
)
optdepends=(
	'python-openai: generate audio using OpenAI TTS'
	'python-edge-tts: generate audio using Microsoft edge TTS'
	'piper-tts: generate audio uding piper TSS'
	'python-gradio: web gui'
	'python-gradio_log: web gui'
	'python-sentencex: web gui'
)
conflicts=("$_pkgname")
provides=("$_pkgname")

source=(
	"git+https://github.com/$_gituser/$_pkgname.git"
	run.sh
	run_ui.sh
)
sha512sums=(
	'SKIP'
	fb715e3fdc5c18d8c72d9493b345f1b1562528fb745767b9dcaf01bcebb1e5d4edde93b4da30c0078db3b57e859b40b67309763736545f9c0b0307fe778b8cba
    e65affd982fc1de2d6603b8680dc09e91e7b63f10955db8c2ab22abb88cd205dee3fbf4e7542ad55ced1627fa7ff40d8a4b0bb0146432bf81e8b393ed3496013
)

pkgver() {
	cd "$_pkgname"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
    install -Dm755 run.sh "$pkgdir/usr/bin/$_pkgname"
    install -Dm755 run_ui.sh "$pkgdir/usr/bin/$_pkgname"_ui
	cd "$_pkgname"
	local _dest="$pkgdir/opt/$_pkgname/"
	install -d "$_dest"
	install main.py "$_dest"
	install main_ui.py "$_dest"
    install -Dm444 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    install -Dm444 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
	cp -r audiobook_generator "$_dest"
	find "$_dest" -type d -exec chmod 755 {} \;
}