removed -git from name; switch from makefiles to ninja, included patch file

This commit is contained in:
Swarnava Ghosh
2021-09-25 21:55:17 -04:00
parent aef78f97e1
commit dc5aea08d1
2 changed files with 22 additions and 18 deletions

View File

@@ -0,0 +1,11 @@
diff -ruN krpc-cpp-0.4.9-patched/CMakeLists.txt krpc-cpp-0.4.9/CMakeLists.txt
--- krpc-cpp-0.4.9-patched/CMakeLists.txt 2021-09-25 21:16:59 +0000
+++ krpc-cpp-0.4.9/CMakeLists.txt 2021-05-25 09:25:39 +0000
@@ -90,7 +90,6 @@
endif()
install(TARGETS krpc
- RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)

View File

@@ -1,13 +1,13 @@
# Maintainer: Swarnava Ghosh <swarnavaghosh04@gmail.com>
# Credits: Maximilian Schiller <manimax3@outlook.de> [https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=krpc-cpp]
_realname=krpc-cpp
pkgbase=mingw-w64-${_realname}-git
pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}-git
pkgbase=mingw-w64-${_realname}
pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}
pkgver=0.4.9
_kspver=1.12.1
pkgrel=1
pkgdesc="KRPC Client for c++"
arch=('x86_64' 'i686')
pkgdesc="KRPC Client for C++"
arch=('any')
url="https://github.com/krpc/krpc"
license=('LGPL3')
groups=()
@@ -15,37 +15,30 @@ depends=(
"${MINGW_PACKAGE_PREFIX}-asio"
"${MINGW_PACKAGE_PREFIX}-protobuf")
makedepends=(
"git"
"patch"
"unzip"
"${MINGW_PACKAGE_PREFIX}-make"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-cmake")
source=("https://github.com/nullprofile/krpc/releases/download/$pkgver-$_kspver/krpc-$pkgver-$_kspver.zip"
"https://gist.githubusercontent.com/swarnavaghosh04/452aa320a747ede48ea7f52403e45457/raw/514a82383f794314b71ad805a10cb04b7aef40f2/001-$_realname-$pkgver-cmake.patch")
md5sums=('9d6b9357447e1adf40e09c1cede52bbb'
'e55b95137c27cc8654e4d254019e80e0')
source=("https://github.com/nullprofile/krpc/releases/download/$pkgver-$_kspver/krpc-$pkgver-$_kspver.zip")
md5sums=('9d6b9357447e1adf40e09c1cede52bbb')
noextract=("krpc-$pkgver-$_kspver.zip")
prepare() {
echo prepare
unzip krpc-$pkgver-$_kspver.zip client/$_realname-$pkgver.zip
unzip client/$_realname-$pkgver.zip
rm -rf client *.zip
cd $_realname-$pkgver
patch --forward --strip=1 --input="${srcdir}/001-$_realname-$pkgver-cmake.patch"
patch --reverse --strip=1 --input="${startdir}/001-$_realname-cmake.patch"
}
build() {
echo build
cd "$_realname-$pkgver"
mkdir cmake-build && cd cmake-build
MSYS2_ARG_CONV_EXCL=* \
cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX}
mingw32-make
cmake ..
cmake --build .
}
package() {
echo package
cd "$_realname-$pkgver/cmake-build"
mingw32-make DESTDIR="$pkgdir/" install
cmake --install . --prefix "$pkgdir/$MINGW_PREFIX"
}