Use upstream openwrt libnl-tiny

This commit is contained in:
Ella-0 2021-04-10 11:01:16 +01:00
parent e8bbc7069c
commit 55c1f73d86
2 changed files with 26 additions and 3 deletions

View file

@ -2,18 +2,30 @@ pkgname=libnl-tiny
pkgver=master pkgver=master
fetch() { fetch() {
curl -L "https://github.com/sabotage-linux/libnl-tiny/archive/refs/heads/master.tar.gz" -o $pkgname-$pkgver.tar.xz curl "https://git.openwrt.org/?p=project/libnl-tiny.git;a=snapshot;h=HEAD;sf=tgz" -o $pkgname-$pkgver.tar.xz
tar -xf $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz
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
} }
build() { build() {
cd $pkgname-$pkgver cd $pkgname-$pkgver
ckati prefix=/usr CC=cc cd build
cmake -G Ninja ../ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib
samu
} }
package() { package() {
cd $pkgname-$pkgver cd $pkgname-$pkgver
ckati install prefix=/usr DESTDIR=$pkgdir CC=cc cd build
DESTDIR=$pkgdir samu install
ln -sr $pkgdir/usr/lib/pkgconfig/libnl-tiny.pc $pkgdir/usr/lib/pkgconfig/libnl-3.0.pc
} }
license() { license() {

View file

@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,7 @@
INCLUDE_DIRECTORIES(include)
-ADD_DEFINITIONS(-Wall -Werror -Wextra -Wno-unused-parameter)
+#ADD_DEFINITIONS(-Wall -Werror -Wextra -Wno-unused-parameter)
STRING(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
ADD_LIBRARY(nl-tiny SHARED