summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-adelie@skarnet.org>2024-04-10 15:36:32 +0000
committerZach van Rijn <me@zv.io>2024-04-25 02:48:27 +0000
commit7730de23769b58eaa968bdf2421f279eef2e1120 (patch)
tree445f158b9d096f3ff17e0226141df6986185ba2e
parent503e8ce2cbe2e0498f9227e5da4e9a50d9de6b61 (diff)
downloadpackages-7730de23769b58eaa968bdf2421f279eef2e1120.tar.gz
packages-7730de23769b58eaa968bdf2421f279eef2e1120.tar.bz2
packages-7730de23769b58eaa968bdf2421f279eef2e1120.tar.xz
packages-7730de23769b58eaa968bdf2421f279eef2e1120.zip
user/apaste: fix and simplify APKBUILD
-rw-r--r--user/apaste/APKBUILD27
-rw-r--r--user/apaste/apasted.post-install (renamed from user/apaste/apaste-server.post-install)0
-rw-r--r--user/apaste/apasted.pre-install (renamed from user/apaste/apaste-server.pre-install)0
3 files changed, 14 insertions, 13 deletions
diff --git a/user/apaste/APKBUILD b/user/apaste/APKBUILD
index 23a289a3e..42c4a0c17 100644
--- a/user/apaste/APKBUILD
+++ b/user/apaste/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=apaste
pkgver=0.0.2.0
-pkgrel=0
+pkgrel=2
pkgdesc="A command-line pastebin"
url="https://skarnet.org/software/apaste/"
arch="all"
@@ -10,7 +10,7 @@ options="!check" # No test suite.
license="ISC"
depends="s6-networking"
makedepends="skalibs-dev>=2.14.1.1 s6-networking-dev>=2.7.0.2"
-subpackages="apasted:server apasted-openrc:openrc"
+subpackages="apaste-doc apasted:server apasted-openrc:apasted_openrc"
source="
https://skarnet.org/software/apaste/apaste-$pkgver.tar.gz
apasted.run
@@ -45,26 +45,27 @@ _makeservicedir() {
package() {
make DESTDIR="$pkgdir" install
+ install -D -m 0644 "$srcdir/apasted.confd" "$pkgdir/etc/conf.d/apasted"
+ install -D -m 0755 "$srcdir/apasted.initd" "$pkgdir/etc/init.d/apasted"
+ mkdir -p -m 0755 "$pkgdir/usr/share/doc"
+ cp -a "$builddir/doc" "$pkgdir/usr/share/doc/$pkgname"
}
server() {
depends="execline s6 s6-networking>=2.7.0.2 apasted-openrc"
pkgdesc="A server for the apaste command-line pastebin"
- install="apaste-server.pre-install"
+ install="apasted.pre-install apasted.post-install"
mkdir -p -m 0755 "$subpkgdir/usr/bin" "$subpkgdir/var/lib/apasted/services"
mv "$pkgdir/usr/bin/apasted" "$subpkgdir/usr/bin/"
- _makeservicedir "" 4
- _makeservicedir "" 6
- _makeservicedir s 4
- _makeservicedir s 6
+ for i in '' s ; do for j in 4 6 ; do
+ _makeservicedir "$i" "$j"
+ done ; done
}
-openrc() {
- depends="apasted"
- mkdir -p -m 0755 "$subpkgdir/etc/conf.d" "$subpkgdir/etc/init.d"
- cp "$srcdir/apasted.confd" "$subpkgdir/etc/conf.d/apasted"
- cp "$srcdir/apasted.initd" "$subpkgdir/etc/init.d/apasted"
- chmod 0755 "$subpkgdir/etc/init.d/apasted"
+apasted_openrc() {
+ default_openrc
+ pkgdesc="A server for the apaste command-line pastebin (OpenRC init scripts)"
+ install_if="openrc apasted=$pkgver-r$pkgrel"
}
sha512sums="b1550d738801ddee528d0ce62333aa9a8fc9824183a61be295e767fbcdb1ae4d15a5e34295754cc5e8c51c8b410a56972bac28c5812099652fb8bb5140fb4c15 apaste-0.0.2.0.tar.gz
diff --git a/user/apaste/apaste-server.post-install b/user/apaste/apasted.post-install
index aba532a62..aba532a62 100644
--- a/user/apaste/apaste-server.post-install
+++ b/user/apaste/apasted.post-install
diff --git a/user/apaste/apaste-server.pre-install b/user/apaste/apasted.pre-install
index 32782d21f..32782d21f 100644
--- a/user/apaste/apaste-server.pre-install
+++ b/user/apaste/apasted.pre-install