aboutsummaryrefslogtreecommitdiffstats
path: root/testing/motion/APKBUILD
blob: e5d4a98f821a15fa74482f659ab904b96c500766 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Contributor: Katie Holly <holly@fuslvz.ws>
# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
# Contributor: Mika Havela <mika.havela@gmail.com>
# Maintainer: Mika Havela <mika.havela@gmail.com>
pkgname=motion
pkgver=4.2.2
pkgrel=0
pkgdesc="Detect if a significant part of the picture has changed (e.g. from a webcam)."
url="https://motion-project.github.io"
arch="all"
options="!check"
license="GPL-2.0"
pkgusers="motion"
pkggroups="motion"
depends="jpeg v4l-utils ffmpeg"
depends_dev=""
makedepends="$depends_dev autoconf automake bash jpeg-dev v4l-utils-dev linux-headers
			ffmpeg-dev libmicrohttpd-dev libwebp-dev
			"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-openrc"
# ffmpeg4.patch courtesy of Arch Linux
source="$pkgname-$pkgver.tar.gz::https://github.com/Motion-Project/$pkgname/archive/release-$pkgver.tar.gz
	motion.confd
	motion.initd
	"

builddir="$srcdir"/$pkgname-release-$pkgver

prepare() {
	default_prepare
	autoreconf -fiv
}

build() {
	cd "$builddir"
	./configure \
		--without-pgsql \
		--without-mysql \
		--without-sqlite3 \
		--prefix=/usr \
		--sysconfdir=/etc \
		--without-optimizecpu
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -d -o "$pkgusers" -g "$pkggroups" "$pkgdir"/var/run/motion
	install -d -o "$pkgusers" -g "$pkggroups" "$pkgdir"/var/lib/motion    # Default config is configured to store captures here
	install -Dm644 "$srcdir"/"$pkgname".confd "$pkgdir"/etc/conf.d/"$pkgname"
	install -Dm755 "$srcdir"/"$pkgname".initd "$pkgdir"/etc/init.d/"$pkgname"
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="d6a1df1f7ddf8e3dc8fe3f7a1639de1ea67e63323d928c5c8b3bd34ee4edcb034c6723c3cc5d05ff1dd95802cd8efb4362cfcb68064ec5884272efa8f57daa20  motion-4.2.2.tar.gz
8a67b5b0360924e58ba3136a737ce73bb43201a49b2b6e2c632426561b830f6ab55cbbeaa89be7f1683aa8fd322b4f31b9f560e67a93eaceb964c9f56ceef363  motion.confd
be30f19595dba27f2d0ca8133c93e134161781935a152bd1701e581410039e37742acd11987c38e6e64f495b1fd2b0a74a8c61ae0e6e211a475fca7994172501  motion.initd"