1 # Build recipe for eudev.
3 # Copyright (c) 2016-2020 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 # Define a category for the output of the package name
24 tarname=${program}-${version}.tar.gz
27 fetch=http://dev.gentoo.org/~blueness/eudev/$tarname
30 Dynamic device management.
32 Udev is the device manager for the Linux 2.6 kernel series.
33 Its primary function is managing device nodes in /dev.
35 It is the successor of devfs and hotplug, which means that
36 it handles the /dev directory and all user space actions
37 when adding/removing devices, including firmware load.
39 This is a fork of Udev from Gentoo.
42 homepage=http://wiki.gentoo.org/wiki/Eudev
45 # Source documentation
47 docsdir="${docdir}/${program}-${version}"
53 unpack "${tardir}/$tarname"
57 # Set sane permissions
58 chmod -R u+w,go-w,a+rX-s .
60 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
62 --libdir=/usr/lib${libSuffix} \
69 --enable-rule-generator \
71 --disable-introspection \
72 --build="$(cc -dumpmachine)"
75 make -j${jobs} DESTDIR="$destdir" install-strip
77 # Move installed hwdb files under /lib
78 # Reported on http://github.com/gentoo/eudev/pull/127
79 mkdir -p "${destdir}/lib/udev/hwdb.d"
80 mv "${destdir}/etc/udev/hwdb.d"/* "${destdir}/lib/udev/hwdb.d"
82 # Make symlink for multipath
84 cd "${destdir}/usr/sbin" && \
85 ln -sf /usr/lib${libSuffix}/udev/scsi_id .
88 # Install perp service for udevd(8)
90 mkdir -p "${destdir}/etc/perp/udevd"
92 cp -p "${worktree}/archive/eudev/rc.log" \
93 "${worktree}/archive/eudev/rc.main" \
94 "${destdir}/etc/perp/udevd/"
96 chmod 755 "${destdir}"/etc/perp/udevd/rc.*
98 # Be an active service by default
99 chmod +t "${destdir}/etc/perp/udevd"
101 # To handle config file(s)
102 touch "${destdir}/etc/perp/udevd/.graft-config" \
103 "${destdir}/etc/udev/.graft-config"
105 # Compress and link man pages (if needed)
106 if test -d "${destdir}/$mandir"
109 cd "${destdir}/$mandir"
110 find . -type f -exec lzip -9 '{}' +
111 find . -type l | while read -r file
113 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
120 mkdir -p "${destdir}${docsdir}"
121 cp -p $docs "${destdir}${docsdir}"