[arch-commits] Commit in jsoncpp/trunk (PKGBUILD)
Levente Polyak
anthraxx at archlinux.org
Wed Jan 18 18:12:19 UTC 2017
Date: Wednesday, January 18, 2017 @ 18:12:19
Author: anthraxx
Revision: 286943
upgpkg: jsoncpp 1.8.0-1
- upstream release
- separated documentation package
- added static libs
Modified:
jsoncpp/trunk/PKGBUILD
----------+
PKGBUILD | 56 ++++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 42 insertions(+), 14 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-01-18 18:01:45 UTC (rev 286942)
+++ PKGBUILD 2017-01-18 18:12:19 UTC (rev 286943)
@@ -3,36 +3,64 @@
# Contributor: Jonahtan Schaeffer <joschaeffer at gmail.com>
# COntributor: Drake Arconis <lightdrake at gmail.com>
-pkgname=jsoncpp
-pkgver=1.7.7
+pkgbase=jsoncpp
+pkgname=('jsoncpp' 'jsoncpp-doc')
+pkgver=1.8.0
pkgrel=1
pkgdesc='C++ library for interacting with JSON'
url='https://github.com/open-source-parsers/jsoncpp'
arch=('i686' 'x86_64')
license=('MIT' 'custom:Public_Domain')
-depends=('gcc-libs')
-makedepends=('cmake')
-source=(${pkgname}-${pkgver}.tar.gz::https://github.com/open-source-parsers/${pkgname}/archive/${pkgver}.tar.gz)
-sha512sums=('1b12cc497729ca447dae77f92c6a761494554021b306e8cedbea0ddf83f6569ca53380f8b53a0d4a62b5239c605328a419082e0610ca051a2957bcb7136ba644')
+makedepends=('gcc-libs' 'cmake' 'doxygen' 'graphviz')
+checkdepends=('python')
+options=('staticlibs')
+source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/open-source-parsers/${pkgbase}/archive/${pkgver}.tar.gz)
+sha512sums=('bd0aa56827932e5b50231216c9f501da12053bf9eed6e83210b5c52afb9aff610e71995446a7e2f5f4580ff37762956a307867d3eaa1aebd6ca31e574c9e4d4c')
+prepare() {
+ cd ${pkgbase}-${pkgver}
+ mkdir -p build
+}
+
build() {
- cd ${pkgname}-${pkgver}
+ cd ${pkgbase}-${pkgver}
+ python doxybuild.py --with-dot
+
+ cd build
cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
- -DBUILD_STATIC_LIBS=OFF
+ -DBUILD_STATIC_LIBS=ON \
+ ..
make
}
check() {
- cd ${pkgname}-${pkgver}
- make test
+ cd ${pkgbase}-${pkgver}/build
+ make test jsoncpp_test jsoncpp_readerwriter_tests
}
-package() {
- cd ${pkgname}-${pkgver}
- make DESTDIR="${pkgdir}" install
- install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+package_jsoncpp() {
+ depends=('gcc-libs')
+ optdepends=('jsoncpp-doc: documentation')
+
+ cd ${pkgbase}-${pkgver}
+ make -C build DESTDIR="${pkgdir}" install
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}
+package_jsoncpp-doc() {
+ pkgdesc+=' (documentation)'
+ optdepends=('jsoncpp')
+
+ cd ${pkgbase}-${pkgver}
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -dm 755 "${pkgdir}/usr/share/doc/${pkgbase}"
+ cp -a dist/doxygen/jsoncpp-api-html-${pkgver} "${pkgdir}/usr/share/doc/${pkgbase}/html"
+}
+
+# vim: ts=2 sw=2 et:
More information about the arch-commits
mailing list