updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / omegat-beta / PKGBUILD
blobad1345f2e95017b6577824a2e286622a15757414
1 # Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
3 pkgname=omegat-beta
4 _pkgname=omegat
5 pkgver=2.5.0
6 pkgrel=1
7 pkgdesc="Beta version of a multiplatform CAT tool application, written in Java"
8 arch=('i686' 'x86_64')
9 url="http://www.omegat.org/en/omegat.html"
10 license=('GPL')
11 depends=('java-runtime' 'desktop-file-utils')
12 conflicts=('omegat')
13 install=${_pkgname}.install
14 options=('!strip')
15 source=(http://downloads.sourceforge.net/${_pkgname}/OmegaT_${pkgver}_Beta_Without_JRE.zip \
16         http://www.omegat.org/resources/icons.zip \
17         ${_pkgname}.desktop)
18 sha256sums=('efde800e190f11408f36b883bc391561dc4970929efa8ff0f9b05eeeacc1aa6f'
19             'e8b14887f513a505def059903348b5a06c0d016450711cf0f235802213a3dbbb'
20             '595de7433e91788e15fa7714e6a65188ccf56eeac824b4a48d50a6752b989700')
22 package() {
23   cd ${srcdir}
24   install -d ${pkgdir}/usr/share/java/${_pkgname} \
25              ${pkgdir}/usr/bin
27   find . -type f -exec chmod 644 "{}" \;
28   mv *.txt ${srcdir}/docs
29   cp -r * ${pkgdir}/usr/share/java/${_pkgname}
30   chmod 755 ${pkgdir}/usr/share/java/${_pkgname}/OmegaT
32 #.desktop file + icon
33   install -D -m644 ${srcdir}/${_pkgname}.desktop \
34     ${pkgdir}/usr/share/applications/${_pkgname}.desktop
35   install -D -m644 ${srcdir}/icons/OmegaT_Icon.png \
36     ${pkgdir}/usr/share/pixmaps/${_pkgname}.png
38 #more images
39   install -m644 ${pkgdir}/usr/share/java/${_pkgname}/icons/*.png \
40     ${pkgdir}/usr/share/java/${_pkgname}/images/
42 #removing obsolete files
43   rm -rf ${pkgdir}/usr/share/java/${_pkgname}/{*.{zip,desktop},OmegaT,OmegaT.bat,icons}
45 #making executable file
46   echo "#!/bin/sh" > ${pkgdir}/usr/bin/${_pkgname}
47   echo "cd /usr/share/java/${_pkgname}/" >> ${pkgdir}/usr/bin/${_pkgname}
48   echo "java -jar OmegaT.jar \$*" >> ${pkgdir}/usr/bin/${_pkgname}
49   chmod 755 ${pkgdir}/usr/bin/${_pkgname}