aboutsummaryrefslogtreecommitdiff
path: root/midr
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-07-25 00:53:49 +0000
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-07-25 00:53:49 +0000
commit686604647cfc3df98eb94b759166b2b1c83db7d8 (patch)
tree5dc2c57b5a4f992b795073906eadc710eb6ae881 /midr
downloadapkbuilds-686604647cfc3df98eb94b759166b2b1c83db7d8.tar.gz
apkbuilds-686604647cfc3df98eb94b759166b2b1c83db7d8.tar.bz2
apkbuilds-686604647cfc3df98eb94b759166b2b1c83db7d8.zip
feat: Add initial commit to build midr
Diffstat (limited to 'midr')
-rw-r--r--midr/APKBUILD49
-rw-r--r--midr/midr.confd7
-rw-r--r--midr/midr.initd16
-rw-r--r--midr/midr.post-install4
-rw-r--r--midr/midr.pre-install4
5 files changed, 80 insertions, 0 deletions
diff --git a/midr/APKBUILD b/midr/APKBUILD
new file mode 100644
index 0000000..a9b1b94
--- /dev/null
+++ b/midr/APKBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
+pkgname=midr
+pkgver=0.1.0
+pkgrel=0
+pkgdesc="yt-dlp simple frontend"
+url="https://git.sr.ht/~gabrielgio/midr"
+arch="x86_64"
+license="MIT"
+makedepends="
+ go
+"
+builddir="$srcdir/$pkgname-v$pkgver/"
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages="$pkgname-openrc"
+source="
+ ${pkgname}-${pkgver}.tar.gz::https://artifacts.gabrielgio.me/${pkgname}/${pkgname}-v${pkgver}.tar.gz
+ midr.initd
+ midr.confd
+"
+
+build() {
+ go mod vendor
+ go build \
+ -trimpath \
+ -mod=vendor \
+ -ldflags="-X 'main.Version=${pkgver}'" \
+ .
+}
+
+check() {
+ # Replace with proper check command(s)
+ :
+}
+
+package() {
+
+ install -Dm755 "$pkgname" "$pkgdir"/usr/bin/"$pkgname"
+
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname
+}
+
+sha512sums="
+4b170b6466bdc4da60cf6582ab43ffb55ea09ccef58490453377d07fe38996c0d1a4408c5c68d2f3ab75f607afce443fb86ae5d6c04f7a9be844bf870064c075 midr-0.1.0.tar.gz
+512331fd6b4c5621c14b8bf07a94b2318dc33fea245de1e66d6385e1dc4cbfde7cb0d53507b46c85a11defe65a936cca40ace80df76130c7af2ef5999899892c midr.initd
+f11f0d192cd7823307c2ce4ddc7b3fff5190f72d3f65a5524b487021a95a222aca1fd36ab1eb58ed533e7acd555bfb70f0c8a13db20338ea31527f3151fd2bd7 midr.confd
+"
diff --git a/midr/midr.confd b/midr/midr.confd
new file mode 100644
index 0000000..486252b
--- /dev/null
+++ b/midr/midr.confd
@@ -0,0 +1,7 @@
+# Sample conf.d file for alpine linux
+
+#
+# Specify daemon options here.
+#
+
+sample_opts=""
diff --git a/midr/midr.initd b/midr/midr.initd
new file mode 100644
index 0000000..0dc706c
--- /dev/null
+++ b/midr/midr.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+
+# Sample init.d file for alpine linux.
+
+name=
+command="/usr/sbin/$name"
+command_args="$sample_opts"
+command_background="yes"
+
+start_stop_daemon_args="--user $sample_user:$sample_group"
+pidfile="/run/$name.pid"
+
+depend() {
+ need net
+ after firewall
+}
diff --git a/midr/midr.post-install b/midr/midr.post-install
new file mode 100644
index 0000000..512fd3e
--- /dev/null
+++ b/midr/midr.post-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# add something which happens after install
+
diff --git a/midr/midr.pre-install b/midr/midr.pre-install
new file mode 100644
index 0000000..20f04f7
--- /dev/null
+++ b/midr/midr.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# add something which happens before install
+