diff options
author | Timo Teräs <timo.teras@iki.fi> | 2017-09-06 07:14:46 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-09-06 07:14:46 +0000 |
commit | 6acb037fe86596a8fabf9dadd94ee936bc861b05 (patch) | |
tree | ad91bf97d83bb26fb7e0b771abcec92ff1a6a895 /testing/motion | |
parent | 66ff8434575d6f12b1d7ca893d22df1a55ff84e3 (diff) | |
download | aports-6acb037fe86596a8fabf9dadd94ee936bc861b05.tar.bz2 aports-6acb037fe86596a8fabf9dadd94ee936bc861b05.tar.xz |
testing/motion: modernize
Diffstat (limited to 'testing/motion')
-rw-r--r-- | testing/motion/APKBUILD | 35 |
1 files changed, 14 insertions, 21 deletions
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@<linux/videodev.h>@<libv4l1.h>\n#include <linux/videodev2.h>@' *.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" |