updated on Sun Jan 22 20:01:29 UTC 2012
[aur-mirror.git] / google2srt / PKGBUILD
bloba99a96bc611efd33ffe9dc431ec5067cf5751d73
1 # Mantainer: Kozec (kozec2 <at> kozec <dot> com)
3 pkgname=google2srt
4 pkgver=0.5.3
5 pkgrel=1
6 pkgdesc="Google2SRT allows you to convert subtitles from Google Video and YouTube to SubRip (.srt) format."
7 arch=('i686' 'x86_64')
8 url=(http://sourceforge.net/projects/google2srt/)
9 license=('GPL3')
10 depends=('java-runtime' 'java-jdom')
11 makedepends=('unzip' 'java-environment')
12 source=("http://ignum.dl.sourceforge.net/project/google2srt/Google2SRT/${pkgver}/Google2SRT-${pkgver}.zip" google2srt google2srt.desktop icon.png )
13 md5sums=('d0bc5f8d812ae92de8082f66e2a9f585'
14          'ab480f22865b16c4beef8442e8e08e49'
15          '06c19e48725df1476945d73cb28744ce'
16          '7878c439c81412767874bfbf6c6683ad')
17 noextract=("Google2SRT-${pkgver}.zip")
19 build() {
20         mkdir -p "$pkgdir/usr/doc/google2srt"
21         mkdir -p "$pkgdir/usr/lib/google2srt"
22         mkdir -p "$pkgdir/usr/share/applications"
23         mkdir -p "$pkgdir/usr/share/icons"
24         mkdir -p "$pkgdir/usr/bin"
25         cd "$srcdir"
26         install -m0644 google2srt.desktop "$pkgdir/usr/share/applications" || return 1
27         install -m0644 icon.png "$pkgdir/usr/share/icons/google2srt.png" || return 1
28         unzip -o "Google2SRT-${pkgver}.zip" >/dev/null || return 1
29         install -m0755 google2srt "$pkgdir/usr/bin" || return 1
30         cd "Google2SRT-${pkgver}/src"
31         cp -R ../doc/* "$pkgdir/usr/doc/google2srt" || return 1
32         rm *.class &>/dev/null || true
33         CLASSPATH="$CLASSPATH:/usr/share/java/jdom/jdom.jar" \
34                 javac Common.java Converter.java NetSubtitle.java \
35                           Network.java SRTFilter.java TableModel.java \
36                           XMLFilter.java GUI.java \
37                 || return 1
38         cp Bundle* *.class *.form *.jpg "$pkgdir/usr/lib/google2srt" || return 1