aboutsummaryrefslogtreecommitdiffstats
path: root/community/zram-init/APKBUILD
blob: 322beaf8d13bfb89ddd81427da54c36a880ef31b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
# Contributor: Pedro Filipe <xpecex@outlook.com>
pkgname=zram-init
pkgver=8.0
pkgrel=0
pkgdesc="wrapper script for the zram kernel module"
arch="noarch"
url="https://github.com/vaeth/zram-init"
license="GPL-2.0"
depends="e2fsprogs-extra"
subpackages="$pkgname-zsh-completion:zshcomp $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/vaeth/zram-init/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
options="!check"

package() {
	cd "$builddir"
	install -Dm644 modprobe.d/zram.conf "$pkgdir"/etc/modprobe.d/zram.conf
	install -Dm755 sbin/zram-init "$pkgdir"/usr/sbin/zram-init

	install -Dm644 openrc/conf.d/zram-init "$pkgdir"/etc/conf.d/zram-init
	install -Dm755 openrc/init.d/zram-init "$pkgdir"/etc/init.d/zram-init
}

zshcomp() {
	depends=""
	pkgdesc="Zsh completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel zsh"

	install -Dm644 "$builddir"/zsh/_$pkgname \
		"$subpkgdir"/usr/share/zsh/site-functions/_$pkgname
}

sha512sums="d8efb796f14482b389db940fda1cc2d3869fa139bb3d60d282fb4bfa9ee6f7adb93801c6e22860bf1eb1a2b1c4715681418f916ae7a96c1fe58ef003365eed34  zram-init-8.0.tar.gz"