mirror of
https://codeberg.org/gwh/slackbuilds.git
synced 2024-11-16 19:51:19 +01:00
82 lines
2.1 KiB
Bash
Executable file
82 lines
2.1 KiB
Bash
Executable file
#!/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
|
|
OUTPUT=/tmp
|
|
|
|
DOCS="ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README TODO"
|
|
|
|
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
|
|
|
|
rm -rf $PKG $TMP/$PRGNAM-$VERSION
|
|
mkdir -p $PKG
|
|
|
|
cd $TMP
|
|
|
|
if [ ! -e $REPOSITORY ] ; then
|
|
svn co https://sdcv.svn.sourceforge.net/svnroot/sdcv/trunk $REPOSITORY
|
|
else
|
|
( cd $REPOSITORY
|
|
svn update
|
|
)
|
|
fi
|
|
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
|
|
|
|
makepkg -c n -l y $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|