strip remaining libraries for the distribution size
[dragora.git] / recipes / boot / eudev / recipe
blob9f1ee6373e70b7fb83676c075657306b98229b38
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.
17 program=eudev
18 version=3.2.5
19 release=1
21 tarname=${program}-${version}.tar.gz
23 # Remote source(s)
24 fetch=http://dev.gentoo.org/~blueness/eudev/$tarname
26 description="
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
40 license=GPLv2+
42 # Source documentation
43 docs=COPYING
44 docsdir="${docdir}/${program}-${version}"
46 build()
48     set -e
50     unpack "${tardir}/$tarname"
52     cd "$srcdir"
54     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
55      $configure_args \
56      --libdir=/usr/lib${libSuffix} \
57      --mandir=$mandir \
58      --docdir=$docsdir \
59      --enable-static \
60      --enable-shared \
61      --enable-introspection=no \
62      --enable-hwdb \
63      --enable-manpages \
64      --build="$(cc -dumpmachine)"
66     make -j${jobs} V=1
67     make -j${jobs} DESTDIR="$destdir" install-strip
69     # Make symlink for multipath
70     (
71         cd "${destdir}/usr/sbin" && \
72         ln -sf /usr/lib${libSuffix}/udev/scsi_id .
73     )
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"
94     then
95         (
96             cd "${destdir}/$mandir"
97             find . -type f -exec lzip -9 '{}' +
98             find . -type l | while read -r file
99             do
100                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
101                 rm -- "$file"
102             done
103         )
104     fi
106     # Copy documentation
107     mkdir -p "${destdir}${docsdir}"
108     cp -p $docs "${destdir}${docsdir}"