aboutsummaryrefslogtreecommitdiffstats
path: root/main/udev/APKBUILD
blob: e1b6400fc7c08491b2afbb677170004f9136d17f (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
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=9
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 linux-headers"
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
a725871bf3bab6430718fa22a1607293  udev-mount.initd
fbb31c795abc79091ca67b3d46782fc0  udev-postmount.initd
e636c4e5b5e46dd3345f5ab704311d41  udev.initd"
sha256sums="4c7937fe5a1521316ea571188745b9a00a9fdf314228cffc53a7ba9e5968b7ab  udev-175.tar.bz2
1298d15ed74a33d283df2de41ef35464f3f71cca8efe3f19760fd2831477b0c0  get_pw_r_size.patch
f8cff0e73ef40c6a9f642aba35136eac6e60d4cdfb54027aad59f6b770c01915  write_root_link_rule
8280ab0ff36e004b020da0a9242e51346244a7a22f25f71e9389cab516585a14  udev-mount.initd
7cff09cf881bfcb8ce1e6e950468ae409564de3b4b15660bd49c632631b8cb92  udev-postmount.initd
101977a7ab6d10ee96230fca4e2b9ff04264835d47e4099012285f054fa1f87a  udev.initd"
sha512sums="1e2b3fd385d2b53b42949c83ecad7bd63244f865b6fa4c6fc96fe62b1c23be305f6d47c9c51cdfef4cb3b290f3dbb46b6fea12dfeedc01700fcd07a319c6a7fd  udev-175.tar.bz2
68188c54b866cf0d551aa52e9333d34224f8c4b59c225a24d3bdf19e248a89748b8ae39efcd7aa0ce3b41e4b60f6115798d7a1cc678c790623b6296eb559e970  get_pw_r_size.patch
f3dc810e41e8123a1004108afb98406aa7f44cb69072a6deb0dce75ed2de1d79304b3cbfc38ca3c3d7289db6695f65f3c87162c83f87a2052b404e901a344703  write_root_link_rule
fc8e32631e58dd9d6f6b9e242336b7c4bdb4e5c7293b6b7767fc0dd8b1bf8f90afcefa814c3d5ab1257f81daa4f54c3d7f4fb271e6bd2f45f965739b22fe5cda  udev-mount.initd
969936c98f76e32683a1cf8f9ed94f66193d8f63c10b8e73091f296b074c0cac45d1ef6de1e2fcade71a2d22680d608a8528648f0ac273a014865025f446dda2  udev-postmount.initd
7fcfddc9d5b6326a20e30bebfec23d60ed980c62620b4a318ef7e4c44354b946c0fb85b80a030c87c0f0f457a748194a0ba4cf9c9f09bf607c915a86c9e4d33b  udev.initd"