summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorsum012020-06-17 19:31:54 -0400
committersum012020-06-17 19:31:54 -0400
commit01bfef42e36ec012a7ebd00930d623531c2863e4 (patch)
treead43295da0378498c1e79e9ba24f94397ae1977b /PKGBUILD
parent684a4871168f4dae847763382a4a7a2542cd9450 (diff)
downloadaur-01bfef42e36ec012a7ebd00930d623531c2863e4.tar.gz
Force Cmake to use full version in ConfigVersion
Lets users actually do stuff like find_package(httplib 0.6.7) instead of find_package(httplib 0.6)
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD9
1 files changed, 6 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ad9b200a1930..bdf04bae7549 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: sum01 <sum01@protonmail.com>
pkgname=cpp-httplib
pkgver=0.7.0
-pkgrel=1
+pkgrel=2
pkgdesc='A C++ header-only HTTP/HTTPS server and client library'
arch=('any')
url='https://github.com/yhirose/cpp-httplib'
@@ -11,8 +11,11 @@ optdepends=('openssl>=1.1.1: https support' 'zlib: compression support')
source=("$pkgname-$pkgver.tar.gz::https://github.com/yhirose/cpp-httplib/archive/v$pkgver.tar.gz")
sha512sums=('4ffbeb6672dec5f3704d6c3da09acf0e1984b5c7c68455f7fb030a7457bc64983665498015f2372d8a85da02be1750bab03dae956653297ac8efef67ff682854')
build() {
- mkdir -p "$srcdir/$pkgname-$pkgver/build"
- cd "$srcdir/$pkgname-$pkgver/build"
+ cd "$srcdir/$pkgname-$pkgver"
+ # Lets us force a full version string to be defined instead of just a major.minor
+ sed -i "75s/^/set\(_httplib_version ${pkgver}\)/" "CMakeLists.txt"
+ mkdir -p "build"
+ cd "build"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
cmake --build .
}