summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 58507157ac53aaf9de0204db0b9577f7bb121733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>

pkgname=omegat
pkgver=3.5.4
pkgrel=1
pkgdesc="Multiplatform CAT tool application, written in Java"
arch=('any')
url="http://www.omegat.org/en/omegat.html"
license=('GPL')
depends=('java-runtime' 'desktop-file-utils')
conflicts=('omegat-beta')
options=('!strip')
source=(http://downloads.sourceforge.net/$pkgname/OmegaT_${pkgver}_Without_JRE.zip
        http://www.omegat.org/resources/icons.zip
        $pkgname.desktop)
sha256sums=('7fc1a4c5a181062604c5ce9ec87a645f6bb995d53d817dcdae0ab8dca1c766ba'
            'e8b14887f513a505def059903348b5a06c0d016450711cf0f235802213a3dbbb'
            'ac480a8244c1a5171b7f2d5892585360067d78e3113ccb45aad6afe7ed69aec5')

package() {
  cd "${srcdir}"
  install -d "${pkgdir}"/usr/share/java/$pkgname \
             "${pkgdir}"/usr/bin

  find . -type f -exec chmod 644 "{}" \;
  mv *.txt "${srcdir}"/docs
  cp -r * "${pkgdir}"/usr/share/java/$pkgname

#.desktop file + icon
  install -Dm644 "${srcdir}"/$pkgname.desktop \
    "${pkgdir}"/usr/share/applications/$pkgname.desktop
  install -Dm644 "${srcdir}"/icons/OmegaT_Icon.png \
    "${pkgdir}"/usr/share/pixmaps/$pkgname.png

#more images
  install -m644 "${pkgdir}"/usr/share/java/$pkgname/icons/*.png \
    "${pkgdir}"/usr/share/java/$pkgname/images/

#executable file
  echo "#!/bin/sh" > "${pkgdir}"/usr/bin/$pkgname
  echo "cd /usr/share/java/$pkgname/" >> "${pkgdir}"/usr/bin/$pkgname
  echo "java -jar -Xmx512M OmegaT.jar \$*" >> "${pkgdir}"/usr/bin/$pkgname
  chmod 755 "${pkgdir}"/usr/bin/$pkgname

#removing obsolete files
  rm -rf "${pkgdir}"/usr/share/java/$pkgname/{*.{zip,desktop,sh,kaptn},OmegaT,OmegaT.bat,icons}
  rm "${pkgdir}"/usr/share/java/$pkgname/native/*.{dll,dylib}

if [[ "$CARCH" == "x86_64" ]]; then
  rm "${pkgdir}"/usr/share/java/$pkgname/native/libhunspell-linux32.so
else
  rm "${pkgdir}"/usr/share/java/$pkgname/native/libhunspell-linux64.so
fi
}