comparison core/kmod/kmod.sh @ 1222:325631424c65

misc: bring back build function
author David Demelier <markand@malikania.fr>
date Wed, 27 Oct 2021 11:32:16 +0200
parents a47aaf9743a0
children 9867e578b1a9
comparison
equal deleted inserted replaced
1221:a47aaf9743a0 1222:325631424c65
45 with_zlib="--with-zlib" 45 with_zlib="--with-zlib"
46 else 46 else
47 with_zlib="--without-zlib" 47 with_zlib="--without-zlib"
48 fi 48 fi
49 49
50 rm -rf $PKGNAME-$PKGVERSION 50 build()
51 tar xvf $PKGNAME-$PKGVERSION.tar.xz 51 {
52 cd $PKGNAME-$PKGVERSION 52 rm -rf $PKGNAME-$PKGVERSION
53 tar xvf $PKGNAME-$PKGVERSION.tar.xz
54 cd $PKGNAME-$PKGVERSION
53 55
54 CC="$CC" \ 56 CC="$CC" \
55 CFLAGS="$CFLAGS" \ 57 CFLAGS="$CFLAGS" \
56 LDFLAGS="$LDFLAGS" \ 58 LDFLAGS="$LDFLAGS" \
57 LIBS="$LIBS" \ 59 LIBS="$LIBS" \
58 ./configure \ 60 ./configure \
59 --build=$CBUILD \ 61 --build=$CBUILD \
60 --host=$CHOST \ 62 --host=$CHOST \
61 --prefix=/usr \ 63 --prefix= \
62 $with_xz \ 64 $with_xz \
63 $with_zlib 65 $with_zlib
64 make 66 make
65 make install DESTDIR=$DESTDIR 67 make install DESTDIR=$DESTDIR
66 find $DESTDIR -type f -name "*.la" -delete 68 find $DESTDIR -type f -name "*.la" -delete
67 69
68 # compatibility symlinks like lsmod, rmmod are installed as well. 70 # compatibility symlinks like lsmod, rmmod are installed as well.
69 for tool in lsmod insmod rmmod depmod modinfo modprove; do 71 for tool in lsmod insmod rmmod depmod modinfo modprove; do
70 ln -sf kmod $DESTDIR/bin/$tool 72 ln -sf kmod $DESTDIR/bin/$tool
71 done 73 done
72 74
73 cd .. 75 cd ..
74 rm -rf $PKGNAME-$PKGVERSION 76 rm -rf $PKGNAME-$PKGVERSION
77 }