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
|
#!/bin/sh -x
|
||||||
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}
|
|
||||||
|
|
||||||
CWD=$(pwd)
|
CWD=$(pwd)
|
||||||
TMP=${TMP:-/tmp/cyco}
|
|
||||||
PKG=$TMP/package-$PRGNAM
|
|
||||||
OUTPUT=${OUTPUT:-/tmp}
|
|
||||||
|
|
||||||
if [ "$ARCH" = "i486" ]; then
|
# default settings
|
||||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
APP_NAME=sdcv
|
||||||
elif [ "$ARCH" = "i686" ]; then
|
ARCH=$(uname -m)
|
||||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
VERSION=svn$(date +%F | sed 's/-//g')
|
||||||
elif [ "$ARCH" = "x86_64" ]; then
|
BUILD=1cyco
|
||||||
SLKCFLAGS="-O2 -fPIC"
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -e
|
TMP=/tmp
|
||||||
|
PKG=$TMP/package-$APP_NAME
|
||||||
|
|
||||||
rm -rf $PKG
|
GZBZ2="bz2"
|
||||||
mkdir -p $TMP $PKG $OUTPUT
|
|
||||||
|
DOCS="ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README TODO"
|
||||||
|
|
||||||
|
rm -rf $PKG $TMP/$APP_NAME-$VERSION
|
||||||
|
mkdir -p $PKG
|
||||||
cd $TMP
|
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 .
|
# CLI version
|
||||||
find . \
|
if [ -e $CWD/sdcv-$VERSION.tar.$GZBZ2 ] ; then
|
||||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
tar xvf $CWD/sdcv-$VERSION.tar.$GZBZ2
|
||||||
-exec chmod 755 {} \; -o \
|
else
|
||||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
svn co https://sdcv.svn.sourceforge.net/svnroot/sdcv/trunk sdcv-$VERSION
|
||||||
-exec chmod 644 {} \;
|
fi
|
||||||
|
cd sdcv-$VERSION
|
||||||
|
|
||||||
[ ! -e ./configure ] && autoreconf
|
zcat $CWD/sdcv_x86_64.patch.gz | patch -p1
|
||||||
|
|
||||||
CFLAGS="$SLKCFLAGS" \
|
autoreconf
|
||||||
CXXFLAGS="$SLKCFLAGS" \
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--libdir=/usr/lib$( [ $ARCH = "x86_64" ] && echo 64 ) \
|
||||||
--sysconfdir=/etc \
|
--mandir=/usr/man \
|
||||||
--localstatedir=/var \
|
--prefix=/usr
|
||||||
--mandir=/usr/man \
|
|
||||||
--libdir=/usr/lib64 \
|
|
||||||
--build=$ARCH-slackware-linux
|
|
||||||
|
|
||||||
make
|
make
|
||||||
make install DESTDIR=$PKG
|
make install DESTDIR=$PKG
|
||||||
|
|
||||||
( cd $PKG
|
mkdir -p $PKG/usr/doc/sdcv-$VERSION/
|
||||||
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
|
cp $DOCS $PKG/usr/doc/sdcv-$VERSION/
|
||||||
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
|
|
||||||
)
|
|
||||||
|
|
||||||
( cd $PKG/usr/man
|
cd $PKG
|
||||||
find . -type f -exec gzip -9 {} \;
|
|
||||||
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
|
||||||
)
|
|
||||||
|
|
||||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||||
cp -a \
|
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||||
AUTHORS COPYING ChangeLog INSTALL NEWS README \
|
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
|
||||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
|
||||||
|
|
||||||
mkdir -p $PKG/install
|
cd $PKG
|
||||||
cat <<EOF > $PKG/install/slack-desc
|
mkdir -p install
|
||||||
|
cat << EOF > install/slack-desc
|
||||||
# HOW TO EDIT THIS FILE:
|
# HOW TO EDIT THIS FILE:
|
||||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
# 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 '|'
|
# 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
|
# make exactly 11 lines for the formatting to be correct. It's also
|
||||||
# customary to leave one space after the ':'.
|
# customary to leave one space after the ':'.
|
||||||
|
|
||||||
|-----handy-ruler------------------------------------------------------|
|
|-----handy-ruler-----------------------------------------------------|
|
||||||
sdcv: sdcv (an CLI stardict client for linux)
|
$APP_NAME: $APP_NAME (Dictionaries search tool)
|
||||||
sdcv:
|
$APP_NAME:
|
||||||
sdcv:
|
$APP_NAME: You can find free (as in Freedom) dictionnaries at www.freedict.org
|
||||||
sdcv:
|
$APP_NAME: Vietnamese dictionaries available at http://cctv.sf.net
|
||||||
sdcv:
|
$APP_NAME: Others all over the Internet...
|
||||||
sdcv:
|
$APP_NAME:
|
||||||
sdcv:
|
$APP_NAME: see /usr/doc/$APP_NAME-$VERSION
|
||||||
sdcv:
|
$APP_NAME:
|
||||||
sdcv:
|
$APP_NAME:
|
||||||
sdcv:
|
$APP_NAME: for more informations.
|
||||||
sdcv:
|
$APP_NAME:
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cd $PKG
|
chown -R root:root $PKG
|
||||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
|
||||||
|
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"
|
DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README TODO"
|
||||||
|
|
||||||
ARCH=x86_64
|
ARCH=$(uname -m)
|
||||||
BUILD=1cyco
|
BUILD=1cyco
|
||||||
|
|
||||||
PREFIX=/usr
|
PREFIX=/usr
|
||||||
|
@ -36,7 +36,7 @@ CPPFLAGS=$SLCKFLAGS \
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=$PREFIX \
|
--prefix=$PREFIX \
|
||||||
--mandir=$PREFIX/man \
|
--mandir=$PREFIX/man \
|
||||||
--libdir=$PREFIX/lib64
|
--libdir=$PREFIX/lib$( [ $ARCH = "x86_64" ] && echo 64 )
|
||||||
|
|
||||||
# compilation
|
# compilation
|
||||||
make -j3 PREFIX=$PREFIX
|
make -j3 PREFIX=$PREFIX
|
||||||
|
|
|
@ -13,7 +13,7 @@ EXT=tar.gz
|
||||||
|
|
||||||
DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README TODO"
|
DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README TODO"
|
||||||
|
|
||||||
ARCH=x86_64
|
ARCH=$(uname -m)
|
||||||
BUILD=1cyco
|
BUILD=1cyco
|
||||||
|
|
||||||
PREFIX=/usr
|
PREFIX=/usr
|
||||||
|
@ -36,7 +36,7 @@ CPPFLAGS=$SLCKFLAGS \
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=$PREFIX \
|
--prefix=$PREFIX \
|
||||||
--mandir=$PREFIX/man \
|
--mandir=$PREFIX/man \
|
||||||
--libdir=$PREFIX/lib64
|
--libdir=$PREFIX/lib$( [ $ARCH = "x86_64" ] && echo 64 )
|
||||||
|
|
||||||
# compilation
|
# compilation
|
||||||
make -j3 PREFIX=$PREFIX
|
make -j3 PREFIX=$PREFIX
|
||||||
|
|
Loading…
Reference in a new issue