updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / latexdraw / PKGBUILD
blob610c734f4faf1bd28d3c897a13c1d8ea5eb1a311
1 pkgname=latexdraw
2 pkgver=2.0.8
3 pkgrel=1
4 pkgdesc='Create svg graphics and/or pstricks code usable in latex documents.'
5 arch=('any')
6 url="http://latexdraw.sourceforge.net"
7 license=('GPL')
8 makedepends=('java-environment>=6')
9 depends=('java-runtime>=6')
10 optdepends=('texlive-pstricks: use generated code in latex documents')
11 install="${pkgname}.install"
12 source=(http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/LaTeXDraw${pkgver}_src.zip
13         http://downloads.sourceforge.net/project/${pkgname}/releaseNote/release_note${pkgver}.txt
14         ${pkgname}.sh
15         ${pkgname}.desktop
16         ${pkgname}.MANIFEST.MF)
17 md5sums=('7d4c51c34a522e51d25fe60dd994df6e' '76085542ee39f327f80e1fa8965cec2b'\
18          '8f7e3de38675797b824c5a8878e4c694' 'd3c711ba1a872bc6fb5fb1069f7dbf3f'\
19          '323daf0cb6eab9f4c4964967d2e1644d')
21 build() {
22     cd ${srcdir}/LaTeXDraw${pkgver}_src
23     
24     cp -r 'src lib/net' .
25     cp -r 'src lib/org' .
26     
27     # the compilescript is broken so do it manually
28     javac \
29         org/sourceforge/jlibeps/epsgraphics/*.java \
30         net/sourceforge/jiu/codecs/*.java \
31         net/sourceforge/jiu/codecs/jpeg/*.java \
32         net/sourceforge/jiu/codecs/tiff/*.java \
33         net/sourceforge/jiu/color/*.java \
34         net/sourceforge/jiu/color/conversion/*.java \
35         net/sourceforge/jiu/data/*.java \
36         net/sourceforge/jiu/gui/awt/*.java \
37         net/sourceforge/jiu/ops/*.java \
38         net/sourceforge/jiu/util/*.java || return 1
39     javac \
40         latexDraw/figures/*.java \
41         latexDraw/figures/properties/*.java \
42         latexDraw/filters/*.java \
43         latexDraw/lang/*.java \
44         latexDraw/parsers/*.java \
45         latexDraw/parsers/pstricks/*.java \
46         latexDraw/psTricks/*.java \
47         latexDraw/ui/*.java \
48         latexDraw/ui/components/*.java \
49         latexDraw/ui/dialog/*.java \
50         latexDraw/ui/listeners/*.java \
51         latexDraw/util/*.java  || return 1
52         
53     # create the exectuable jar file
54     install -d ${pkgdir}/usr/share/java/${pkgname}
55     
56     jar cvmf ${srcdir}/${pkgname}.MANIFEST.MF \
57       ${pkgdir}/usr/share/java/${pkgname}/LaTeXDraw.jar \
58       latexDraw/ res/ lang/ || return 1
59     
60     cp -r help lib lang templates ${pkgdir}/usr/share/java/${pkgname} || return 1
61     
62     # NB readme stipulates release_note.txt license.txt must be installed
63     # in same folder as executable jarfile
64     install -m644 -t ${pkgdir}/usr/share/java/${pkgname} \
65             release_note.txt license.txt || return 1
66     
67     # install sh wrapper script
68     install -Dm755 ${srcdir}/${pkgname}.sh \
69       ${pkgdir}/usr/bin/${pkgname} || return 1
70     # install menu entry & icons
71     install -Dm644 ${srcdir}/${pkgname}.desktop \
72       ${pkgdir}/usr/share/applications/${pkgname}.desktop || return 1
73     install -Dm644 res/LaTeXDrawIcon.png \
74       ${pkgdir}/usr/share/pixmaps/${pkgname}.png || return 1