3.70. eudev-3.2.10
#!/bin/sh # Copyright © 1999-2022 Gerard Beekmans # Copyright © 2017-2022 Random Crew # Distributed under the terms of MIT License.
Additional source handling
src_postfetch() { tar xf ${ANYSRCDIR}/udev-lfs-20171102.tar.xz }
Configuration
Dataword rootprefix means that the project uses root directory / along with /usr and several essential packages are installed to root directory. When the system is merged to /usr, this word is absent in configuration.
Many paths for the package differ in case of using rootprefix scheme or using merged /usr. The string with ause command chooses the first block of options in case of rootprefix. The scheme with merged /usr uses second block.
src_config() { if ause 'rootprefix' ; then path_block=" --bindir=/sbin --sbindir=/sbin --libdir=${PREFIX}/lib --libexecdir=/lib --with-rootprefix= --with-rootlibdir=/lib " else path_block=" --bindir=${PREFIX}/sbin " fi ./configure \ --prefix=${PREFIX} \ --sysconfdir=/etc \ --enable-manpages \ --disable-static \ ${path_block} }
Compilation
src_compile() { make ${MAKEOPTS} }
Installation
src_install() { udev_pref="${PREFIX}" if ause 'rootprefix' ; then udev_pref= fi mkdir -p ${D}${udev_pref}/lib/udev/rules.d mkdir -p ${D}/etc/udev/rules.d make install ${MAKEOPTS} DESTDIR=${D} make -f udev-lfs-20171102/Makefile.lfs install DESTDIR=${D} }
Unit testing
src_check() { make check }
lfs_postinstall
Method lfs_postinstall is empty, that means the postinstall script of package is not executed after the package is unpacked into chrooted filesystem. The postinstall script requires root privileges, which we do not have.
lfs_postinstall() { return }
Run time scripts
Build code
Other files
Links
- url.lfs: https://linuxfromscratch.org/lfs/view/10.1/chapter08/eudev.html
- url.lfs.stage1: