summaryrefslogtreecommitdiff
path: root/system/mdevd/APKBUILD
diff options
context:
space:
mode:
authorLaurent Bercot <ska-adelie@skarnet.org>2019-10-03 10:27:04 -0500
committerLaurent Bercot <ska-adelie@skarnet.org>2019-10-03 10:27:04 -0500
commit5303f83e37818283991fc5e3966076e14f246077 (patch)
tree1e39931e880ba5bfa11445c4cb4e8a6d047bfcbc /system/mdevd/APKBUILD
parent651e22f2032fd7949e52102aa000c5943e654e42 (diff)
downloadpackages-5303f83e37818283991fc5e3966076e14f246077.tar.gz
packages-5303f83e37818283991fc5e3966076e14f246077.tar.bz2
packages-5303f83e37818283991fc5e3966076e14f246077.tar.xz
packages-5303f83e37818283991fc5e3966076e14f246077.zip
system/mdevd: new package. PLEASE REVIEW.
Diffstat (limited to 'system/mdevd/APKBUILD')
-rw-r--r--system/mdevd/APKBUILD58
1 files changed, 58 insertions, 0 deletions
diff --git a/system/mdevd/APKBUILD b/system/mdevd/APKBUILD
new file mode 100644
index 000000000..c902bb6a8
--- /dev/null
+++ b/system/mdevd/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Laurent Bercot <ska-adelie@skarnet.org>
+# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
+pkgname=mdevd
+pkgver=0.1.1.0
+pkgrel=1
+pkgdesc="A small uevent manager daemon"
+url="https://skarnet.org/software/$pkgname/"
+arch="all"
+options="!check" # No test suite.
+license="ISC"
+_skalibs_version=2.9.0.0
+makedepends="skalibs-dev>=$_skalibs_version"
+subpackages="$pkgname-doc $pkgname-openrc"
+provides="udev=176"
+replaces="eudev"
+source="https://skarnet.org/software/$pkgname/$pkgname-$pkgver.tar.gz mdev.conf mdevd.run mdevd.initd"
+
+build() {
+ cd "$builddir"
+ ./configure --enable-allstatic --enable-static-libc
+ make
+}
+
+package() {
+ svcdir="$pkgdir/etc/s6-linux-init/current/run-image/service/mdevd"
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ mkdir -p -m 0755 "$svcdir"
+ cp -f "$srcdir/mdev.conf" "$pkgdir/etc/"
+ chmod 0644 "$pkgdir/etc/mdev.conf"
+ cp -f "$srcdir/mdevd.run" "$svcdir/run"
+ echo 3 > "$svcdir/notification-fd"
+ touch "$svcdir/down"
+}
+
+
+doc() {
+ pkgdesc="$pkgdesc (documentation)"
+ depends=
+ install_if="docs $pkgname=$pkgver-r$pkgrel"
+ mkdir -p "$subpkgdir/usr/share/doc"
+ cp -a "$builddir/doc" "$subpkgdir/usr/share/doc/$pkgname"
+}
+
+
+openrc() {
+ replaces="eudev-openrc"
+ rldir="$subpkgdir"/etc/runlevels/sysinit
+ default_openrc
+ mkdir -p "$rldir"
+ ln -s ../../init.d/mdevd "$rldir/mdevd"
+ ln -s ../../init.d/mdevd-coldplug "$rldir/mdevd-coldplug"
+}
+
+sha512sums="94bbcaf0c39511da392c932c5d38ced7029727a46997877d03bba41fc7302df3d4400d3957be9361055e954f3a22b785db40d56bb2f031bc49bb2f398179efe0 mdevd-0.1.1.0.tar.gz
+0533b15f0e6349fda3e2da7cfa8e83600e4dd75f5701204b971d97b614d9de499e48bc84f2a2fadcb9682e6a987c72f514c1665545e03b163b91c8915f5ad5d0 mdev.conf
+31231b28d0b980dda634e8b043a2ee31960493d60c2c9aac8a4f3f68ca1d130342569af2acd0bc04d9d8008b8e234ba949b64d9ec3ff1bded64b4e4f0ce3786b mdevd.run
+f6f9eebf49c2de6abde9cfb7a9d7b3a6b3afdd3e01ba4155f1b95dfa27e522363059b69cec19305881773d776ffeccf6c1106d537d01780468bd3b9846edb2cc mdevd.initd"