summaryrefslogtreecommitdiffstats
path: root/desktop/dwm/dwm.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/dwm/dwm.SlackBuild')
-rw-r--r--desktop/dwm/dwm.SlackBuild80
1 files changed, 37 insertions, 43 deletions
diff --git a/desktop/dwm/dwm.SlackBuild b/desktop/dwm/dwm.SlackBuild
index 4d74682d80..6a85242566 100644
--- a/desktop/dwm/dwm.SlackBuild
+++ b/desktop/dwm/dwm.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for dwm
#
-# Now maintained by Dave Woodfall <dave@tty1.uk>
+# Now maintained by Dave Woodfall <dave@slackbuilds.org>
# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
# Erik Falor <ewfalor@gmail.com>
@@ -35,10 +35,13 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=dwm
-VERSION=${VERSION:-6.2}
-BUILD=${BUILD:-6}
+VERSION=${VERSION:-6.4}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -48,7 +51,14 @@ if [ -z "$ARCH" ]; then
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}
@@ -80,17 +90,25 @@ if [ -e "$CWD/config.h" ]; then
cp -v $CWD/config.h config.def.h
fi
-SYSTRAY=${SYSTRAY:-no}
-[ "$SYSTRAY" = "yes" ] && patch -p1 <$CWD/sbo-patches/dwm-systray-20190208-cb3f58a.diff
+[ "${CK:-no}" = "yes" ] && RCEXT=".ck"
+[ "${SYSTRAY:-no}" = "yes" ] && patch -p1 <$CWD/sbo-patches/dwm-systray-6.4.diff
+[ "${MOD4:-no}" = "yes" ] && patch -p1 <$CWD/sbo-patches/use-mod4.diff
+[ "${ROFI:-no}" = "yes" ] && patch -p1 <$CWD/sbo-patches/replace-dmenu-rofi.diff
+[ "${KEYPAD:-no}" = "yes" ] && patch -p1 <$CWD/sbo-patches/enable-keypad.diff
-MOD4=${MOD4:-no}
-[ "$MOD4" = "yes" ] && patch -p1 <$CWD/sbo-patches/use-mod4.patch
+sed "s,monospace:size=10,monospace:size=${FONTSIZE:-10},g" -i config.def.h
-ROFI=${ROFI:-no}
-[ "$ROFI" = "yes" ] && patch -p1 <$CWD/sbo-patches/replace-dmenu-rofi.patch
+### Per community request, this section has been restored
+### for those that wish to include custom patches.
+### A sample patch is included in the patches/ directory
+### that will change the default terminal from 'st'
+### to 'uxterm'. -Ryan
-KEYPAD=${KEYPAD:-no}
-[ "$KEYPAD" = "yes" ] && patch -p0 <$CWD/sbo-patches/enable-keypad.patch
+if [ "${PATCHES:-no}" = "yes" ]; then
+ for p in $CWD/patches/*; do
+ patch --verbose -p1 < $p
+ done
+fi
mv config.def.h config.h
@@ -101,19 +119,6 @@ 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 {} \;
-### Per community request, this section has been restored
-### for those that wish to include custom patches.
-### A sample patch is included in the patches/ directory
-### that will change the default terminal from 'st'
-### to 'uxterm'. -Ryan
-#
-#for i in $(ls $CWD/patches); do
-# patch -p0 < $CWD/patches/$i
-#done
-
-# Reverse commit to continue support for fontconfig 2.11.1
-patch -R -p1 <$CWD/sbo-patches/0001-Prepare-6.2-release.patch
-
## Fix options for our compilers,
## thanks to Brenton Earl.
sed -i \
@@ -136,20 +141,9 @@ make install \
X11LIB=/usr/lib${LIBDIRSUFFIX}/X11 \
DESTDIR=$PKG
-mkdir -p $PKG/etc/X11/xinit
-
-CK=${CK:-no}
-
-if [ "$CK" = "yes" ]; then
- install -v -m 0755 $CWD/xinitrc.dwm.ck $PKG/etc/X11/xinit/xinitrc.dwm
-else
- install -v -m 0755 $CWD/xinitrc.dwm $PKG/etc/X11/xinit/xinitrc.dwm
-fi
-
-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
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
+install -vDm 0755 $CWD/xinitrc.dwm$RCEXT $PKG/etc/X11/xinit/xinitrc.dwm
+strip --strip-unneeded $PKG/usr/bin/$PRGNAM
+gzip -9 $PKG/usr/man/man?/*.?
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENSE README $CWD/README.CONFIG \
@@ -159,10 +153,10 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-if [ "$ROFI" = "yes" ]; then
- install -v -m 0644 -D $CWD/dwm.rasi.new $PKG/usr/share/rofi/themes/dwm.rasi.new
+if [ "${ROFI:-no}" = "yes" ]; then
+ install -vD -m 0644 $CWD/dwm.rasi.new -t $PKG/usr/share/rofi/themes
cat $CWD/doinst.sh > $PKG/install/doinst.sh
fi
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