updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / karun-git / PKGBUILD
blob97a0821a0760c7cea58fcf77441246fafeaadbd8
1 # Maintainer: Julien Nicoulaud <julien.nicoulaud@gmail.com>
2 # Source: https://github.com/nicoulaj/archlinux-packages
3 pkgname=karun-git
4 _pkgname=karun
5 pkgver=20111115
6 pkgrel=1
7 pkgdesc="A Java graphical Pacman frontend."
8 arch=(any)
9 url="https://github.com/bahmanm/Karun"
10 license=('GPL2')
11 depends=('bash' 'java-runtime' 'java-commons-io' 'java-commons-lang' 'java-commons-compress' 'desktop-file-utils')
12 makedepends=('git' 'apache-ant')
13 install=${_pkgname}.install
14 changelog=Changelog
15 provides=(${_pkgname})
16 conflicts=(${_pkgname})
18 _gitroot=git://github.com/bahmanm/Karun.git
19 _gitname=Karun
21 build() {
23   msg2 "Connecting to GIT server...."
24   if [ -d "${srcdir}/${_gitname}" ] ; then
25     ( cd "${srcdir}/${_gitname}" && git pull origin )
26     msg2 "The local files are updated."
27   else
28     git clone $_gitroot "${srcdir}/${_gitname}"
29   fi
31   msg2 "Building..."
32   cd "${srcdir}/${_gitname}"
33   ant
34   
35   msg2 "Generate desktop application entry..."
36   cat > "${srcdir}"/${_pkgname}.desktop << EOF
37 [Desktop Entry]
38 Name=${_gitname}
39 Version=${pkgver}
40 Comment=${pkgdesc}
41 Exec=/usr/bin/${_pkgname}
42 Terminal=false
43 Icon=applications-system
44 Type=Application
45 Categories=Settings;
46 EOF
48   msg2 "Generate launcher script..."
49   cat <<EOF > "${srcdir}"/${_pkgname}.sh
50 #!/bin/sh
51 "\$JAVA_HOME/bin/java" \
52   -cp /usr/share/java/commons-io/commons-io.jar:/usr/share/java/commons-lang/commons-lang.jar:/usr/share/java/commons-compress/commons-compress.jar:/usr/share/java/${_pkgname}/${_pkgname}.jar \
53   com.bahmanm.karun.Karun \
54   "\$@"
55 EOF
59 package() {
61   msg2 "Install library at /usr/share/java/${_pkgname}..."
62   install -Dm644 "${srcdir}"/${_gitname}/dist/${_gitname}.jar "${pkgdir}"/usr/share/java/${_pkgname}/${_pkgname}.jar
64   msg2 "Install desktop application entry..."
65   install -Dm644 "${srcdir}"/${_pkgname}.desktop "${pkgdir}"/usr/share/applications/${_pkgname}.desktop
67   msg2 "Install an executable at /usr/bin/${pkgname}..."
68   install -Dm755 "${srcdir}"/${_pkgname}.sh "${pkgdir}"/usr/bin/${_pkgname}
72 # vim:set ts=2 sw=2 et: