summaryrefslogtreecommitdiffstats
path: root/desktop/openbox/openbox.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/openbox/openbox.SlackBuild')
-rw-r--r--desktop/openbox/openbox.SlackBuild53
1 files changed, 30 insertions, 23 deletions
diff --git a/desktop/openbox/openbox.SlackBuild b/desktop/openbox/openbox.SlackBuild
index c71bc05f87..36d3f279e6 100644
--- a/desktop/openbox/openbox.SlackBuild
+++ b/desktop/openbox/openbox.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Openbox
@@ -25,22 +25,33 @@
# Modifications for KDE and GNOME xinitrc scripts and Slackware 12.1
# KDM session fixes by Phillip Warner <pc_warner@yahoo.com>
-# Currently maintained by Robby Workman <rw@rlworkman.net>
+# Patch for converting openbox-xdg-autostart from python2 to python3
+# is prepared by Igor Alexandrov <igor.alexandrov@outlook.com>
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=openbox
VERSION=${VERSION:-3.6.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -59,8 +70,8 @@ GXINIT=${GXINIT:-NO}
DOCS="AUTHORS CHANGELOG COMPLIANCE COPYING README"
-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"
@@ -88,6 +99,9 @@ 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 {} \;
+# Convert openbox-xdg-autostart from python2 to python3
+patch -p1 < $CWD/py2-to-py3.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -98,8 +112,7 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--enable-startup-notification \
--enable-static=no \
- --build=$ARCH-slackware-linux \
- --host=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
@@ -132,18 +145,10 @@ else
fi
# Change name of openbox.desktop KDM session file so it corresponds to openbox-session
-( cd $PKG/usr/share/xsessions
- mv openbox.desktop openbox-session.desktop
- sed -i "s/Name=Openbox/Name=Openbox-Session/" openbox-session.desktop
-)
-
-# Create symlinks to KDM session desktop files so KDM will use them
-mkdir -p $PKG/usr/share/apps/kdm/sessions
-( cd $PKG/usr/share/apps/kdm/sessions
- for i in $PKG/usr/share/xsessions/openbox*.desktop ; do
- ln -s /usr/share/xsessions/$(basename $i) $(basename $i) ;
- done
-)
+mv $PKG/usr/share/xsessions/openbox.desktop \
+ $PKG/usr/share/xsessions/openbox-session.desktop
+sed -i "s,Name=Openbox,Name=Openbox-Session," \
+ $PKG/usr/share/xsessions/openbox-session.desktop
mkdir -p $PKG/usr/doc
mv $PKG/usr/share/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
@@ -154,11 +159,13 @@ for i in $CWD/xinitrc.*openbox* ; do
cat $i > $PKG/usr/doc/$PRGNAM-$VERSION/xinit/$(basename $i) ;
done
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-( cd $PKG/usr/doc ; ln -s $PRGNAM-$VERSION $PRGNAM )
+ln -s $PRGNAM-$VERSION $PKG/usr/doc/$PRGNAM
+
+rm -f $PKG/usr/lib*/*.la
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE