1 # Contributor: Ferrazzo Riccardo <f.riccardo87@gmail.com>
2 # Based on qtjambi PKGBUILD
9 arch=( 'i686' 'x86_64')
10 [ $CARCH = i686 ] && ARCH=32
11 [ $CARCH = x86_64 ] && ARCH=64
13 pkgdesc="Java bindings for the Qt C++ toolkit."
14 url="http://qtjambi.sourceforge.net"
17 source=("http://sourceforge.net/projects/qtjambi/files/${pkgver}/qtjambi-linux${ARCH}-community-${pkgver}.tar.gz")
19 [ $ARCH = 32 ] && md5sums=('ad7a3780fb02b44a93b4d42114bd9a38')
20 [ $ARCH = 64 ] && md5sums=('3a6528c256da8be7da00258059ee2745')
22 depends=( "qt>=4.5" "java-environment>=6" )
23 makedepends=("phonon")
28 # Set the location of your Qt directory here
31 # Set the location of your Qt plugin directory here
32 PLUGINDIR=${QTDIR}/lib/qt/plugins
34 # Make the necessary directories
35 mkdir -p ${pkgdir}/{opt/qtjambi,${QTDIR}/{bin,lib,share/java},${PLUGINDIR}/{designer,qtjambi}}
37 # Enter the unpacked archive
38 cd ${srcdir}/qtjambi-linux${ARCH}-community-${pkgver}
40 # Copy QtJambi to its /opt directory
41 cp -a ./* ${pkgdir}/opt/qtjambi
43 # Link the Java executables to their respective directory
44 for jar in $( ls . | grep [.]jar ); do
45 ln -s /opt/qtjambi/${jar} ${pkgdir}/usr/share/java
46 ln -s /usr/share/java/${jar} ${pkgdir}/usr/share/java/${jar%-*}.jar
49 # Link the libraries to their respective directory
50 for library in $( ls lib ); do
51 if [[ ! -f ${QTDIR}/lib/${library} ]]; then
52 ln -s /opt/qtjambi/lib/${library} ${pkgdir}/${QTDIR}/lib
56 # Link the binaries to their respective directory
57 for binary in $( ls bin ); do
58 if [[ ! -f /usr/bin/${binary} ]]; then
59 ln -s /opt/qtjambi/bin/${binary} ${pkgdir}/${QTDIR}/bin
63 # Link the QtDesigner plugins to Qt's designer plugin directory
64 for plugin in $( ls plugins/designer ); do
65 ln -s /opt/qtjambi/plugins/designer/${plugin} ${pkgdir}/${PLUGINDIR}/designer
68 # Link the QtJambi plugins to their qtjambi plugin directory
69 for plugin in $( ls plugins/qtjambi ); do
70 ln -s /opt/qtjambi/plugins/qtjambi/${plugin} ${pkgdir}/${PLUGINDIR}/qtjambi