updated on Tue Jan 17 20:03:13 UTC 2012
[aur-mirror.git] / qtjambi / PKGBUILD
blob375614cdff6a13d9c0c8bf87d195247adab533be
1 # Contributor: Ferrazzo Riccardo <f.riccardo87@gmail.com>
2 # Based on qtjambi PKGBUILD
3 # Category: lib
5 pkgname=qtjambi
6 pkgver=4.6.3
7 pkgrel=1
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"
15 license=('GPL')
17 source=("http://sourceforge.net/projects/qtjambi/files/${pkgver}/qtjambi-linux${ARCH}-community-${pkgver}.tar.gz")
18 md5sums=()
19 [ $ARCH = 32 ] && md5sums=('ad7a3780fb02b44a93b4d42114bd9a38')
20 [ $ARCH = 64 ] && md5sums=('3a6528c256da8be7da00258059ee2745')
22 depends=( "qt>=4.5" "java-environment>=6" )
23 makedepends=("phonon")
24 conflicts=("qtjambi")
26 build() {
28         # Set the location of your Qt directory here
29         QTDIR=/usr
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
47         done
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
53                 fi
54         done
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
60                 fi
61         done
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
66         done
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
71         done
72