aboutsummaryrefslogtreecommitdiff
path: root/system/tabbed
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2014-08-27 00:12:58 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-08-30 14:22:22 +0700
commita23409a7c22b45397ddf647bb373991e07395f03 (patch)
treed675254c7ab626aae4cb57bf8c903ef1c5ccc644 /system/tabbed
parentdb5cbf8c39d82816e8ba217d67046dd1f0d36866 (diff)
system/tabbed: Updated for version 0.6.
Support applying user patches Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system/tabbed')
-rw-r--r--system/tabbed/README8
-rw-r--r--system/tabbed/README.SBo35
-rw-r--r--system/tabbed/tabbed.SlackBuild34
-rw-r--r--system/tabbed/tabbed.info6
4 files changed, 76 insertions, 7 deletions
diff --git a/system/tabbed/README b/system/tabbed/README
index f93f15cf9d71..c694fdb974d8 100644
--- a/system/tabbed/README
+++ b/system/tabbed/README
@@ -4,8 +4,14 @@ Simple generic tabbed frontend to xembed aware applications, originally
designed for surf but also usable with many other applications, e.g. st,
uzbl, urxvt, and xterm.
+Recommended dependency: dmenu. tabbed is still useful without it, but
+the control-T "new tab" function won't work without it.
+
The default width and height for the tabbed window are hard-coded in
the application, and can be set by setting WIDTH and HEIGHT environment
-variables. Default size is 800x600. Example:
+variables. Default size is 800x600. Example:
WIDTH=1024 HEIGHT=768 ./tabbed.SlackBuild
+
+For other customizations, you can create a diff and place it in patches/.
+See README.SBo for details.
diff --git a/system/tabbed/README.SBo b/system/tabbed/README.SBo
new file mode 100644
index 000000000000..c1e7817e4f6f
--- /dev/null
+++ b/system/tabbed/README.SBo
@@ -0,0 +1,35 @@
+CUSTOMIZATION
+-------------
+Place patches in patches/. Any files in this directory will be
+applied before the build. If you wish to make changes to the default
+keybindings or other settings, produce a patch against config.h.
+config.h is a copy of config.def.h distributed with the source
+tarball.
+
+Place any patches in the patches/ directory before starting the
+SlackBuild script.
+
+Example:
+
+# tar xvf tabbed-0.6.tar.gz
+# cd tabbed-0.6
+# cp config.def.h config.h
+# vi config.h
+[make customizations]
+# diff -u config.def.h config.h > ../patches/config.patch
+# cd ..
+# sh tabbed.SlackBuild
+
+Also, there are various patches available on the suckless.org site that
+have been contributed by tabbed users. These can be downloaded into
+patches/ and will be applied in the same way.
+
+Contributed patches: http://tools.suckless.org/tabbed/patches/
+
+Anything in patches/ must be usable with either the -p0 or -p1 option
+to patch. They'll be applied in lexical order (same order as the ls
+command lists them in), so you might have to do some renaming if one
+patch depends on another.
+
+If all you want to customize is the default window width/height, no need
+for a patch: just set WIDTH and HEIGHT in the script's environment.
diff --git a/system/tabbed/tabbed.SlackBuild b/system/tabbed/tabbed.SlackBuild
index a4d6773ca190..535a1d1e5016 100644
--- a/system/tabbed/tabbed.SlackBuild
+++ b/system/tabbed/tabbed.SlackBuild
@@ -6,8 +6,14 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20140826 bkw:
+# - updated for 0.6
+# - add support for patches/. The old 0.4 build had this, but this one
+# works with simple config patches or the ones from suckless.org
+# - mention dmenu in the README
+
PRGNAM=tabbed
-VERSION=${VERSION:-0.5}
+VERSION=${VERSION:-0.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -52,6 +58,26 @@ find -L . \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+
+# Apply any patches the user might have added. This is more complex
+# than usual because we want to detect whether each patch needs -p0
+# or -p1.
+for i in $( ls $CWD/patches ); do
+ p=""
+ diff=$CWD/patches/$i
+
+ # best way to test a patch is use the patch command
+ patch -stp0 --dry-run < $diff 2>/dev/null 1>&2 && p=0
+ patch -stp1 --dry-run < $diff 2>/dev/null 1>&2 && p=1
+
+ if [ -z "$p" ]; then
+ echo "*** User patch $i won't apply with either -p0 or -p1, giving up" 1>&2
+ exit 1
+ fi
+
+ echo "Applying user patch $i with -p$p option"
+ patch -p$p < $diff
+done
sed -i \
-e 's,share/man,man,' \
@@ -60,8 +86,10 @@ sed -i \
-e "s,-O0,$SLKCFLAGS," \
config.mk
-sed -i -e "s,800,${WIDTH:-800}," $PRGNAM.c
-sed -i -e "s,600,${HEIGHT:-600}," $PRGNAM.c
+sed -i \
+ -e "/ww *= *800/s,800,${WIDTH:-800}," \
+ -e "/wh *= *600/s,600,${HEIGHT:-600}," \
+ $PRGNAM.c
make
strip $PRGNAM
diff --git a/system/tabbed/tabbed.info b/system/tabbed/tabbed.info
index c9c54a3a354a..e07ae4c00f84 100644
--- a/system/tabbed/tabbed.info
+++ b/system/tabbed/tabbed.info
@@ -1,8 +1,8 @@
PRGNAM="tabbed"
-VERSION="0.5"
+VERSION="0.6"
HOMEPAGE="http://tools.suckless.org/tabbed/"
-DOWNLOAD="http://dl.suckless.org/tools/tabbed-0.5.tar.gz"
-MD5SUM="cd9cfd696db745637486ec3b9bbe4b75"
+DOWNLOAD="http://dl.suckless.org/tools/tabbed-0.6.tar.gz"
+MD5SUM="7898992feb9358e0196119750b77b42c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""