diff options
Diffstat (limited to 'misc/wcd/wcd.SlackBuild')
-rw-r--r-- | misc/wcd/wcd.SlackBuild | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/misc/wcd/wcd.SlackBuild b/misc/wcd/wcd.SlackBuild index 5ca81eed94..df3f6041b7 100644 --- a/misc/wcd/wcd.SlackBuild +++ b/misc/wcd/wcd.SlackBuild @@ -1,39 +1,34 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for wcd -# Originally written by: -# Ryan P.C. McQuen <email removed> +# Originally written by Ryan P.C. McQuen <email removed> +# Now maintained by B. Watson <urchlay@slackware.uk> -# Now maintained by B. Watson <yalhcru@gmail.com> +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version, with the following exception: -# the text of the GPL license may be omitted. +# 20231120 bkw: updated for v6.0.5. +# 20230103 bkw: updated for v6.0.5_beta3. again, no code changes, +# only translations. -# This program is distributed in the hope that it will be useful, but -# without any warranty; without even the implied warranty of -# merchantability or fitness for a particular purpose. Compiling, -# interpreting, executing or merely reading the text of the program -# may result in lapses of consciousness and/or very being, up to and -# including the end of all existence and the Universe as we know it. -# See the GNU General Public License for more details. - -# You may have received a copy of the GNU General Public License along -# with this program (most likely, a file named COPYING). If not, see -# <https://www.gnu.org/licenses/>. +# 20210910 bkw: +# - updated for v6.0.4_beta2. there are no code changes in the beta, +# only the documentation and translations have been updated, so +# it's a safe upgrade that won't break anything. +# - relicense as WTFPL with permission from original author. # 20191201 bkw: updated for v6.0.3. # 20180612 bkw: updated for v6.0.2. # 20171219 bkw: updated for v6.0.1. also, add /etc/profile.d scripts # so wcd actually *works*. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=wcd -VERSION=${VERSION:-6.0.3} +VERSION=${VERSION:-6.0.5} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -43,19 +38,28 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +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} set -e +TARVER=${VERSION/_/-} + +DOCDIR=/usr/doc/$PRGNAM-$VERSION +PKGDOC=$PKG/$DOCDIR + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-$TARVER +tar xvf $CWD/$PRGNAM-$TARVER.tar.gz +cd $PRGNAM-$TARVER chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ @@ -76,37 +80,33 @@ fi cd src -RPM_OPT_FLAGS="$SLKCFLAGS" \ - make all +make RPM_OPT_FLAGS="$SLKCFLAGS" EXT="" + make \ - prefix=$PKG/usr \ - docdir=$PKG/usr/doc/$PRGNAM-$VERSION \ - mandir=$PKG/usr/man \ + INSTALL_PROGRAM="install -m 0755 -s" \ + DESTDIR=$PKG \ + EXT="" \ + prefix=/usr \ + docdir=$DOCDIR \ + mandir=/usr/man \ install -# remove .exe so command is executable -mv $PKG/usr/bin/wcd.exe $PKG/usr/bin/wcd - # Put _all_ man pages under usr/man mv $PKG/usr/share/man/* $PKG/usr/man rmdir $PKG/usr/share/man -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 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +gzip -9 $PKG/usr/man/{*,}/man1/*.1 # profile.d scripts, installed executable (like mc does). mkdir -p $PKG/etc/profile.d/ install -m0755 -oroot -groot \ $CWD/$PRGNAM.sh $CWD/$PRGNAM.csh $PKG/etc/profile.d/ -cp -a ../doc/INSTALL.txt $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild +rm -f $PKGDOC/{INSTALL,UNIX}.txt # remove compile instructions (useless) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc 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 |