summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2680aedef690f7304bc45b300e45a67edef35b74 (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
# Maintainer: Norbert Preining <norbert@preining.info>
_UpstreamPkgName=FastFlix
pkgname=${_UpstreamPkgName,,}
pkgver=5.6.0
pkgrel=1
pkgdesc="Simple and friendly GUI for encoding videos"
arch=('x86_64')
url="https://github.com/cdgriffith/$_UpstreamPkgName"
license=('MIT')
makedepends=('git' 'python' 'icoutils')
depends=('zlib' 'ffmpeg')
optdepends=('nvenc: hardware accelerated encoding on NVIDIA cards'
	    'x265: encoding to H265/HEVC'
	    'x264: encoding to H264/AVC'
            'rav1e: encoding to AV1'
	    'libwebp: encoding to WebP')
source=(git+${url}.git#tag=${pkgver}
        FastFlix.desktop)
sha256sums=('SKIP'
            'cbcb6f228b858a69a860aa6a3283f0f4293e1246485566d20f60a93030f1f847')

# prepare() {
# 	cd $_UpstreamPkgName
# 	patch --forward --strip=1 --input="${srcdir}/allow-python310.patch"
# }

build() {
	cd ${_UpstreamPkgName}
	python -m venv venv
	source ./venv/bin/activate
	python -m pip install --upgrade pip setuptools --ignore-installed
	pip install .
	pip install .[develop]
	cp $(python -c "import iso639; print(iso639.mapping.TABLE_PATH)") iso-639-3.tab
	cp $(python -c "import iso639; print(iso639.mapping.MAPPING_PATH)") iso-639-3.json
	pyinstaller FastFlix_Nix_OneFile.spec
	# convert icon.ico to png for desktop file
	icotool --extract --index=1 -o FastFlix.png fastflix/data/icon.ico
}

package() {
	cd ${_UpstreamPkgName}
	install -Dm 755 -t "${pkgdir}/usr/bin" dist/FastFlix
	# install icon and desktop file
	install -Dm 644 -t "${pkgdir}/usr/share/icons/hicolor/256x256/apps" FastFlix.png
	install -Dm 644 -t "${pkgdir}/usr/share/applications" "${srcdir}/FastFlix.desktop"
	# since it is MIT we need to install a license file
	install -Dm 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
	# install documentation
	install -Dm 644 -t "${pkgdir}/usr/share/doc/${pkgname}" README.md
}

check() {
	cd ${_UpstreamPkgName}
	chmod +x dist/FastFlix
	dist/FastFlix --version
	dist/FastFlix --test
}