void-packages/srcpkgs/jsoncpp/template

42 lines
1.3 KiB
Text
Raw Normal View History

2013-04-22 16:47:42 +00:00
# Template build file for 'jsoncpp'.
pkgname=jsoncpp
version=0.6.0rc2
_srcversion=0.6.0-rc2
2014-06-15 07:16:37 +00:00
revision=3
2013-04-22 16:47:42 +00:00
hostmakedepends="scons"
wrksrc="${pkgname}-src-${_srcversion}"
short_desc="A JSON implementation in C++"
2014-06-15 07:16:37 +00:00
maintainer="ojab <ojab@ojab.ru>"
2013-04-22 16:47:42 +00:00
license="Public Domain or MIT"
2014-06-15 07:16:37 +00:00
homepage="http://jsoncpp.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-src-${_srcversion}.tar.gz"
2013-04-22 16:47:42 +00:00
checksum=d4d193d163f520b08b9155cba978615892ca1359d77e3fb261fce2f86d09b283
do_build() {
sed -i SConstruct -e "s/g++/${CXX}/g"
scons CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS} " \
DESTDIR="${DESTDIR}" platform=linux-gcc
${CXX} -o libjsoncpp.so.0.0.0 -shared -Wl,-soname,libjsoncpp.so.0 \
buildscons/linux-gcc-*/src/lib_json/*.os -lpthread
}
do_install() {
vmkdir usr/lib
cp libjsoncpp.so.0.0.0 ${DESTDIR}/usr/lib/
ln -sf libjsoncpp.so.0.0.0 ${DESTDIR}/usr/lib/libjsoncpp.so
ln -sf libjsoncpp.so.0.0.0 ${DESTDIR}/usr/lib/libjsoncpp.so.0
vmkdir usr/include/jsoncpp/json
install -p -m 0644 include/json/*.h ${DESTDIR}/usr/include/jsoncpp/json
vinstall ${FILESDIR}/jsoncpp.pc 644 usr/lib/pkgconfig
}
jsoncpp-devel_package() {
2014-02-17 18:55:27 +00:00
depends="jsoncpp>=${version}_${revision}"
2013-04-22 16:47:42 +00:00
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
2014-02-17 18:55:27 +00:00
vmove "usr/lib/*.so"
2013-04-22 16:47:42 +00:00
}
}