updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / pgraph / PKGBUILD
blob4cd80ab3895d314684abfafa4a46c24a1788d741
1 # Maintainer: Julien Nicoulaud <julien.nicoulaud@gmail.com>
2 # Source: https://github.com/nicoulaj/archlinux-packages
3 pkgname=pgraph
4 _pkgname=pGraph
5 pkgver=2.3
6 pkgrel=3
7 pkgdesc="Read multiple performance data formats and produce graphs either interactively or in batch mode."
8 arch=(any)
9 url="http://www.ibm.com/developerworks/wikis/display/WikiPtype/pGraph"
10 license=(unknown) # FIXME
11 depends=('java-runtime>=5' 'bash')
12 install=${pkgname}.install
13 changelog=Changelog
14 source=("${_pkgname}.jar::http://www.ibm.com/developerworks/wikis/download/attachments/53871809/${_pkgname}.jar?version=5"
15         "${_pkgname}.properties::http://www.ibm.com/developerworks/wikis/download/attachments/53871809/${_pkgname}.properties?version=1")
16 noextract=(${pkgname}.jar)
17 md5sums=('a22000cb33e76a1652467a414ada1e5c'
18          '6bbb3d137aa3c45ff1c96410dac800da')
20 build() {
21   msg2 "Generate executable script..."
22   cat > "${srcdir}/${pkgname}.sh" << EOF
23 #!/bin/sh
24 cd '/usr/share/java/${pkgname}'
25 "\$JAVA_HOME/bin/java" -jar '${_pkgname}.jar' "\$@"
26 EOF
28   msg2 "Generate desktop application entry..."
29   cat > "${srcdir}/${pkgname}.desktop" << EOF
30 [Desktop Entry]
31 Name=${_pkgname}
32 Comment=${pkgdesc}
33 TryExec=${pkgname}
34 Exec=${pkgname} %u
35 Icon=java
36 Terminal=false
37 Type=Application
38 Categories=Application;Utility;
39 EOF
42 package() {
43   msg2 "Install the contents at /usr/share/java/${pkgname}..."
44   install -Dm755 "${srcdir}/${_pkgname}.jar"        "${pkgdir}/usr/share/java/${pkgname}/${_pkgname}.jar"
45   install -Dm644 "${srcdir}/${_pkgname}.properties" "${pkgdir}/usr/share/java/${pkgname}/${_pkgname}.properties"
47   msg2 "Install the default settings file at /etc/${pkgname}..."
48   install -dm755 "${pkgdir}/etc"
49   ln -s "/usr/share/java/${pkgname}/${_pkgname}.properties" "${pkgdir}/etc/${pkgname}.properties"
51   msg2 "Install an executable at /usr/bin/${pkgname}..."
52   install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
54   msg2 "Install a desktop application entry at /usr/share/applications..."
55   install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
58 # vim:set ts=2 sw=2 et: