updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / sun-wtk / PKGBUILD
blob1fc9a03baa9e2786f3c5747036acefaab6719790
1 #       Hi! I'm Xianwen Chen.
2 #       I'm currently maintaining the PKGBUILD file for 'Sun Java Wireless Toolkit for CLDC'.
3 #       Comments are highly welcomed.
4 #       My email is 'xianwen.chen at gmail dot com'.
6 # Contributor: Andreas Schönfelder <passtschu at freenet dot de>
8 pkgname=sun-wtk
9 pkgver="2.5.2_01"
10 pkgrel=1
11 pkgdesc="A Sun's tool kit for developing 'applications that are based on J2ME's Connected Limited Device Configuration (CLDC) and Mobile Information Device Profile (MIDP), and designed to run on cell phones, mainstream personal digital assistants, and other small mobile devices.' (http://www.oracle.com/technetwork/java/index-jsp-137162.html). It includes ktoolbar and was formerly known as J2ME."
12 license=('custom')
13 url='http://www.oracle.com/technetwork/java/index-jsp-137162.html'
14 depends=('libxt' 'bash' 'gcc-libs' 'jdk')
15 [ "$CARCH" = "x86_64" ] && \
16   depends=('bin32-jre' ${depends[@]}) || \
17   depends=('java-environment' 'java-runtime' ${depends[@]})
18 makedepends=('zip' 'unzip')
19 arch=('i686' 'x86_64')
20 provides=('j2me')
21 install=sun-wtk.install
22 source=("http://devio.us/~chen/files/sun-wtk/sun_java_wireless_toolkit-${pkgver}-linuxi486.bin.sh"
23   'sun-wtk.profile'
24   'ktoolbar.desktop'
25   'ktoolbar.png'
26   'LICENSE')
28 md5sums=('6b70b6e6d426eac121db8a087991589f'
29          'ad05a8ccc053a4a1658317ac4df89a32'
30          'ca7f128a0dd314cf28e2c7980b8b5cb8'
31          '7b4b9c9da994f208dbd4c5dcdbd78926'
32          '2297fdc5771ae9d0e8e9fc11d28b4728')
34 build() {
35   install -d "${pkgdir}/etc/profile.d"
36   install -m755 "${srcdir}/sun-wtk.profile" "${pkgdir}/etc/profile.d/sun-wtk.sh"
38   install -d "${pkgdir}/opt/wtk"
39   zip -F -q ${srcdir}/sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh --out ${srcdir}/sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.zip
41   unzip -o -q "${srcdir}/sun_java_wireless_toolkit-${pkgver}-linuxi486.bin.zip" -d "${pkgdir}/opt/wtk"
42   find "${pkgdir}/opt/wtk/" -type d -exec chmod 755 {} \;
43   find "${pkgdir}/opt/wtk/" -type f -exec chmod 644 {} \;
44   find "${pkgdir}/opt/wtk/bin/" -type f -exec chmod 755 {} \;
45   cd "${pkgdir}/opt/wtk/bin"
47   [ "$CARCH" = "x86_64" ] && \
48     sed -i 's/javapathtowtk=//g;s#${javapathtowtk}#/opt/bin32-jre/jre/bin/#g' \
49       emulator || \
50     sed -i 's/javapathtowtk=//g;s#${javapathtowtk}#${JAVA_HOME}/bin/#g' \
51       defaultdevice emulator ktoolbar mekeytool prefs utils wscompile
53   install -D -m644 "${srcdir}/ktoolbar.desktop" "${pkgdir}/usr/share/applications/ktoolbar.desktop"
54   install -D -m644 "${srcdir}/ktoolbar.png" "${pkgdir}/usr/share/pixmaps/ktoolbar.png"
56   cd ${srcdir}
57   install -D LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"