442925423e
Signed-off-by: Gwenhael Le moine <gwenhael.le.moine@gmail.com>
76 lines
2.1 KiB
Bash
Executable file
76 lines
2.1 KiB
Bash
Executable file
#!/bin/sh -x
|
|
|
|
CWD=$(pwd)
|
|
|
|
# default settings
|
|
APP_NAME=sdcv
|
|
ARCH=$(uname -m)
|
|
VERSION=svn$(date +%F | sed 's/-//g')
|
|
BUILD=1cyco
|
|
|
|
TMP=/tmp
|
|
PKG=$TMP/package-$APP_NAME
|
|
|
|
GZBZ2="bz2"
|
|
|
|
DOCS="ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README TODO"
|
|
|
|
rm -rf $PKG $TMP/$APP_NAME-$VERSION
|
|
mkdir -p $PKG
|
|
cd $TMP
|
|
|
|
# CLI version
|
|
if [ -e $CWD/sdcv-$VERSION.tar.$GZBZ2 ] ; then
|
|
tar xvf $CWD/sdcv-$VERSION.tar.$GZBZ2
|
|
else
|
|
svn co https://sdcv.svn.sourceforge.net/svnroot/sdcv/trunk sdcv-$VERSION
|
|
fi
|
|
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-----------------------------------------------------|
|
|
$APP_NAME: $APP_NAME (Dictionaries search tool)
|
|
$APP_NAME:
|
|
$APP_NAME: You can find free (as in Freedom) dictionnaries at www.freedict.org
|
|
$APP_NAME: Vietnamese dictionaries available at http://cctv.sf.net
|
|
$APP_NAME: Others all over the Internet...
|
|
$APP_NAME:
|
|
$APP_NAME: see /usr/doc/$APP_NAME-$VERSION
|
|
$APP_NAME:
|
|
$APP_NAME:
|
|
$APP_NAME: for more informations.
|
|
$APP_NAME:
|
|
EOF
|
|
|
|
chown -R root:root $PKG
|
|
|
|
makepkg -c n -l y $TMP/$APP_NAME-$VERSION-$ARCH-$BUILD.txz || exit $ERROR_MKPKG
|