Commit ccc23943 authored by Leo's avatar Leo
Browse files

testing/lwan: fix build

parent 2db23639
......@@ -2,7 +2,7 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lwan
pkgver=0.1
pkgrel=0
pkgrel=1
pkgdesc="Experimental, scalable, high performance HTTP server"
url="https://lwan.ws"
arch="x86_64"
......@@ -10,33 +10,30 @@ license="GPL-2.0-or-later"
checkdepends="python3 py3-requests"
makedepends="cmake bsd-compat-headers lua5.1-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-libs $pkgname-dbg"
source="$pkgname-$pkgver.tar.gz::https://github.com/lpereira/$pkgname/archive/v$pkgver.tar.gz
source="$pkgname-$pkgver.tar.gz::https://github.com/lpereira/lwan/archive/v$pkgver.tar.gz
fix-pthread-stack-min.patch
fix-libdir.patch"
builddir="$srcdir/$pkgname-$pkgver"
fix-libdir.patch
fix-pkgconfig-version.patch
"
build() {
cd "$builddir"
cmake \
-DCMAKE_BUILD_TYPE=MinSizeRel \
CFLAGS="$CFLAGS -DHAS_SECURE_GETENV=1"
VERSION="$pkgver" \
cmake -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_C_FLAGS_MINSIZEREL="$CFLAGS" \
-DCMAKE_CXX_FLAGS_MINSIZEREL="$CXXFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL="$LDFLAGS"
make
-DBUILD_SHARED_LIBS=ON
make -C build
}
check() {
cd "$builddir"
make testsuite -j1
make -C build testsuite -j1
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
make -C build DESTDIR="$pkgdir" install
rm -f "$pkgdir"/usr/lib/*.a
}
libs() {
......@@ -46,6 +43,12 @@ libs() {
mv "$pkgdir"/usr/lib/*.so "$subpkgdir"/usr/lib/
}
dev() {
depends_dev="$pkgname=$pkgver-r$pkgrel"
default_dev
}
sha512sums="6cd42b81402f98c13f905149e515758994b15d9bda6179112c5b2ce59f63c1ce6299234ffcdd64fbc8c37e5f4fd45cfe125c80a05a09ba599158ecf26f5c511c lwan-0.1.tar.gz
e0db0c8c580543399893a86374cc2597cd8f8b358bc79334401948f0729e6da69d719388f023fd696e71d4cca3d9312d26b62b5d8aa0d44196754f8707b0bbcb fix-pthread-stack-min.patch
43e3cdbfa55357a35ea3980d18dcd1962bb850b52592f8c5d270f5f4860cde3ab1e4e371136cb59b7b3d1fa98d81c0f5de447630b40d2300953ff6b62ab1bb4a fix-libdir.patch"
43e3cdbfa55357a35ea3980d18dcd1962bb850b52592f8c5d270f5f4860cde3ab1e4e371136cb59b7b3d1fa98d81c0f5de447630b40d2300953ff6b62ab1bb4a fix-libdir.patch
b1107bcca58a6243a1e297ec86af7a5fddde856ef718425903abb6163295f6f861c7c55ec961118f087e175b23d2772cf3ce25b998bca8da3129c289ab10ad65 fix-pkgconfig-version.patch"
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5974b5c..cf91527 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -211,12 +211,7 @@ set(PKG_CONFIG_LIBS "-L\${libdir} -llwan ${ADDITIONAL_LIBRARIES_STR}")
unset(ADDITIONAL_LIBRARIES_STR)
set(PKG_CONFIG_CFLAGS "-I\${includedir}")
-execute_process(
- COMMAND git log -1 --format=%h
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
- OUTPUT_VARIABLE PROJECT_VERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE
-)
+set(PROJECT_VERSION $ENV{VERSION})
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/src/cmake/lwan.pc.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment