9c9d25136d
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
93 lines
1.9 KiB
Bash
Executable file
93 lines
1.9 KiB
Bash
Executable file
#!/bin/sh -x
|
|
|
|
# variables
|
|
TAG=cyco
|
|
OUTPUT=/tmp
|
|
TMP=/tmp/$TAG
|
|
CWD=$(pwd)
|
|
|
|
PRGNAM=$(basename $CWD)
|
|
PKG=$TMP/pkg-$PRGNAM
|
|
|
|
VERSION=2.22.0
|
|
|
|
EXT=tar.bz2
|
|
|
|
DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README TODO"
|
|
|
|
ARCH=x86_64
|
|
BUILD=1
|
|
|
|
|
|
PREFIX=/usr
|
|
|
|
SLCKFLAGS="-fPIC -O2"
|
|
|
|
# nettoyage préalable
|
|
rm -fr $PKG $TMP/$PRGNAM-$VERSION
|
|
|
|
mkdir -p $PKG
|
|
|
|
# mise en place
|
|
cd $TMP
|
|
tar xf $CWD/$PRGNAM-$VERSION.$EXT
|
|
cd $PRGNAM-$VERSION
|
|
|
|
# configuration
|
|
CFLAGS=$SLCKFLAGS \
|
|
CPPFLAGS=$SLCKFLAGS \
|
|
./configure \
|
|
--prefix=$PREFIX \
|
|
--mandir=$PREFIX/man \
|
|
--libdir=$PREFIX/lib64
|
|
|
|
# compilation
|
|
make -j3 PREFIX=$PREFIX
|
|
|
|
# installation
|
|
make install DESTDIR=$PKG
|
|
|
|
# correction
|
|
cd $PKG
|
|
chown -R root:root *
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
cd $TMP/$PRGNAM-$VERSION
|
|
cp -R $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
|
|
|
|
# Strip binaries
|
|
( 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
|
|
)
|
|
|
|
|
|
# embaumement
|
|
mkdir -p $PKG/install
|
|
cat <<EOF > $PKG/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------------------------------------------------------|
|
|
gdk-pixbuf: gdk-pixbuf (gdk-pixbuf library)
|
|
gdk-pixbuf:
|
|
gdk-pixbuf:
|
|
gdk-pixbuf:
|
|
gdk-pixbuf:
|
|
gdk-pixbuf:
|
|
gdk-pixbuf:
|
|
gdk-pixbuf:
|
|
gdk-pixbuf:
|
|
gdk-pixbuf:
|
|
gdk-pixbuf:
|
|
EOF
|
|
|
|
# empaquetage
|
|
cd $PKG
|
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz
|