system/tabbed: Updated for version 0.6.
Support applying user patches Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
parent
db5cbf8c39
commit
a23409a7c2
|
@ -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.
|
||||
|
|
|
@ -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.
|
|
@ -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
|
||||
|
|
|
@ -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=""
|
||||
|
|
Loading…
Reference in New Issue