summaryrefslogtreecommitdiff
path: root/development/p4v/p4v.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/p4v/p4v.SlackBuild')
-rw-r--r--development/p4v/p4v.SlackBuild27
1 files changed, 20 insertions, 7 deletions
diff --git a/development/p4v/p4v.SlackBuild b/development/p4v/p4v.SlackBuild
index ac4531dede..56537a508d 100644
--- a/development/p4v/p4v.SlackBuild
+++ b/development/p4v/p4v.SlackBuild
@@ -33,12 +33,12 @@ set -e
LOCALVER=`tar tf p4v.tgz 2> /dev/null | head -1 | cut -d- -f 2 | cut -d/ -f1`
PRGNAM=p4v
VERSION=${VERSION:-$LOCALVER}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -49,8 +49,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -83,6 +83,7 @@ mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
rm bin/qt.conf
cp -a bin $PKG/usr/bin
mv lib/p4v $PKG/usr/lib${LIBDIRSUFFIX}/p4v
+mv lib/icu $PKG/usr/lib${LIBDIRSUFFIX}/p4v/icu
# p4vc needs to be wrapped too
mv $PKG/usr/bin/p4vc $PKG/usr/bin/p4vc.bin
@@ -90,6 +91,9 @@ mv $PKG/usr/bin/p4vc $PKG/usr/bin/p4vc.bin
# Adapt the path for lib/lib64
sed -i "s%prefix/lib/%prefix/lib${LIBDIRSUFFIX}/%g" $PKG/usr/bin/$PRGNAM
+# ICU library path
+sed -i "s%lib${LIBDIRSUFFIX}/icu%lib${LIBDIRSUFFIX}/p4v/icu%g" $PKG/usr/bin/$PRGNAM
+
# Add Qt plugin path through environment variable since we can't use qt.conf
sed -i "s%export P4VRES%export P4VRES QT_PLUGIN_PATH=\$QT5DIR/plugins%g" $PKG/usr/bin/$PRGNAM
@@ -104,9 +108,18 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-mkdir -p $PKG/usr/share/{applications,pixmaps}
-cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
-cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+mkdir -p $PKG/usr/share/applications
+for PRG in $PRGNAM p4admin p4merge; do
+ cat $CWD/$PRG.desktop > $PKG/usr/share/applications/$PRG.desktop
+done
+
+mkdir -p $PKG/usr/share/icons/hicolor/{16x16,32x32,48x48,96x96}/apps
+for PRG in P4-V P4-Admin P4-Merge; do
+ for SIZE in 16x16 32x32 48x48 96x96; do
+ ln -s ../../../../../lib${LIBDIRSUFFIX}/p4v/P4VResources/icons/${PRG}_${SIZE}.png \
+ $PKG/usr/share/icons/hicolor/$SIZE/apps/${PRG}.png
+ done
+done
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc