summaryrefslogtreecommitdiff
path: root/office/ganttproject/ganttproject.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/ganttproject/ganttproject.SlackBuild')
-rw-r--r--office/ganttproject/ganttproject.SlackBuild62
1 files changed, 38 insertions, 24 deletions
diff --git a/office/ganttproject/ganttproject.SlackBuild b/office/ganttproject/ganttproject.SlackBuild
index 1c7c4bc51e..2bddee0c64 100644
--- a/office/ganttproject/ganttproject.SlackBuild
+++ b/office/ganttproject/ganttproject.SlackBuild
@@ -1,20 +1,35 @@
#!/bin/sh
-#
+
# Slackware build script for ganttproject
-# Written by Chris Abela <chris.abela@maltats.com>
-# October 2009
+
+# Copyright 2013 Chris Abela, Malta
+# All rights reserved.
#
-# The CLI and GUI integration parts were inspired by the Mandriva Packages:
-# ganttproject-2.0.9-1mer.noarch.rpm and ganttproject-2.0.9-1mer.src.rpm
-# by Juan Luis Baptiste <jbaptiste@merlinux.org>
-# These RPM's are hosted at http://www.ganttproject.biz
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=ganttproject
-VERSION=${VERSION:-2.0.10}
-ARCH=noarch # Leave this alone
+VERSION=${VERSION:-2.6.1_r1499} # dashes in $VERSION confuse pkgtool
+ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+SRCVERSION=${SRCVERSION:-2.6.1-r1499}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -25,12 +40,12 @@ set -e
rm -rf $PKG
mkdir -p \
$TMP \
- $PKG/{opt/ganttproject,usr/share/{applications,pixmaps,mime/packages}} \
+ $PKG/{opt/ganttproject,usr/{bin,share/{applications,pixmaps,mime/packages}}} \
$OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION-src
-unzip $CWD/$PRGNAM-$VERSION-src.zip
-cd $PRGNAM-$VERSION-src
+rm -rf $PRGNAM-$SRCVERSION-src
+unzip $CWD/$PRGNAM-$SRCVERSION-src.zip
+cd $PRGNAM-$SRCVERSION-src
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -42,15 +57,15 @@ cd ganttproject-builder
ant
cd dist-bin
-cp -a eclipsito.jar ganttproject.sh plugins $PKG/opt/ganttproject
-chmod 755 $PKG/opt/ganttproject/ganttproject.sh
+cp -a eclipsito.jar ganttproject plugins $PKG/opt/ganttproject
+chmod 755 $PKG/opt/ganttproject/ganttproject
# This is for CLI users:
-install -m 755 -D $CWD/ganttproject $PKG/usr/bin/ganttproject
+ln -s /opt/ganttproject/ganttproject $PKG/usr/bin/
# And this is for GUI users:
cp \
- plugins/net.sourceforge.ganttproject_2.0.0/data/resources/logos/icon32.png \
+ plugins/net.sourceforge.ganttproject/data/resources/logos/icon32.png \
$PKG/usr/share/pixmaps/ganttproject.png
cat > $PKG/usr/share/applications/ganttproject.desktop << EOF
@@ -58,8 +73,7 @@ cat > $PKG/usr/share/applications/ganttproject.desktop << EOF
Encoding=UTF-8
Name=GanttProject
Comment="GanttProject is a tool for creating a project schedule by means of Gantt Chart."
-Comment[mt]="GanttProject huwa għodda biex toħloq skeda għall proġett permezz ta Gantt Chart."
-Exec=/opt/ganttproject/ganttproject.sh
+Exec=/opt/ganttproject/ganttproject
Icon=ganttproject.png
Terminal=false
Type=Application
@@ -71,10 +85,10 @@ EOF
cat > $PKG/usr/share/mime/packages/ganttproject.xml << EOF
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
- <mime-type type="application/x-ganttproject">
- <comment>Ganttproject Document</comment>
- <glob pattern="*.gan" />
- </mime-type>
+ <mime-type type="application/x-ganttproject">
+ <comment>Ganttproject Document</comment>
+ <glob pattern="*.gan" />
+ </mime-type>
</mime-info>
EOF
@@ -82,7 +96,7 @@ EOF
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cd ../../ganttproject
cp -a \
- AUTHORS COPYING README \
+ AUTHORS LICENSE README ../ganttproject-builder/HouseBuildingSample.gan \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild