iglunix/pkgs/libnl-tiny/build.sh

36 lines
744 B
Bash
Raw Normal View History

2021-04-10 09:00:33 +00:00
pkgname=libnl-tiny
pkgver=master
fetch() {
2021-04-10 10:01:16 +00:00
curl "https://git.openwrt.org/?p=project/libnl-tiny.git;a=snapshot;h=HEAD;sf=tgz" -o $pkgname-$pkgver.tar.xz
2021-04-10 09:00:33 +00:00
tar -xf $pkgname-$pkgver.tar.xz
2021-04-10 10:01:16 +00:00
cp ../cmake-no-extra-errs.patch .
mv $pkgname-HEAD-* $pkgname-$pkgver
mkdir $pkgname-$pkgver/build
cd $pkgname-$pkgver
patch -p1 < ../cmake-no-extra-errs.patch
2021-04-10 09:00:33 +00:00
}
build() {
cd $pkgname-$pkgver
2021-04-10 10:01:16 +00:00
cd build
cmake -G Ninja ../ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib
samu
2021-04-10 09:00:33 +00:00
}
package() {
cd $pkgname-$pkgver
2021-04-10 10:01:16 +00:00
cd build
DESTDIR=$pkgdir samu install
ln -sr $pkgdir/usr/lib/pkgconfig/libnl-tiny.pc $pkgdir/usr/lib/pkgconfig/libnl-3.0.pc
2021-04-10 09:00:33 +00:00
}
license() {
cd $pkgname-$pkgver
cat LICENSE
# cat COPYING
}