diff --git a/chapter08/kmod.xml b/chapter08/kmod.xml index f59837b6e..bad23a476 100644 --- a/chapter08/kmod.xml +++ b/chapter08/kmod.xml @@ -87,33 +87,30 @@ meson setup --prefix=/usr .. \ Installation of Kmod - 32bit - Clean previous build but keep man pages as they cannot - be recreated since xsltproc isn't installed yet: - -sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile -make clean + Clean previous build: + +cd .. && +rm -rf build && +cd build Prepare Kmod for compilation: -CC="gcc -m32" ./configure \ - --host=i686-pc-linux-gnu \ - --prefix=/usr \ - --libdir=/usr/lib32 \ - --sysconfdir=/etc \ - --with-openssl \ - --with-xz \ - --with-zstd \ - --with-zlib \ - --disable-manpages \ - --with-rootlibdir=/usr/lib32 +PKG_CONFIG_PATH="/usr/lib32/pkgconfig" \ +CC="gcc -m32 -march=i686" \ +CXX="g++ -m32 -march=i686" \ +meson setup --prefix=/usr .. \ + --sbindir=/usr/sbin \ + --buildtype=release \ + --libdir=/usr/lib32 \ + -D manpages=false Compile the package: -make +ninja Install the package: -make DESTDIR=$PWD/DESTDIR install +DESTDIR=$PWD/DESTDIR ninja install cp -Rv DESTDIR/usr/lib32/* /usr/lib32 rm -rf DESTDIR @@ -126,33 +123,30 @@ rm -rf DESTDIR Installation of Kmod - x32bit - Clean previous build but keep man pages as they cannot - be recreated since xsltproc isn't installed yet: + Clean previous build: -sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile -make clean +cd .. && +rm -rf build && +cd build Prepare Kmod for compilation: -CC="gcc -mx32" ./configure \ - --host=x86_64-pc-linux-gnux32 \ - --prefix=/usr \ - --libdir=/usr/libx32 \ - --sysconfdir=/etc \ - --with-openssl \ - --with-xz \ - --with-zstd \ - --with-zlib \ - --disable-manpages \ - --with-rootlibdir=/usr/libx32 +PKG_CONFIG_PATH="/usr/libx32/pkgconfig" \ +CC="gcc -mx32" \ +CXX="g++ -mx32" \ +meson setup --prefix=/usr .. \ + --sbindir=/usr/sbin \ + --buildtype=release \ + --libdir=/usr/libx32 \ + -D manpages=false Compile the package: -make +ninja Install the package: -make DESTDIR=$PWD/DESTDIR install +DESTDIR=$PWD/DESTDIR ninja install cp -Rv DESTDIR/usr/libx32/* /usr/libx32 rm -rf DESTDIR