aboutsummaryrefslogtreecommitdiff
path: root/office/chmsee/chmsee.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/chmsee/chmsee.SlackBuild')
-rw-r--r--office/chmsee/chmsee.SlackBuild56
1 files changed, 29 insertions, 27 deletions
diff --git a/office/chmsee/chmsee.SlackBuild b/office/chmsee/chmsee.SlackBuild
index f319d3a4e5ce..72d640bf861b 100644
--- a/office/chmsee/chmsee.SlackBuild
+++ b/office/chmsee/chmsee.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for chmsee
-# Copyright 2011 Binh Nguyen <binhvng@gmail.com>
+# Copyright 2011-2012 Binh Nguyen <binhvng@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=chmsee
-VERSION=${VERSION:-1.3.1.1}
+VERSION=${VERSION:-1.99.14}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -40,27 +40,13 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -eu
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
@@ -69,23 +55,39 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-mkdir build
-cd build
- cmake \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_VERBOSE_MAKEFILE:BOOL="on" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release ..
+cd src/
+ cp Makefile.arch Makefile
+ sed -i 's/python2/python/' Makefile
make
- make install DESTDIR=$PKG
cd -
+mkdir -p $PKG/usr/share/{chmsee,applications,pixmaps}
+cp -a * $PKG/usr/share/chmsee
+rm -rf $PKG/usr/share/chmsee/src
+mv $PKG/usr/share/chmsee/data/chmsee.desktop.in \
+ $PKG/usr/share/applications/chmsee.desktop
+sed -i 's/_//g' $PKG/usr/share/applications/chmsee.desktop
+mv $PKG/usr/share/chmsee/data/chmsee-icon.png \
+ $PKG/usr/share/pixmaps/
+
+# Create a launcher
+mkdir -p $PKG/usr/bin
+cat <<EOF >$PKG/usr/bin/chmsee
+#!/bin/sh
+
+xulrunner /usr/share/chmsee/application.ini "\$@"
+
+EOF
+chmod 755 $PKG/usr/bin/chmsee
find $PKG | xargs 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/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
+( cd $PKG/usr/doc/$PRGNAM-$VERSION
+for i in AUTHORS COPYING ChangeLog HACKING NEWS README.md; do
+ ln -s ../../share/chmsee/$i .
+done
+)
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install