aboutsummaryrefslogtreecommitdiffstats
path: root/main/eudev/APKBUILD
blob: 80ff36aa11e3254395c22cbcafc9f9895c42e9fb (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=eudev
pkgver=3.2
pkgrel=0
pkgdesc="OpenRC compatible fork of systemd-udev"
url="https://wiki.gentoo.org/wiki/Project:Eudev"
arch="all"
license="GPLv2"
depends="udev-init-scripts"
depends_dev=""
replaces="udev"
makedepends="$depends_dev gperf glib-dev linux-headers kmod-dev
	gobject-introspection-dev util-linux-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-netifnames"
source="http://dev.gentoo.org/~blueness/$pkgname/$pkgname-$pkgver.tar.gz
	udev-postmount.initd
	setup-udev
	"

builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$builddir"
	# we need disable kmod til busybox depmod generates binary formats:
	# modules.dep.bin modules.alias.bin modules.symbols.bin
	# modules.builtin.bin
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--sysconfdir=/etc \
		--with-rootprefix= \
		--with-rootrundir=/run \
		--with-rootlibexecdir=/lib/udev \
		--libdir=/usr/lib \
		--enable-split-usr \
		--enable-manpages \
		--disable-hwdb \
		--enable-kmod \
		--exec-prefix=/ \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" sharepkgconfigdir=/usr/lib/pkgconfig \
		install || return 1

	install -Dm755 "$srcdir"/udev-postmount.initd \
		"$pkgdir"/etc/init.d/udev-postmount || return 1
	install -Dm755 "$srcdir"/setup-udev \
		"$pkgdir"/sbin/setup-udev || return 1
}

dev() {
	replaces="udev-dev"
	default_dev
}

libs() {
	pkgdesc="Dynamic library to access udev device information"
	replaces="libudev"
	depends=""
	mkdir -p "$subpkgdir"/lib
	for i in "$pkgdir"/usr/lib/libudev.so.*; do
		mv $i "$subpkgdir"/lib || return 1
		ln -s ../../lib/${i##*/} "$pkgdir"/usr/lib/${i##*/} || return 1
	done
}

netifnames() {
	arch="noarch"
	pkgdesc="udev rules for systemd-style interface names"
	mkdir -p "$subpkgdir"/lib/udev/rules.d
	mv "$pkgdir"/lib/udev/rules.d/80-net-name-slot.rules \
		"$subpkgdir"/lib/udev/rules.d/
}

md5sums="7e42d9b9ed8162021665139520676367  eudev-3.2.tar.gz
17ca36a764f5e8a89454344cde828740  udev-postmount.initd
6fe6a4b05f2768e240c3a20caa0f0cee  setup-udev"
sha256sums="d84a5f7942393a009afc6af0bf31e98841147a0521b91ffbed161dccac303c25  eudev-3.2.tar.gz
b0327069dbb57b39600079b87df80915dabb77c2fa298d6ae109ca04f8ba08b5  udev-postmount.initd
7c961c05700e881677249d3aa0ac3a4b489d203cab7464d38f1a78c3692026be  setup-udev"
sha512sums="84c4dc6683531a3efb1e6b4e3ce4108c1747a7d7f07519d46009a9d1b77323d4e0331aa4c2870a4b571bfb01f6bec3444f1bf0d4ed0a524118b32ded49c3eb7c  eudev-3.2.tar.gz
8ef1b911843ab13acb1c1b9b7a0a5cd76659f395c3db9e579429556f23eacebb414507dc0231e2455e7589bc70054fa1e6b6dd93dd833f7101c0da0597aabf88  udev-postmount.initd
aa8a040ad503633bf751e8cab34535715f0db2a8b4b716a1dc0b00a6f9c6a78fabc0652daba3e43df91d4d80c68563c00a27b7bc6f419573bc7704a5c7f76ee1  setup-udev"