void-packages/srcpkgs/jsoncpp/template

42 lines
1.3 KiB
Plaintext
Raw Normal View History

2013-04-22 18:47:42 +02:00
# Template build file for 'jsoncpp'.
pkgname=jsoncpp
version=0.6.0rc2
_srcversion=0.6.0-rc2
2014-02-17 19:55:27 +01:00
revision=2
2013-04-22 18:47:42 +02:00
hostmakedepends="scons"
wrksrc="${pkgname}-src-${_srcversion}"
short_desc="A JSON implementation in C++"
maintainer="ojab@ojab.ru"
license="Public Domain or MIT"
homepage="http://sourceforge.net/projects/${pkgname}"
distfiles="http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${_srcversion}/${pkgname}-src-${_srcversion}.tar.gz"
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 19:55:27 +01:00
depends="jsoncpp>=${version}_${revision}"
2013-04-22 18:47:42 +02:00
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
2014-02-17 19:55:27 +01:00
vmove "usr/lib/*.so"
2013-04-22 18:47:42 +02:00
}
}