summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b9af70d141cae894c67b6cb71122f222a5077162 (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
# Maintainer: bemxio <bemxiov at protonmail dot com>

pkgname=fastvideods-encoder-git
pkgdesc="Encoder for the FastVideoDS format"

pkgver=r2.1a25c4f
pkgrel=3
epoch=1 # required because of the changed version numbering scheme

arch=(i686 x86_64)

url="https://github.com/Gericom/FastVideoDSEncoder"
license=("LicenseRef-unknown")

depends=(dotnet-runtime-6.0 ffmpeg5.1)
makedepends=(git dotnet-sdk)

provides=(fastvideods-encoder)

source=("git+https://github.com/Gericom/FastVideoDSEncoder.git" "fix-library-path.patch")
md5sums=("SKIP" "594a84df360613bbd562f4b77c743850")

pkgver() {
  	# move to the source directory
	cd FastVideoDSEncoder
  	
	# use the number of revisions since beginning of the history
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

prepare() {
	# move to the source directory
	cd FastVideoDSEncoder

	# apply the patch
	patch --forward --strip 1 --input ../fix-library-path.patch
}

build() {
	# move to the source directory
	cd FastVideoDSEncoder

	# build the project
	dotnet build FastVideoDS.sln --property:Configuration=Release --output Build/
}

package() {
	# move to the source directory
	cd FastVideoDSEncoder

	# make the required directories
	mkdir -p "${pkgdir}/usr/share/fastvideods-encoder/"
	mkdir -p "${pkgdir}/usr/bin/"

	# copy the build files to the package directory
	install -Dm755 Build/* "${pkgdir}/usr/share/fastvideods-encoder/"

	# make a symlink to the executable
	ln -s /usr/share/fastvideods-encoder/FastVideoDSEncoder "${pkgdir}/usr/bin/fastvideods-encoder"
}