initial import
This commit is contained in:
59
rapidjson/PKGBUILD
Normal file
59
rapidjson/PKGBUILD
Normal file
@@ -0,0 +1,59 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=rapidjson
|
||||
pkgver=1.1.0
|
||||
_debver=1.1.0+dfsg2
|
||||
_debrel=7
|
||||
pkgrel=1
|
||||
pkgdesc='Fast JSON parser/generator for C++ with both SAX/DOM style API'
|
||||
arch=('any')
|
||||
url='https://github.com/miloyip/rapidjson'
|
||||
license=('Expat')
|
||||
makedepends=('cmake' 'quilt')
|
||||
source=(https://github.com/miloyip/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz
|
||||
https://deb.debian.org/debian/pool/main/r/rapidjson/rapidjson_${_debver}-${_debrel}.debian.tar.xz)
|
||||
sha512sums=('2e82a4bddcd6c4669541f5945c2d240fb1b4fdd6e239200246d3dd50ce98733f0a4f6d3daa56f865d8c88779c036099c52a9ae85d47ad263686b68a88d832dff'
|
||||
'701ebc1ac98a081ad2e7ccb7e350a2b27f041b5a54c7cd33f0b8d65b3a6202e2c024764e911bb8d4e99da6780dc351c7c5f378decac94b9a687ceb0f504f154e')
|
||||
|
||||
prepare() {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
|
||||
find -name CMakeLists.txt | xargs sed -e 's|-Werror||' -i # Don't use -Werror
|
||||
}
|
||||
|
||||
build () {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DRAPIDJSON_HAS_STDSTRING=ON \
|
||||
-DRAPIDJSON_BUILD_CXX11=ON \
|
||||
-DRAPIDJSON_ENABLE_INSTRUMENTATION_OPT=OFF \
|
||||
-DDOC_INSTALL_DIR=/usr/share/doc/${pkgname} \
|
||||
..
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
DESTDIR="$pkgdir" make -C build install
|
||||
|
||||
install -Dm644 license.txt -t "$pkgdir"/usr/share/licenses/$pkgname
|
||||
}
|
||||
Reference in New Issue
Block a user