aboutsummaryrefslogtreecommitdiffstats
path: root/community/zram-init/APKBUILD
blob: 1cec0fde7d78e357f76f71efd4441841b8ed4738 (plain) (blame)
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
36
37
38
39
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
pkgname=zram-init
pkgver=3.8
pkgrel=0
pkgdesc="wrapper script for the zram kernel module"
arch="noarch"
url="https://github.com/vaeth/zram-init"
license="GPL2"
depends="e2fsprogs-extra"
subpackages="$pkgname-zsh-completion:zshcomp"
source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"

_builddir="$srcdir/$pkgname-$pkgver"
build() {
	return 0
}

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"
	arch="noarch"

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

md5sums="fb36ef7138f028de71ed1d5e372a6e02  zram-init-3.8.tar.gz"
sha256sums="4a43c424739dda6c4ffe62b5431b6fb1f476afd9f8b9b9149eb32314cd34a3a6  zram-init-3.8.tar.gz"
sha512sums="c083f34bba6031f8e247f61a1451343e14cc4bc5c4731ad3a32a5f0eea265936a83b27ad0e3cbd2ba0e05e2bec1e6ae739b6e4149d120dafbcc057437188f07f  zram-init-3.8.tar.gz"