aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/motion/APKBUILD35
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"