updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / storybook / PKGBUILD
blobc58d72677163eb9dad0172b2a116b1942734a159
1 # Maintainer: Dan Serban
3 pkgname=storybook
4 pkgver=3.x.x.latest
5 pkgrel=1
6 pkgdesc="Open Source Novel Writing Software for Novelists, Authors and Creative Writers"
7 arch=(any)
8 url=http://storybook.intertec.ch/joomla/index.php/download
9 license=(GPL)
10 depends=(java-runtime)
11 makedepends=(lynx)
12 options=('!strip')
14 build()
16   rm storybook.bin 2>/dev/null || true
17   _url=$(lynx -dump http://sourceforge.net/projects/storybook2/files/storybook/ | grep -o http.*files.*/$ | grep -v /files/$ | head -1)
18   _url=$(lynx -dump "${_url}" | grep -o http.*bin/download$)
19   wget -O storybook.bin "${_url}"
20   chmod +x storybook.bin
21   mkdir -p "${pkgdir}"/usr/share/storybook
22   ./storybook.bin --noexec --keep --target "${pkgdir}"/usr/share/storybook
23   mkdir -p "${pkgdir}"/usr/bin
24   USRBINFILE="${pkgdir}"/usr/bin/storybook
25   echo '#!/bin/bash' > "${USRBINFILE}"
26   echo 'cd /usr/share/storybook' >> "${USRBINFILE}"
27   echo 'java -Xmx256m -splash:splash.png -jar lib/storybook.jar' >> "${USRBINFILE}"
28   chmod +x "${USRBINFILE}"
29   mkdir -p "${pkgdir}"/usr/share/applications
30   DESKTOPFILE="${pkgdir}"/usr/share/applications/storybook.desktop
31   echo "[Desktop Entry]" > "${DESKTOPFILE}"
32   echo "Name=Storybook" >> "${DESKTOPFILE}"
33   echo "Comment=Open Source Novel Writing Software for Novelists, Authors and Creative Writers" >> "${DESKTOPFILE}"
34   echo "Exec=storybook" >> "${DESKTOPFILE}"
35   echo "Terminal=false" >> "${DESKTOPFILE}"
36   echo "Type=Application" >> "${DESKTOPFILE}"
37   echo "Icon=/usr/share/storybook/storybook-icon.png" >> "${DESKTOPFILE}"
38   echo "Categories=Office;" >> "${DESKTOPFILE}"