From 6acb037fe86596a8fabf9dadd94ee936bc861b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Wed, 6 Sep 2017 07:14:46 +0000 Subject: testing/motion: modernize --- testing/motion/APKBUILD | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) (limited to 'testing/motion/APKBUILD') diff --git a/testing/motion/APKBUILD b/testing/motion/APKBUILD index 6bdf1902cd..a044f7fa73 100644 --- a/testing/motion/APKBUILD +++ b/testing/motion/APKBUILD @@ -24,35 +24,28 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/Motion-Project/$pkgname/arch strerror_r.patch " -_builddir="$srcdir"/$pkgname-release-$pkgver +builddir="$srcdir"/$pkgname-release-$pkgver + prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done - sed -i 's@@\n#include @' *.c *.h + default_prepare + autoreconf -fiv } build() { - cd "$_builddir" - autoreconf -fiv + cd "$builddir" ./configure \ - --without-pgsql \ - --without-mysql \ - --without-sqlite3 \ - --prefix=/usr \ - --sysconfdir=/etc \ - --without-optimizecpu - - make || return 1 + --without-pgsql \ + --without-mysql \ + --without-sqlite3 \ + --prefix=/usr \ + --sysconfdir=/etc \ + --without-optimizecpu + make } package() { - cd "$_builddir" - make DESTDIR="$pkgdir" install || return 1 + 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" -- cgit v1.2.3