From ca09092d1f90fee1b14de79dc1fb7fc5cc069050 Mon Sep 17 00:00:00 2001 From: Sebastiaan Lokhorst Date: Sun, 25 Sep 2016 13:14:46 +0200 Subject: [PATCH 1/5] Initial commit --- .SRCINFO | 19 +++++++++++++++++++ PKGBUILD | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..c9867a9 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +# Generated by mksrcinfo v8 +# Sun Sep 25 11:14:09 UTC 2016 +pkgbase = motion-git + pkgdesc = A software motion detector which grabs images from video4linux devices and/or from webcams + pkgver = release.3.4.1.r98.g7e16a9e + pkgrel = 1 + url = https://motion-project.github.io/ + arch = i686 + arch = x86_64 + license = GPL + depends = libjpeg + depends = v4l-utils + depends = ffmpeg + backup = etc/motion/motion.conf + source = motion::git+https://github.com/Motion-Project/motion.git + md5sums = SKIP + +pkgname = motion-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..0dde4ba --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,33 @@ +# Maintainer: Sebastiaan Lokhorst +# Contributor: Sergej Pupykin + +pkgname=motion-git +_pkgname=motion +pkgver=release.3.4.1.r98.g7e16a9e +pkgrel=1 +pkgdesc="A software motion detector which grabs images from video4linux devices and/or from webcams" +arch=('i686' 'x86_64') +license=('GPL') +url="https://motion-project.github.io/" +depends=('libjpeg' 'v4l-utils' 'ffmpeg') +backup=('etc/motion/motion.conf') +source=($_pkgname::git+https://github.com/Motion-Project/${_pkgname}.git) +md5sums=('SKIP') + +pkgver() { + cd "${_pkgname}" + git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "${srcdir}/${_pkgname}" + autoreconf + ./configure --prefix=/usr --sysconfdir=/etc --without-mysql --without-pgsql + make +} + +package(){ + cd "${srcdir}/${_pkgname}" + make DESTDIR="${pkgdir}" install + install -Dm644 "${pkgdir}/usr/share/motion/examples/motion.service" "${pkgdir}/usr/lib/systemd/system/motion.service" +} From 22444a966323392fbcd4f3f23bbdf73c7a026c68 Mon Sep 17 00:00:00 2001 From: Sebastiaan Lokhorst Date: Sun, 25 Sep 2016 13:23:04 +0200 Subject: [PATCH 2/5] Add provides, conflicts. Put configuration files in the right place. --- .SRCINFO | 6 ++++-- PKGBUILD | 9 ++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index c9867a9..aaee4e6 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Sun Sep 25 11:14:09 UTC 2016 +# Sun Sep 25 11:23:02 UTC 2016 pkgbase = motion-git pkgdesc = A software motion detector which grabs images from video4linux devices and/or from webcams pkgver = release.3.4.1.r98.g7e16a9e - pkgrel = 1 + pkgrel = 2 url = https://motion-project.github.io/ arch = i686 arch = x86_64 @@ -11,6 +11,8 @@ pkgbase = motion-git depends = libjpeg depends = v4l-utils depends = ffmpeg + provides = motion + conflicts = motion backup = etc/motion/motion.conf source = motion::git+https://github.com/Motion-Project/motion.git md5sums = SKIP diff --git a/PKGBUILD b/PKGBUILD index 0dde4ba..fe7afdd 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,12 +4,14 @@ pkgname=motion-git _pkgname=motion pkgver=release.3.4.1.r98.g7e16a9e -pkgrel=1 +pkgrel=2 pkgdesc="A software motion detector which grabs images from video4linux devices and/or from webcams" arch=('i686' 'x86_64') license=('GPL') url="https://motion-project.github.io/" depends=('libjpeg' 'v4l-utils' 'ffmpeg') +provides=('motion') +conflicts=('motion') backup=('etc/motion/motion.conf') source=($_pkgname::git+https://github.com/Motion-Project/${_pkgname}.git) md5sums=('SKIP') @@ -29,5 +31,10 @@ build() { package(){ cd "${srcdir}/${_pkgname}" make DESTDIR="${pkgdir}" install + mv "${pkgdir}"/etc/motion/motion{-dist,}.conf + mv "${pkgdir}"/etc/motion/camera1{-dist,}.conf + mv "${pkgdir}"/etc/motion/camera2{-dist,}.conf + mv "${pkgdir}"/etc/motion/camera3{-dist,}.conf + mv "${pkgdir}"/etc/motion/camera4{-dist,}.conf install -Dm644 "${pkgdir}/usr/share/motion/examples/motion.service" "${pkgdir}/usr/lib/systemd/system/motion.service" } From 28875124ac86ad7e3c9b11333aaae6acd71c8ba8 Mon Sep 17 00:00:00 2001 From: Sebastiaan Lokhorst Date: Mon, 26 Sep 2016 11:54:08 +0200 Subject: [PATCH 3/5] Add ARM architectures --- .SRCINFO | 9 ++++++--- PKGBUILD | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index aaee4e6..5aa6a16 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,12 +1,15 @@ # Generated by mksrcinfo v8 -# Sun Sep 25 11:23:02 UTC 2016 +# Mon Sep 26 09:54:00 UTC 2016 pkgbase = motion-git pkgdesc = A software motion detector which grabs images from video4linux devices and/or from webcams - pkgver = release.3.4.1.r98.g7e16a9e - pkgrel = 2 + pkgver = release.3.4.1.r105.g7692717 + pkgrel = 1 url = https://motion-project.github.io/ arch = i686 arch = x86_64 + arch = armv6h + arch = armv7h + arch = aarch64 license = GPL depends = libjpeg depends = v4l-utils diff --git a/PKGBUILD b/PKGBUILD index fe7afdd..53a8720 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,10 +3,10 @@ pkgname=motion-git _pkgname=motion -pkgver=release.3.4.1.r98.g7e16a9e -pkgrel=2 +pkgver=release.3.4.1.r105.g7692717 +pkgrel=1 pkgdesc="A software motion detector which grabs images from video4linux devices and/or from webcams" -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') license=('GPL') url="https://motion-project.github.io/" depends=('libjpeg' 'v4l-utils' 'ffmpeg') From baae85a874b1828a27396fdb9e73c61a7e431408 Mon Sep 17 00:00:00 2001 From: Sebastiaan Lokhorst Date: Tue, 6 Jun 2017 23:30:43 +0200 Subject: [PATCH 4/5] Improve pkgver function (show latest tag) --- .SRCINFO | 4 ++-- PKGBUILD | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 5aa6a16..01372da 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,8 +1,8 @@ # Generated by mksrcinfo v8 -# Mon Sep 26 09:54:00 UTC 2016 +# Tue Jun 6 21:30:04 UTC 2017 pkgbase = motion-git pkgdesc = A software motion detector which grabs images from video4linux devices and/or from webcams - pkgver = release.3.4.1.r105.g7692717 + pkgver = release.4.0.r178.ga801f19 pkgrel = 1 url = https://motion-project.github.io/ arch = i686 diff --git a/PKGBUILD b/PKGBUILD index 53a8720..39a0cae 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ pkgname=motion-git _pkgname=motion -pkgver=release.3.4.1.r105.g7692717 +pkgver=release.4.0.r178.ga801f19 pkgrel=1 pkgdesc="A software motion detector which grabs images from video4linux devices and/or from webcams" arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') @@ -18,7 +18,7 @@ md5sums=('SKIP') pkgver() { cd "${_pkgname}" - git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } build() { From bfd7a8909fd6d9173be367903fcb866f9a39e020 Mon Sep 17 00:00:00 2001 From: Sebastiaan Lokhorst Date: Tue, 6 Jun 2017 23:41:40 +0200 Subject: [PATCH 5/5] Clean up pkgver some more (strip 'release-') --- .SRCINFO | 4 ++-- PKGBUILD | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 01372da..087c40d 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,8 +1,8 @@ # Generated by mksrcinfo v8 -# Tue Jun 6 21:30:04 UTC 2017 +# Tue Jun 6 21:41:31 UTC 2017 pkgbase = motion-git pkgdesc = A software motion detector which grabs images from video4linux devices and/or from webcams - pkgver = release.4.0.r178.ga801f19 + pkgver = 4.0.r178.ga801f19 pkgrel = 1 url = https://motion-project.github.io/ arch = i686 diff --git a/PKGBUILD b/PKGBUILD index 39a0cae..4121042 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ pkgname=motion-git _pkgname=motion -pkgver=release.4.0.r178.ga801f19 +pkgver=4.0.r178.ga801f19 pkgrel=1 pkgdesc="A software motion detector which grabs images from video4linux devices and/or from webcams" arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') @@ -18,7 +18,8 @@ md5sums=('SKIP') pkgver() { cd "${_pkgname}" - git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' + # cutting off 'release-' prefix that presents in the git tag + git describe --long --tags | sed 's/^release-//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() {