merge
Signed-off-by: Gwenhael Le moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
parent
dbc1c20201
commit
442925423e
3 changed files with 54 additions and 77 deletions
|
@ -1,79 +1,55 @@
|
|||
#!/bin/sh
|
||||
set -x
|
||||
# Slackware build script for acpi
|
||||
|
||||
# Written by Grigorios Bouzakis (grbzks@gmail.com)
|
||||
|
||||
PRGNAM=sdcv
|
||||
VERSION=${VERSION:-svn$(date +%F | tr -d '-' )}
|
||||
ARCH=${ARCH:-x86_64}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-cyco}
|
||||
#!/bin/sh -x
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/cyco}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
fi
|
||||
# default settings
|
||||
APP_NAME=sdcv
|
||||
ARCH=$(uname -m)
|
||||
VERSION=svn$(date +%F | sed 's/-//g')
|
||||
BUILD=1cyco
|
||||
|
||||
set -e
|
||||
TMP=/tmp
|
||||
PKG=$TMP/package-$APP_NAME
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
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
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
#tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
|
||||
svn co https://sdcv.svn.sourceforge.net/svnroot/sdcv/trunk $PRGNAM-$VERSION
|
||||
cd $PRGNAM-$VERSION
|
||||
|
||||
chown -R root:root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
# 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
|
||||
|
||||
[ ! -e ./configure ] && autoreconf
|
||||
zcat $CWD/sdcv_x86_64.patch.gz | patch -p1
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
autoreconf
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--libdir=/usr/lib$( [ $ARCH = "x86_64" ] && echo 64 ) \
|
||||
--mandir=/usr/man \
|
||||
--libdir=/usr/lib64 \
|
||||
--build=$ARCH-slackware-linux
|
||||
--prefix=/usr
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
( cd $PKG
|
||||
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
|
||||
xargs strip --strip-unneeded 2> /dev/null || true
|
||||
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
|
||||
xargs strip --strip-unneeded 2> /dev/null
|
||||
)
|
||||
mkdir -p $PKG/usr/doc/sdcv-$VERSION/
|
||||
cp $DOCS $PKG/usr/doc/sdcv-$VERSION/
|
||||
|
||||
( cd $PKG/usr/man
|
||||
find . -type f -exec gzip -9 {} \;
|
||||
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
||||
)
|
||||
cd $PKG
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a \
|
||||
AUTHORS COPYING ChangeLog INSTALL NEWS README \
|
||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
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 $PKG/install
|
||||
cat <<EOF > $PKG/install/slack-desc
|
||||
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 '|'
|
||||
|
@ -81,19 +57,20 @@ cat <<EOF > $PKG/install/slack-desc
|
|||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
sdcv: sdcv (an CLI stardict client for linux)
|
||||
sdcv:
|
||||
sdcv:
|
||||
sdcv:
|
||||
sdcv:
|
||||
sdcv:
|
||||
sdcv:
|
||||
sdcv:
|
||||
sdcv:
|
||||
sdcv:
|
||||
sdcv:
|
||||
|-----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
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
||||
chown -R root:root $PKG
|
||||
|
||||
makepkg -c n -l y $TMP/$APP_NAME-$VERSION-$ARCH-$BUILD.txz || exit $ERROR_MKPKG
|
||||
|
|
|
@ -13,7 +13,7 @@ EXT=tar.gz
|
|||
|
||||
DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README TODO"
|
||||
|
||||
ARCH=x86_64
|
||||
ARCH=$(uname -m)
|
||||
BUILD=1cyco
|
||||
|
||||
PREFIX=/usr
|
||||
|
@ -36,7 +36,7 @@ CPPFLAGS=$SLCKFLAGS \
|
|||
./configure \
|
||||
--prefix=$PREFIX \
|
||||
--mandir=$PREFIX/man \
|
||||
--libdir=$PREFIX/lib64
|
||||
--libdir=$PREFIX/lib$( [ $ARCH = "x86_64" ] && echo 64 )
|
||||
|
||||
# compilation
|
||||
make -j3 PREFIX=$PREFIX
|
||||
|
|
|
@ -13,7 +13,7 @@ EXT=tar.gz
|
|||
|
||||
DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README TODO"
|
||||
|
||||
ARCH=x86_64
|
||||
ARCH=$(uname -m)
|
||||
BUILD=1cyco
|
||||
|
||||
PREFIX=/usr
|
||||
|
@ -36,7 +36,7 @@ CPPFLAGS=$SLCKFLAGS \
|
|||
./configure \
|
||||
--prefix=$PREFIX \
|
||||
--mandir=$PREFIX/man \
|
||||
--libdir=$PREFIX/lib64
|
||||
--libdir=$PREFIX/lib$( [ $ARCH = "x86_64" ] && echo 64 )
|
||||
|
||||
# compilation
|
||||
make -j3 PREFIX=$PREFIX
|
||||
|
|
Loading…
Reference in a new issue