updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / rapidminer / PKGBUILD
blob4edb6934d7e2892d8337e0e54864a979d22c4470
1 # Maintainer: Thomas Dziedzic < gostrc at gmail >
2 # Contributor: Bram Schoenmakers <me@bramschoenmakers.nl>
4 pkgname=rapidminer
5 pkgver=5.1.017
6 pkgrel=1
7 pkgdesc='An open-source data mining solution.'
8 arch=('any')
9 url='http://rapid-i.com/'
10 license=('custom')
11 depends=('java-runtime')
12 optdepends=('gnuplot')
13 source=("http://downloads.sourceforge.net/project/rapidminer/1.%20RapidMiner/${pkgver:0:3}/rapidminer-${pkgver}.zip"
14         'rapidminer.desktop')
15 md5sums=('146b431a9de5e2d327afef81694b1009'
16          'd0dbcb8ad72c285efec9740c1cda65e0')
18 package() {
19   cd rapidminer
21   # Determine JAVA_HOME
22   [ -f /etc/profile.d/openjdk6.sh ] && source /etc/profile.d/openjdk6.sh
23   [ -z "$JAVA_HOME" ] && ( echo "Could not determine JAVA_HOME."; return 1 )
25   # Modify scripts such that the /opt/rapidminer prefix is recognized.
26   # Also set the JAVA_HOME
27   sed -i'' -e "s|^#RAPIDMINER_HOME=\\\${HOME}\$|RAPIDMINER_HOME=/opt/rapidminer\nJAVA_HOME=${JAVA_HOME}|" scripts/rapidminer
28   sed -i'' -e "s|^#RAPIDMINER_HOME=\\\${HOME}\$|RAPIDMINER_HOME=/opt/rapidminer\nJAVA_HOME=${JAVA_HOME}|" scripts/RapidMinerGUI
30   # Install files into prefix
31   find {lib,resources} -type f -exec install -m 644 -D {} ${pkgdir}/opt/rapidminer/{} \;
32   install -D scripts/rapidminer ${pkgdir}/opt/rapidminer/bin/rapidminer
33   install -D scripts/RapidMinerGUI ${pkgdir}/opt/rapidminer/bin/RapidMinerGUI
35   # custom licenses
36   pushd licenses
37   find . -type f -exec install -m 644 -D {} ${pkgdir}/usr/share/licenses/rapidminer/{} \;
38   popd
40   # install links to bins
41   install -d ${pkgdir}/usr/bin
42   ln -s /opt/rapidminer/bin/RapidMinerGUI \
43     ${pkgdir}/usr/bin/RapidMinerGUI
44   ln -s /opt/rapidminer/bin/rapidminer \
45     ${pkgdir}/usr/bin/rapidminer
47   # desktop file
48   install -D -m644 ${srcdir}/rapidminer.desktop \
49     ${pkgdir}/usr/share/applications/rapidminer.desktop