Skip to content

Instantly share code, notes, and snippets.

@madc
Created September 1, 2015 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madc/de7e9dacb9c3c5f31ec9 to your computer and use it in GitHub Desktop.
Save madc/de7e9dacb9c3c5f31ec9 to your computer and use it in GitHub Desktop.
PKGBUILD for jsoncpp 0.6.0rc2
pkgname=jsoncpp
pkgver=0.6.0rc2
_pkgver=0.6.0-rc2
pkgrel=1
pkgdesc='A C++ library for interacting with JSON'
url='https://github.com/open-source-parsers/jsoncpp'
license=('MIT' 'custom:Public_Domain')
arch=('i686' 'x86_64')
depends=('gcc-libs')
makedepends=('scons')
source=("https://github.com/open-source-parsers/${pkgname}/archive/svn-release-${_pkgver}.tar.gz")
md5sums=('29f44fa88d6f06d1b906fa64411eeb4d')
build() {
cd ${pkgname}-svn-release-${_pkgver}
scons platform=linux-gcc
}
package() {
cd ${pkgname}-svn-release-${_pkgver}
install -d "${pkgdir}"/usr/include/jsoncpp
cp -r include/json "${pkgdir}"/usr/include/jsoncpp/json
install -Dm644 buildscons/linux-gcc-*/src/lib_json/libjson_linux-gcc*libmt.so \
"${pkgdir}"/usr/lib/libjsoncpp.so
ln -s /usr/lib/libjsoncpp.so "${pkgdir}"/usr/lib/libjsoncpp.so.0
ln -s /usr/lib/libjsoncpp.so.0 "${pkgdir}"/usr/lib/libjsoncpp.so.0.0.0
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
@madc
Copy link
Author

madc commented Sep 7, 2015

Create the package with makepkg -s and install it with pacman -U jsoncpp-0.6.0rc2-1-x86_64.pkg.tar.xz.
Add jsoncpp to IgnorePkg in /etc/pacman.conf to avoid an upgrade, which will break your system updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment