summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c3338f51349c4184db6cde5a965978547c8f198b (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@protonmail.com>

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

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

arch=(i686 x86_64)

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

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

provides=(FastVideoDSEncoder)

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

pkgver() {
  	# move to the source directory
	cd "${srcdir}/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 "${srcdir}/FastVideoDSEncoder"

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

build() {
	# move to the source directory
	cd "${srcdir}/FastVideoDSEncoder"

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

package() {
	# move to the source directory
	cd "${srcdir}/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/FastVideoDSEncoder"
}