diff --git a/hdhomerun/template b/hdhomerun/template new file mode 100644 index 0000000..1eb2dd8 --- /dev/null +++ b/hdhomerun/template @@ -0,0 +1,41 @@ +pkgname=hdhomerun +version=20230323 +revision=3 +build_style=gnu-makefile +hostmakedepends="gcc make" +short_desc="Silicon Dust HDHomeRun configuration utility" +maintainer="Bob Hepple " +license="GPL-2.0-only" +homepage="https://www.silicondust.com" +distfiles="https://download.silicondust.com/hdhomerun/libhdhomerun_${version}.tgz" +checksum=4f599c4f774c7accfc78fe07a2d492f2352c7b5ed9aa03f39b74f39c937b96e6 + +post_extract() { + sed -i 's/\r//' -- * + sed -i -e '/$(STRIP).*/d' -e 's/C\(PP\)\?FLAGS .=/C\1FLAGS ?=/' Makefile + for f in *; do + /usr/bin/iconv -f iso-8859-1 -t utf-8 --output "$f.new" "$f" && mv "$f.new" "$f" + done +} + +do_build() { + make LIBEXT=.so.0 +} + +do_install() { + vbin hdhomerun_config + vlicense LICENSE + vdoc README.md + vinstall libhdhomerun.so.0 755 usr/lib + ln -sf libhdhomerun.so.0 "${DESTDIR}/usr/lib/libhdhomerun.so" +} + +hdhomerun-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + for i in hdhomerun*.h; do + vinstall "$i" 644 "usr/include" + done + } +} diff --git a/ydotool/template b/ydotool/template new file mode 100644 index 0000000..b2a72c2 --- /dev/null +++ b/ydotool/template @@ -0,0 +1,39 @@ +# Template file for 'ydotool' +pkgname=ydotool +version=1.0.4 +revision=1 +build_style=gnu-makefile +hostmakedepends="cmake ninja pkg-config scdoc" +makedepends="libevdev-devel" +short_desc="Generic command-line automation tool (no X!)" +maintainer="bob.hepple@gmail.com" +license="AGPL-3.0-or-later" +homepage="https://github.com/ReimuNotMoe/ydotool" +distfiles="https://github.com/ReimuNotMoe/ydotool/archive/refs/tags/v${version}.tar.gz" +checksum=ba075a43aa6ead51940e892ecffa4d0b8b40c241e4e2bc4bd9bd26b61fde23bd + +do_build() { + cmake -S . -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + ninja -C build +} + +do_install() { + DESTDIR="$DESTDIR" ninja -C build install + + # Remove systemd service file (Void uses runit) + rm -rf "${DESTDIR}/usr/lib/systemd" + + # Create runit service directory + vmkdir etc/sv/ydotool + + # Create run script for runit service + cat > "${DESTDIR}/etc/sv/ydotool/run" << 'EOF' +#!/bin/sh +exec 2>&1 +exec /usr/bin/ydotoold --socket-path=/tmp/.ydotool_socket --socket-perm=0666 +EOF + chmod +x "${DESTDIR}/etc/sv/ydotool/run" +}