Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: motionplus-0.2.1
Date: Sat, 13 Jul 2024 07:12:19 +0200	[thread overview]
Message-ID: <20240713051219.3703828FFA@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-51230@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1242 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages motion-plus
https://github.com/void-linux/void-packages/pull/51230

New package: motionplus-0.2.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/51230.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-motion-plus-51230.patch --]
[-- Type: text/x-diff, Size: 4861 bytes --]

From ee20760e9522e473d37534087acdcdb0cfb468ab Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 13 Jul 2024 01:10:22 -0400
Subject: [PATCH 1/2] common/hooks/pre-configure/02-script-wrapper: genericise
 pkg-config wrapper

motionplus hardcodes pkgconf in several places in the configure script,
which breaks on cross.
---
 common/hooks/pre-configure/02-script-wrapper.sh | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/common/hooks/pre-configure/02-script-wrapper.sh b/common/hooks/pre-configure/02-script-wrapper.sh
index 004c68442c061c..64619179af69b3 100644
--- a/common/hooks/pre-configure/02-script-wrapper.sh
+++ b/common/hooks/pre-configure/02-script-wrapper.sh
@@ -80,21 +80,22 @@ _EOF
 }
 
 pkgconfig_wrapper() {
-	if [ ! -x /usr/bin/pkg-config ]; then
+	local pc_bin="$1"
+	if [ ! -x "/usr/bin/${pc_bin}" ]; then
 		return 0
 	fi
-	[ -x ${XBPS_WRAPPERDIR}/${XBPS_CROSS_TRIPLET}-pkg-config ] && return 0
-	cat >>${XBPS_WRAPPERDIR}/${XBPS_CROSS_TRIPLET}-pkg-config<<_EOF
+	[ -x "${XBPS_WRAPPERDIR}/${XBPS_CROSS_TRIPLET}-${pc_bin}" ] && return 0
+	cat >>"${XBPS_WRAPPERDIR}/${XBPS_CROSS_TRIPLET}-${pc_bin}"<<_EOF
 #!/bin/sh
 
 export PKG_CONFIG_SYSROOT_DIR="$XBPS_CROSS_BASE"
 export PKG_CONFIG_PATH="$XBPS_CROSS_BASE/usr/lib/pkgconfig:$XBPS_CROSS_BASE/usr/share/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}}"
 export PKG_CONFIG_LIBDIR="$XBPS_CROSS_BASE/usr/lib/pkgconfig\${PKG_CONFIG_LIBDIR:+:\${PKG_CONFIG_LIBDIR}}"
-exec /usr/bin/pkg-config "\$@"
+exec /usr/bin/${pc_bin} "\$@"
 _EOF
-	chmod 755 ${XBPS_WRAPPERDIR}/${XBPS_CROSS_TRIPLET}-pkg-config
+	chmod 755 "${XBPS_WRAPPERDIR}/${XBPS_CROSS_TRIPLET}-${pc_bin}"
 	if [ -z "$no_generic_pkgconfig_link" ]; then
-		ln -sf ${XBPS_CROSS_TRIPLET}-pkg-config ${XBPS_WRAPPERDIR}/pkg-config
+		ln -sf "${XBPS_CROSS_TRIPLET}-${pc_bin}" "${XBPS_WRAPPERDIR}/${pc_bin}"
 	fi
 }
 
@@ -192,7 +193,8 @@ hook() {
 	[ -z "$CROSS_BUILD" ] && return 0
 
 	install_cross_wrappers
-	pkgconfig_wrapper
+	pkgconfig_wrapper pkg-config
+	pkgconfig_wrapper pkgconf
 	vapigen_wrapper
 	valac_wrapper
 

From eaa0aaf46f0694ac97bf7d4af1af158727d87304 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 12 Jul 2024 19:58:11 -0400
Subject: [PATCH 2/2] New package: motionplus-0.2.1

---
 srcpkgs/motionplus/files/motionplus/run |  4 +++
 srcpkgs/motionplus/template             | 38 +++++++++++++++++++++++++
 srcpkgs/motionplus/update               |  1 +
 3 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/motionplus/files/motionplus/run
 create mode 100644 srcpkgs/motionplus/template
 create mode 100644 srcpkgs/motionplus/update

diff --git a/srcpkgs/motionplus/files/motionplus/run b/srcpkgs/motionplus/files/motionplus/run
new file mode 100644
index 00000000000000..b800c82be3fbdd
--- /dev/null
+++ b/srcpkgs/motionplus/files/motionplus/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+export HOME=/var/lib/motionplus
+exec chpst -u _motionplus:_motionplus:audio:video motionplus -n
diff --git a/srcpkgs/motionplus/template b/srcpkgs/motionplus/template
new file mode 100644
index 00000000000000..00aa87fecbd278
--- /dev/null
+++ b/srcpkgs/motionplus/template
@@ -0,0 +1,38 @@
+# Template file for 'motionplus'
+pkgname=motionplus
+version=0.2.1
+revision=1
+build_style=gnu-configure
+configure_args="--sysconfdir=/etc"
+hostmakedepends="automake gettext-devel-tools pkgconf"
+makedepends="gettext-devel libjpeg-turbo-devel libmicrohttpd-devel ffmpeg-devel
+ libcamera-devel libopencv-devel sqlite-devel alsa-lib-devel pulseaudio-devel
+ fftw-devel libwebp-devel"
+short_desc="Monitor and record video signals from many types of cameras"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="GPL-3.0-or-later"
+homepage="https://motion-project.github.io"
+changelog="https://github.com/Motion-Project/motionplus/releases"
+distfiles="https://github.com/Motion-Project/motionplus/archive/refs/tags/release-${version}.tar.gz"
+checksum=5f1d8ba14e476e0c905dc989ad884640d1e154adcb8d7aec9e340f1c529c8bcb
+conf_files="/etc/motionplus/motionplus.conf"
+make_dirs="/var/lib/motionplus 755 _motionplus _motionplus"
+system_accounts="_motionplus"
+_motionplus_homedir="/var/lib/motionplus"
+_motionplus_groups="audio,video"
+
+post_patch() {
+	vsed -i -e 's|@prefix@/etc|/etc|g' data/*.conf.in
+}
+
+pre_configure() {
+	autoreconf -fi
+}
+
+post_install() {
+	vmkdir usr/share/examples/motionplus
+	mv "${DESTDIR}"/etc/motionplus/*dist* "${DESTDIR}"/usr/share/examples/motionplus
+	cp "${DESTDIR}"/usr/share/examples/motionplus/motionplus-dist.conf \
+		"${DESTDIR}"/etc/motionplus/motionplus.conf
+	vsv motionplus
+}
diff --git a/srcpkgs/motionplus/update b/srcpkgs/motionplus/update
new file mode 100644
index 00000000000000..d309484699391d
--- /dev/null
+++ b/srcpkgs/motionplus/update
@@ -0,0 +1 @@
+pkgname=release

  reply	other threads:[~2024-07-13  5:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12 23:59 [PR PATCH] " classabbyamp
2024-07-13  5:12 ` classabbyamp [this message]
2024-07-13  6:33 ` classabbyamp
2024-10-12  1:57 ` github-actions
2024-10-26  1:58 ` [PR PATCH] [Closed]: " github-actions

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240713051219.3703828FFA@inbox.vuxu.org \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).