diff options
Diffstat (limited to 'desktop/wmcliphist/wmcliphist.SlackBuild')
-rw-r--r-- | desktop/wmcliphist/wmcliphist.SlackBuild | 52 |
1 files changed, 38 insertions, 14 deletions
diff --git a/desktop/wmcliphist/wmcliphist.SlackBuild b/desktop/wmcliphist/wmcliphist.SlackBuild index 5a31f32e21..81b275cbbc 100644 --- a/desktop/wmcliphist/wmcliphist.SlackBuild +++ b/desktop/wmcliphist/wmcliphist.SlackBuild @@ -2,16 +2,29 @@ # Slackware build script for wmcliphist -# Written by Shining <shining@freaknet.org> +# Originally written by Shining <email removed> + +# Modified & now maintained by B. Watson <yalhcru@gmail.com>. Original +# version had no license. Modified version released under the WTFPL. See +# http://www.wtfpl.net/txt/copying/ for details. + +# 20170223 bkw: +# - Take over maintenance, update for v2.1. +# - Fix homepage and download link. +# - i486 => i586. +# - Add debian patches for 2.1-2 (minor compile issues). +# - Fix grammar in README and slack-desc. +# - Install sample config file in doc dir (as per the man page). +# - Fix path to docdir in man page. PRGNAM=wmcliphist -VERSION=${VERSION:-1.0} -BUILD=${BUILD:-2} +VERSION=${VERSION:-2.1} +BUILD=${BUILD:-1} 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 @@ -22,8 +35,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" @@ -44,8 +57,8 @@ cd $TMP rm -rf $PRGNAM-$VERSION mkdir -p $PRGNAM-$VERSION cd $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-latest.tar.gz -cd $PRGNAM +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd dockapps chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -53,14 +66,25 @@ 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 {} \; -make CFLAGS="$SLKCFLAGS \$(INCLUDES)" LDFLAGS="-lX11" -mkdir -p $PKG/usr/bin -install -m 0755 -s $PRGNAM $PKG/usr/bin/$PRGNAM +# Patches are from: https://packages.debian.org/sid/wmcliphist +# Probably not even necessary (they fix compiler warnings), and not +# complete (they don't fix *all* the warnings). +for i in $CWD/*.patch; do + patch -p1 < $i +done + +sed -i "/^CFLAGS/s,-pedantic,$SLKCFLAGS," Makefile + +sed -i "s,/usr/share/doc/$PRGNAM,/usr/doc/$PRGNAM-$VERSION," $PRGNAM.1 + +make PREFIX=/usr MAN1DIR=/usr/man/man1 +strip $PRGNAM +make install PREFIX=/usr MAN1DIR=/usr/man/man1 DESTDIR=$PKG +gzip -9 $PKG/usr/man/man1/$PRGNAM.1 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - AUTHORS COPYING ChangeLog NEWS README \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog NEWS README ${PRGNAM}rc \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |