summaryrefslogtreecommitdiff
path: root/development/lighttable/lighttable.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/lighttable/lighttable.SlackBuild')
-rw-r--r--development/lighttable/lighttable.SlackBuild56
1 files changed, 29 insertions, 27 deletions
diff --git a/development/lighttable/lighttable.SlackBuild b/development/lighttable/lighttable.SlackBuild
index 121b1148ed..71cc59d256 100644
--- a/development/lighttable/lighttable.SlackBuild
+++ b/development/lighttable/lighttable.SlackBuild
@@ -1,5 +1,4 @@
#!/bin/sh
-
# Slackware build script for Light Table
# Ryan P.C. McQuen | Everett, WA | ryan.q@linux.com
@@ -20,12 +19,12 @@
# You may have received a copy of the GNU General Public License along
# with this program (most likely, a file named COPYING). If not, see
-# <http://www.gnu.org/licenses/>.
+# <https://www.gnu.org/licenses/>.
PRGNAM=lighttable
SRCNAM=LightTable
-VERSION=${VERSION:-0.7.2}
+VERSION=${VERSION:-0.8.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -42,27 +41,14 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-TARBALL_x86=$SRCNAM"Linux.tar.gz"
-TARBALL_x86_64=$SRCNAM"Linux64.tar.gz"
-TARBALL_ROOT=$SRCNAM
-
-# Set LIBDIRSUFFIX and TARBALL.
-if [ "$ARCH" = "x86_64" ]; then
- LIBDIRSUFFIX="64"
- TARBALL="$TARBALL_x86_64"
-else
- LIBDIRSUFFIX=""
- TARBALL="$TARBALL_x86"
-fi
-
-set -eu
+set -e
rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
+mkdir -pv $TMP $PKG $OUTPUT
cd $TMP
-rm -rf "$TARBALL_ROOT"
-tar -xvf "$CWD/$TARBALL"
-cd "$TARBALL_ROOT"
+rm -rf ${SRCNAM}-${VERSION}
+tar xvf $CWD/${VERSION}.tar.gz || tar xvf $CWD/${SRCNAM}-${VERSION}.tar.gz
+cd ${SRCNAM}-${VERSION}
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -70,17 +56,33 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-mkdir -p $PKG/opt/$SRCNAM
-cp -a * $PKG/opt/$SRCNAM
+## as aburd as this is, we have to run the build script twice,
+## because it always fails the first time,
+## also LEIN_ROOT is important to set, or the script just
+## hangs forever
+LEIN_ROOT=true \
+ script/build.sh --release \
+|| LEIN_ROOT=true \
+ script/build.sh --release
+
+mkdir -pv $PKG/opt/${PRGNAM}-${VERSION}-linux/
+mv builds/${PRGNAM}-${VERSION}-linux/ $PKG/opt/
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/bin
-ln -sf /opt/$SRCNAM/$SRCNAM $PKG/usr/bin
-
-mkdir -p $PKG/usr/share/pixmaps
-ln -sf /opt/$SRCNAM/core/img/lticon.png $PKG/usr/share/pixmaps/LightTable.png
+ln -sfv /opt/${PRGNAM}-${VERSION}-linux/$SRCNAM $PKG/usr/bin
+
+## icon files
+(
+ cd deploy/core/img/
+ for IMG in *.png
+ do
+ DIR_NAME=${IMG%.*}x${IMG%.*}
+ install -D $IMG $PKG/usr/share/icons/hicolor/$DIR_NAME/apps/$PRGNAM.png
+ done
+)
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop