aboutsummaryrefslogtreecommitdiffstats
path: root/main/udev/APKBUILD
blob: a0b7deed611091fc96e6fe751fe8839a049049d4 (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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=udev
pkgver=175
pkgrel=8
pkgdesc="The userspace dev tools (udev)"
url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/"
arch="all"
license="GPL2"
subpackages="$pkgname-dev $pkgname-doc libudev libgudev"
depends=
makedepends="gobject-introspection-dev glib-dev gperf acl-dev libusb-compat-dev
	usbutils pciutils-dev libtool sed"
install=""
source="http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.tar.bz2
	get_pw_r_size.patch
	write_root_link_rule
	udev-mount.initd
	udev-postmount.initd
	udev.initd"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	update_config_sub || return 1
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--sbindir=/sbin \
		--libdir=/usr/lib \
		--with-rootlibdir=/lib \
		--libexecdir=/lib/udev \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1

	# Upstream moved udevd to /lib/udev
	ln -s "../lib/udev/udevd" "$pkgdir"/sbin/udevd

	# multipath-tools expect scsi_id in /sbin
	ln -s "../lib/udev/scsi_id" "$pkgdir"/sbin/scsi_id

	mkdir -p "$pkgdir"/usr/lib/pkgconfig
	chmod +x "$pkgdir"/lib/udev/write_*_rules
	for _i in write_root_link_rule; do
		install -Dm755 ../$_i "$pkgdir"/lib/udev/$_i
	done
	for _i in udev udev-mount udev-postmount; do
		install -Dm755 ../$_i.initd "$pkgdir"/etc/init.d/$_i
	done
	# provided by bluez
	rm -f "$pkgdir"/lib/udev/hid2hci

	# remove libtool archives
	rm "$pkgdir"/usr/lib/*.la
}

libudev() {
	pkgdesc="Dynamic library to access udev device information"
	replaces="udev"
	mkdir -p "$subpkgdir"/lib
	mv "$pkgdir"/lib/libudev.so.* "$subpkgdir"/lib/
}

libgudev() {
	pkgdesc="A GObject wrapper of the library gudev"
	replaces="udev"
	mkdir -p "$subpkgdir"/lib/ \
		"$subpkgdir"/usr/lib || return 1
	mv "$pkgdir"/lib/libgudev* "$subpkgdir"/lib/ || return 1
	mv "$pkgdir"/usr/lib/girepository-* \
		"$subpkgdir"/usr/lib/
}

md5sums="2fc9c1efcbde98e3d73ffee7a77aea47  udev-175.tar.bz2
d1a116770ca52765f2521bb27c1a093a  get_pw_r_size.patch
c9de7581099cdfdcd105666cd98a0f0a  write_root_link_rule
bfc97ba47f6db2b6ae458a65c0b396d5  udev-mount.initd
e99c87e62e7cb5acc4c55bf065944a11  udev-postmount.initd
c11fb3517a567db9994d5f9dbc88ecae  udev.initd"
sha256sums="4c7937fe5a1521316ea571188745b9a00a9fdf314228cffc53a7ba9e5968b7ab  udev-175.tar.bz2
1298d15ed74a33d283df2de41ef35464f3f71cca8efe3f19760fd2831477b0c0  get_pw_r_size.patch
f8cff0e73ef40c6a9f642aba35136eac6e60d4cdfb54027aad59f6b770c01915  write_root_link_rule
a9f9befa2d0794c1c114541d58c149f05f4ea82f8e52bb07e518b2e6c814ba16  udev-mount.initd
b58cc450ef2963da59cf1d7b9198bd9268c1637b5b6c72b085304a74e52ae3d6  udev-postmount.initd
4292752cf5780124db7e83f782d393ab32a17b6c30add0ce9414559fac888048  udev.initd"
sha512sums="1e2b3fd385d2b53b42949c83ecad7bd63244f865b6fa4c6fc96fe62b1c23be305f6d47c9c51cdfef4cb3b290f3dbb46b6fea12dfeedc01700fcd07a319c6a7fd  udev-175.tar.bz2
68188c54b866cf0d551aa52e9333d34224f8c4b59c225a24d3bdf19e248a89748b8ae39efcd7aa0ce3b41e4b60f6115798d7a1cc678c790623b6296eb559e970  get_pw_r_size.patch
f3dc810e41e8123a1004108afb98406aa7f44cb69072a6deb0dce75ed2de1d79304b3cbfc38ca3c3d7289db6695f65f3c87162c83f87a2052b404e901a344703  write_root_link_rule
3f06361d0e97a5f583f802b0fc9fbe1d7bdf8ebf0b649b2b9de84b30cf82229d66efe4c5f3ff2333c7ff8916132e652f935893746a4dbc833a6fa4d75f2667d2  udev-mount.initd
28b862c1f1df03b47299476044d734dfe51f274f8a5f29af9427e783cbdf1811343c9d27b941e566451576cf2263d8799262cc9b5c960df855ebab04c372beaa  udev-postmount.initd
51d821db817c56b9290290463c5eae19e41d0784389f9c6294f373fc635ffeb1e06ee5e67f0dac38e935b1ae3a285c62e0730bfb2354b2fb2485721aa1d24d0c  udev.initd"