1 # Maintainer: Dan Serban
6 pkgdesc="Open Source Novel Writing Software for Novelists, Authors and Creative Writers"
8 url=http://storybook.intertec.ch/joomla/index.php/download
10 depends=(java-runtime)
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}"