44 lines
1.3 KiB
Text
44 lines
1.3 KiB
Text
# Template build file for 'jsoncpp'.
|
|
pkgname=jsoncpp
|
|
version=0.6.0rc2
|
|
_srcversion=0.6.0-rc2
|
|
revision=1
|
|
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
|
|
}
|
|
|
|
|
|
post_install() {
|
|
vinstall ${FILESDIR}/jsoncpp.pc 644 usr/lib/pkgconfig
|
|
}
|
|
|
|
jsoncpp-devel_package() {
|
|
depends="jsoncpp>=${version}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|