PKGBUILDs/extra/soprano/PKGBUILD
2009-10-09 21:23:22 -05:00

39 lines
1.4 KiB
Bash

# $Id: PKGBUILD 53576 2009-10-02 16:19:41Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgname=soprano
pkgver=2.3.1
pkgrel=1
pkgdesc='A library which provides a highly usable object-oriented C++/Qt4 framework for RDF data'
arch=('i686' 'x86_64')
url='http://soprano.sourceforge.net/'
license=('GPL' 'LGPL')
depends=('qt' 'clucene' 'redland')
makedepends=('cmake' 'openjdk6')
optdepends=('java-runtime=6: Sesame2 backend')
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
md5sums=('c9a2c008b80cd5d76599e9d48139dfe9')
build() {
. /etc/profile.d/openjdk6.sh
if [ "${CARCH}" = "x86_64" ]; then
_jvmarch=amd64
else
_jvmarch=i686
fi
cd "${srcdir}"
mkdir build
cd build
# we need the rpath
cmake "../${pkgname}-${pkgver}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=OFF \
-DCMAKE_INSTALL_PREFIX=/usr || return 1
#This is evil. We hack the library paths in the binary so that jre is also possible instead of just only openjdk.
sed -e "s#${JAVA_HOME}/jre/lib/${_jvmarch}/server/libjvm.so#-L ${JAVA_HOME}/jre/lib/${_jvmarch}/server -ljvm#" \
-e "s#:${JAVA_HOME}/jre/lib/${_jvmarch}/server#:${JAVA_HOME}/jre/lib/${_jvmarch}/server:/opt/java/jre/lib/${_jvmarch}/server#" \
-i backends/sesame2/CMakeFiles/soprano_sesame2backend.dir/link.txt || return 1
make || return 1
make DESTDIR="${pkgdir}" install || return 1
}