summaryrefslogtreecommitdiff
path: root/user/ffmpegthumbnailer/APKBUILD
blob: c4787b97f01920eabfea7466ae3481b87c6679ec (plain) (blame)
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
# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com>
# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com>
pkgname=ffmpegthumbnailer
pkgver=2.2.1
pkgrel=0
pkgdesc="Thumbnail generator based on FFMPEG"
url="https://github.com/dirkvdb/ffmpegthumbnailer"
arch="all"
license="GPL-2.0+"
makedepends="ffmpeg-dev libjpeg-turbo-dev libpng-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/dirkvdb/ffmpegthumbnailer/releases/download/$pkgver/ffmpegthumbnailer-$pkgver.tar.bz2"

build() {
	cd "$builddir"
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		-DENABLE_GIO=True \
		-DENABLE_THUMBNAILER=True \
		${CMAKE_CROSSOPTS}
	make
}

check() {
	cd "$builddir"
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="227f41aaca897f8aaa5c2182baa97e26af189a4e99acb74b994aac4a71f9405bc6df08cfa7cebbcc89536cec95115757f78effb4827ef637a93a8af278525be2  ffmpegthumbnailer-2.2.1.tar.bz2"