From 1f285458109414a301e2de5c34a1afee27b5b89f Mon Sep 17 00:00:00 2001 From: sev Date: Mon, 12 Jul 2021 03:51:22 -0500 Subject: [PATCH] add package dir to gitignore, add mympd and keys added new packages mympd and sevmonster-keys --- .gitignore | 1 + testing/mympd/APKBUILD | 43 ++++++++++++++++ testing/mympd/mympd.post-install | 5 ++ testing/mympd/mympd.pre-install | 6 +++ testing/sevmonster-keys/APKBUILD | 51 +++++++++++++++++++ .../alpine@sev.monster-60eb1287.rsa.pub | 14 +++++ 6 files changed, 120 insertions(+) create mode 100644 testing/mympd/APKBUILD create mode 100644 testing/mympd/mympd.post-install create mode 100644 testing/mympd/mympd.pre-install create mode 100644 testing/sevmonster-keys/APKBUILD create mode 100644 testing/sevmonster-keys/alpine@sev.monster-60eb1287.rsa.pub diff --git a/.gitignore b/.gitignore index e24cce0..eb4f04f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/packages/ src/ build/ pkg/ diff --git a/testing/mympd/APKBUILD b/testing/mympd/APKBUILD new file mode 100644 index 0000000..3a3fc2c --- /dev/null +++ b/testing/mympd/APKBUILD @@ -0,0 +1,43 @@ +# Contributor: sev +# Maintainer: sev +pkgname=mympd +pkgver=7.0.2 +pkgrel=1 +pkgdesc="myMPD is a standalone and mobile friendly web mpd client with a tiny footprint and advanced features." +url="https://jcorporation.github.io" +arch="all" +license="GPL-2.0-or-later" +depends="libid3tag flac openssl>=1.1.0 lua5.3 pcre" +makedepends="cmake>=3.4 perl pcre-dev openssl-dev>=1.1.0 libid3tag-dev flac-dev lua5.3-dev" +install="$pkgname.pre-install $pkgname.post-install" +subpackages="$pkgname-doc $pkgname-openrc" +source="myMPD-$pkgver.tar.gz::https://github.com/jcorporation/myMPD/archive/refs/tags/v$pkgver.tar.gz" +builddir="$srcdir/myMPD-$pkgver" + +build() { + cd "$builddir" + ./build.sh release +} + +check() { + cd "$builddir/release" + # mympd has no safe way to start without it doing something + [ -x mympd >/dev/null 2>&1 ] || return 1 + # we want to check a specific exit code so we have to turn off errexit + set +e + for x in config script; do + ./cli_tools/mympd-$x -h >/dev/null 2>&1 + [ $? -ne 1 ] && return 1 + done + set -e +} + +package() { + cd "$builddir/release" || exit 1 + [ -z "${DESTDIR+x}" ] && DESTDIR="" + make DESTDIR="$pkgdir" install +} + +sha512sums=" +98a7464c307797b5b3b3ab56a7dfc2bab47a366e4cc4c48c2239915a14152bd3d6946219ee634baf4a1d36ba92778393100e3e7a16054aa1f85381c34303bd3f myMPD-7.0.2.tar.gz +" diff --git a/testing/mympd/mympd.post-install b/testing/mympd/mympd.post-install new file mode 100644 index 0000000..8904f48 --- /dev/null +++ b/testing/mympd/mympd.post-install @@ -0,0 +1,5 @@ +#!/bin/sh +echo "myMPD installed" +echo "Modify /etc/mympd.conf to suit your needs or use the" +echo "mympd-config tool to generate a valid mympd.conf automatically." +exit 0 diff --git a/testing/mympd/mympd.pre-install b/testing/mympd/mympd.pre-install new file mode 100644 index 0000000..1f147bc --- /dev/null +++ b/testing/mympd/mympd.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S mympd 2>/dev/null +adduser -S -D -H -h /var/lib/mympd -s /sbin/nologin -G mympd -g myMPD mympd 2>/dev/null + +exit 0 diff --git a/testing/sevmonster-keys/APKBUILD b/testing/sevmonster-keys/APKBUILD new file mode 100644 index 0000000..ad8507d --- /dev/null +++ b/testing/sevmonster-keys/APKBUILD @@ -0,0 +1,51 @@ +# Maintainer: Natanael Copa +pkgname=sevmonster-keys +pkgver=1 +pkgrel=0 +pkgdesc="Public keys for alpine.sev.monster packages" +url="https://alpine.sev.monster" +# we install arch specific keys to /etc so we cannot do arch=noarch +arch="all" +license="BSD-3-Clause" +options="!check" + +_arch_keys="x86_64:alpine@sev.monster-60eb1287.rsa.pub" + +for _i in $_arch_keys; do + source="$source ${_i#*:}" +done + +_ins_key() { + msg "- $2 ($1)" + install -Dm644 "$srcdir"/$2 "$pkgdir"/etc/apk/keys/$2 +} + +_install_x86() { + case "$1" in + x86*) _ins_key $1 $2 ;; + esac +} + +package() { + # copy keys for repos + mkdir -p "$pkgdir"/etc/apk/keys + for i in $_arch_keys; do + _archs="${i%:*}" + _key="${i#*:}" + install -Dm644 "$srcdir"/$_key \ + "$pkgdir"/usr/share/apk/keys/$_key + + for _arch in ${_archs//,/ }; do + mkdir -p "$pkgdir"/usr/share/apk/keys/$_arch + ln -s ../$_key "$pkgdir"/usr/share/apk/keys/$_arch/ + + case "$CARCH" in + x86*) _install_x86 $_arch $_key ;; + esac + done + done +} + +sha512sums=" +c36281116bad0c8c0c5e24b09366e9a238d68d7ead69167da8601e05951f895a007838e45d003aac1e5c10c3db52be6f4e2dc1d583f5eab3912ac26a8423819a alpine@sev.monster-60eb1287.rsa.pub +" diff --git a/testing/sevmonster-keys/alpine@sev.monster-60eb1287.rsa.pub b/testing/sevmonster-keys/alpine@sev.monster-60eb1287.rsa.pub new file mode 100644 index 0000000..d1e5c5e --- /dev/null +++ b/testing/sevmonster-keys/alpine@sev.monster-60eb1287.rsa.pub @@ -0,0 +1,14 @@ +-----BEGIN PUBLIC KEY----- +MIICGTANBgkqhkiG9w0BAQEFAAOCAgYAMIICAQKCAfgLhKaZZtGy63JchRb/ohFD +IKhVXjA7bwgKjcRPcLOtAsjrtiAGPGRF0NzC6yaLcBrM3zGBLbtYAjJPzHf0rU69 +Dx2Wvx22sQiVXyTeDirKTgoZAT8DKXiqga3j2CtH7JfT/i+pQnhj1Uhu4n+TBcI9 +gEuG/zZmaCkDlyptAHG53Y/JNLnY5dgphr/lz0lXKTkzLKRnJHiFuVNFBF4gChYg +PlLbQx0qYoyfRzaaFYk/GrB5cZlRUCJnBAzoXC4yc3Bn/kCQQLc5g/FlwXI3bGpn +HtTDAzXkBx4WB37MzZ/iYFm4PD7AgLkE2+l7Xgv+hzRi7+H/921n7LdC8SyzSKul +Sjq8vqCZKVtB3wQ0ttd7PrUI8skHV9Q5LpMdbjZVudoUieodVD4yG6W3r6Zm9V4R +0SULYGNfxSx6azoQnHUS6MpO09p2z3XN7I4D0RrmpofvVWJct4UFPe99xr6nR/u2 +JXfMiTXUcntCCUJqbaQs2XOtlKJS0FFR196H5XN7QxhJpKoqeZxK8NJ0uyLQSaOg +TM7hmjjt1w/EUlSbx29F15E9PbiODgaE7dEuZGJaL26tSXTlr8Gmj+WrL7sxbR40 +RwFRF9p8Bf1Tq++/8S+WHpDgI9LSX05QXlS1xINHKAesXVQukB5fda3cegnfYPNy +OhqZKN+kuXMCAwEAAQ== +-----END PUBLIC KEY----- -- 2.46.2