From 542213ec41a8b351b009b2342e381c0dcb2fe891 Mon Sep 17 00:00:00 2001 From: Yannick Ulrich Date: Sun, 18 Jul 2021 13:55:33 +0100 Subject: [PATCH] temp/waked: new aport (MR 2342) --- temp/waked/APKBUILD | 30 ++++++++++++++++++++++++++++ temp/waked/waked-openrc.post-install | 4 ++++ temp/waked/waked-openrc.post-upgrade | 1 + temp/waked/waked.initd | 16 +++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 temp/waked/APKBUILD create mode 100644 temp/waked/waked-openrc.post-install create mode 120000 temp/waked/waked-openrc.post-upgrade create mode 100644 temp/waked/waked.initd diff --git a/temp/waked/APKBUILD b/temp/waked/APKBUILD new file mode 100644 index 000000000..5aebd84a4 --- /dev/null +++ b/temp/waked/APKBUILD @@ -0,0 +1,30 @@ +pkgname=waked +pkgver=0.1.0 +pkgrel=0 +license="GPL-2.0-or-later" +pkgdesc="Waked is a daemon which lets Apps wake the system from suspend at requested times" +arch="all" +url="https://gitlab.com/seath1/waked" +makedepends="cmake sdbus-cpp-dev" +install="$pkgname-openrc.post-install $pkgname-openrc.post-upgrade" +source="https://gitlab.com/seath1/waked/-/archive/v$pkgver/waked-v$pkgver.tar.bz2 + waked.initd" +subpackages="$pkgname-openrc" +options="!check" # No test suite +builddir="$srcdir/$pkgname-v$pkgver" + +build() { + cd src/ + cmake . + make +} + +package() { + install -Dm755 src/waked "$pkgdir"/usr/bin/waked + install -Dm644 de.seath.Waked.conf "$pkgdir"/etc/dbus-1/system.d/de.seath.Waked.conf + install -Dm755 "$srcdir"/waked.initd "$pkgdir"/etc/init.d/waked +} +sha512sums=" +ecac9fe8aa407e055b20271a679292821bc998f14501ad24f9f732607c76c0c456f1dd6a0acb850eb4c315a13e08903e39e8b0b2c93faef450273be43f2f1c45 waked-v0.1.0.tar.bz2 +c7b2331fd545ac7a38499e3159a026155e93173ec8c4336e878170ebd355212f362565805e3409d635875f3fb769a6e62d83ccd61d317c3434ebcee04864c0b6 waked.initd +" diff --git a/temp/waked/waked-openrc.post-install b/temp/waked/waked-openrc.post-install new file mode 100644 index 000000000..74ccd32a7 --- /dev/null +++ b/temp/waked/waked-openrc.post-install @@ -0,0 +1,4 @@ +#!/bin/sh + +# Enable waked init script +rc-update add waked default diff --git a/temp/waked/waked-openrc.post-upgrade b/temp/waked/waked-openrc.post-upgrade new file mode 120000 index 000000000..5b91d7003 --- /dev/null +++ b/temp/waked/waked-openrc.post-upgrade @@ -0,0 +1 @@ +waked-openrc.post-install \ No newline at end of file diff --git a/temp/waked/waked.initd b/temp/waked/waked.initd new file mode 100644 index 000000000..e32a2a1f7 --- /dev/null +++ b/temp/waked/waked.initd @@ -0,0 +1,16 @@ +#!/sbin/openrc-run +depend() { + need net +} + +start() { + ebegin "Starting waked" + start-stop-daemon --background --start --exec /usr/bin/waked + eend $? +} + +stop() { + ebegin "Stopping waked" + start-stop-daemon --stop --exec /usr/bin/waked + eend $? +}