slackbuilds/UNUSED/xap/xsel/SlackBuild

79 lines
2.2 KiB
Text
Raw Normal View History

#!/bin/sh
2010-10-05 10:45:20 +02:00
CWD=$(pwd)
# default settings
PRGNAM=$(basename $CWD)
ARCH=$(uname -m)
VERSION=svn$(date +%F | sed 's/-//g')
2010-10-06 06:33:45 +02:00
BUILD=1
2010-10-05 10:45:20 +02:00
2020-06-25 11:23:11 +02:00
TAG=gwh
TMP=/tmp/$TAG
2010-10-06 06:33:45 +02:00
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
2010-10-05 10:45:20 +02:00
2011-07-22 08:41:46 +02:00
REPOSITORIES=/home/installs/SlackBuilds/repositories
2010-10-05 10:45:20 +02:00
GZBZ2="bz2"
DOCS="ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README TODO"
rm -rf $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $PKG
cd $TMP
if [ -e $CWD/PRGNAM-$VERSION.tar.$GZBZ2 ] ; then
tar xvf $CWD/PRGNAM-$VERSION.tar.$GZBZ2
else
2010-10-06 06:33:45 +02:00
svn co http://svn.kfish.org/xsel/trunk/ $REPOSITORIES/$PRGNAM
cp -R $REPOSITORIES/$PRGNAM $PRGNAM-$VERSION
2010-10-05 10:45:20 +02:00
fi
cd $PRGNAM-$VERSION
2010-10-06 06:33:45 +02:00
./autogen.sh
LIBS=-lX11 ./configure \
2010-10-05 10:45:20 +02:00
--libdir=/usr/lib$( [ $ARCH = "x86_64" ] && echo 64 ) \
--mandir=/usr/man \
--prefix=/usr
make
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/PRGNAM-$VERSION/
cp $DOCS $PKG/usr/doc/PRGNAM-$VERSION/
cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
mkdir -p install
cat << EOF > install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler-----------------------------------------------------|
$PRGNAM: $PRGNAM (X selection manipulation tool)
$PRGNAM:
$PRGNAM: XSel is a command-line program for getting and setting the contents
$PRGNAM: of the X selection. Normally this is only accessible by manually
$PRGNAM: highlighting information and pasting it with the middle mouse button.
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://www.vergenet.net/~conrad/software/xsel/
$PRGNAM:
EOF
chown -R root:root $PKG
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
2020-07-12 09:22:26 +02:00
/sbin/makepkg -c n -l y $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz