1 # Build recipe for eudev.
3 # Copyright (c) 2016-2017 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 tarname=${program}-${version}.tar.gz
24 fetch=http://dev.gentoo.org/~blueness/eudev/$tarname
27 Dynamic device management.
29 Udev is the device manager for the Linux 2.6 kernel series.
30 Its primary function is managing device nodes in /dev.
32 It is the successor of devfs and hotplug, which means that
33 it handles the /dev directory and all user space actions
34 when adding/removing devices, including firmware load.
36 This is a fork of Udev from Gentoo.
39 homepage=http://wiki.gentoo.org/wiki/Eudev
42 # Source documentation
44 docsdir="${docdir}/${program}-${version}"
50 unpack "${tardir}/$tarname"
54 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
56 --libdir=/usr/lib${libSuffix} \
61 --enable-introspection=no \
64 --build="$(cc -dumpmachine)"
67 make -j${jobs} DESTDIR="$destdir" install-strip
69 # Make symlink for multipath
71 cd "${destdir}/usr/sbin" && \
72 ln -sf /usr/lib${libSuffix}/udev/scsi_id .
75 # Install perp service for udevd(8)
77 mkdir -p "${destdir}/etc/perp/udevd"
79 cp -p "${worktree}/archive/eudev/rc.log" \
80 "${worktree}/archive/eudev/rc.main" \
81 "${destdir}/etc/perp/udevd/"
83 chmod 755 "${destdir}"/etc/perp/udevd/rc.*
85 # Be an active service by default
86 chmod +t "${destdir}/etc/perp/udevd"
88 # To handle config file(s)
89 touch "${destdir}/etc/perp/udevd/.graft-config" \
90 "${destdir}/etc/udev/.graft-config"
92 # Compress and link man pages (if needed)
93 if test -d "${destdir}/$mandir"
96 cd "${destdir}/$mandir"
97 find . -type f -exec lzip -9 '{}' +
98 find . -type l | while read -r file
100 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
107 mkdir -p "${destdir}${docsdir}"
108 cp -p $docs "${destdir}${docsdir}"