slackbuilds/ap/sdcv/sdcv.SlackBuild

83 lines
2.1 KiB
Text
Raw Normal View History

#!/bin/sh -x
CWD=$(pwd)
# default settings
PRGNAM=sdcv
ARCH=$(uname -m)
VERSION=svn$(date +%Y.%m.%d_%H.%M)
BUILD=1
TAG=cyco
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
2011-09-29 15:38:17 +02:00
OUTPUT=/tmp
DOCS="ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README TODO"
2011-07-22 08:41:46 +02:00
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
2011-07-08 09:03:36 +02:00
rm -rf $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $PKG
2011-07-08 09:03:36 +02:00
cd $TMP
2011-07-08 09:03:36 +02:00
if [ ! -e $REPOSITORY ] ; then
svn co https://sdcv.svn.sourceforge.net/svnroot/sdcv/trunk $REPOSITORY
else
2011-07-08 09:03:36 +02:00
( cd $REPOSITORY
svn update
)
fi
2011-07-08 09:03:36 +02:00
cp -R $REPOSITORY sdcv-$VERSION
cd sdcv-$VERSION
zcat $CWD/sdcv_x86_64.patch.gz | patch -p1
autoreconf
./configure \
--libdir=/usr/lib$( [ $ARCH = "x86_64" ] && echo 64 ) \
--mandir=/usr/man \
--prefix=/usr
make
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/sdcv-$VERSION/
cp $DOCS $PKG/usr/doc/sdcv-$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 {} \;
cd $PKG
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 (Dictionaries search tool)
$PRGNAM:
$PRGNAM: You can find free (as in Freedom) dictionnaries at www.freedict.org
$PRGNAM: Vietnamese dictionaries available at http://cctv.sf.net
$PRGNAM: Others all over the Internet...
$PRGNAM:
$PRGNAM: see /usr/doc/$PRGNAM-$VERSION
$PRGNAM:
$PRGNAM:
$PRGNAM: for more informations.
$PRGNAM:
EOF
chown -R root:root $PKG
2011-09-29 15:38:17 +02:00
makepkg -c n -l y $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz