gnome/libsigc++: Upgraded to libsigc++-2.2.4.2.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent a19fe7f05d
commit 743c7fd9c4
  1. 1
      gnome/libsigc++/libsigc++-2.2.2.tar.bz2.sha1
  2. 1
      gnome/libsigc++/libsigc++-2.2.4.2.tar.bz2.sha1
  3. 212
      gnome/libsigc++/libsigc++.SlackBuild

@ -1 +0,0 @@
e1d6446222410bf8d707c6d371101a6eb36e9121 ./libsigc++-2.2.2.tar.bz2

@ -0,0 +1 @@
1c8bbe6ff23d551fa198e634bba3b386240110b7 libsigc++-2.2.4.2.tar.bz2

@ -1,155 +1,121 @@
#! /bin/sh
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2009 Damien Goutte-Gattat
#
# by: H4kTeUr - http://www.slackbuilds.net < h4kteur at slackbuilds dot net >
# Copyright 2007, 2008 H4kTeUr. All rights reserved.
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# Redistribution and use of this software, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this software must retain the above copyright
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest libsigc++ sourcecode is available at http://libsigc.sourceforge.net
# Latest libsigc++ sourcecode is available at:
# <http://libsigc.sourceforge.net/>.
# Source package infos
NAMESRC=${NAMESRC:-libsigc++}
VERSION=${VERSION:-2.2.4.2}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.bz2}
WGET=${WGET:-ftp://ftp.gnome.org/pub/gnome/sources/libsigc++/2.2/$ARCHIVE}
# Built package infos
NAMEPKG=${NAMEPKG:-libsigc++}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-i486}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
set -e
CWD=$(pwd)
# Directories
TMP=${TMP:-/tmp}
PKG=${PKG:-$TMP/package-libsigc++}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
# version on the tarball
VERSION=${VERSION:-2.2.2}
# version used in the source directory to cd into
DIRVER=${DIRVER:-2.2.2}
# version used for the Slackware package
PKGVER=${PKGVER:-2.2.2}
# target
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
BUILD=${BUILD:-1_SBn}
# set tarball download link
SOURCE=${SOURCE:-ftp://ftp.gnome.org/pub/gnome/sources/libsigc++/2.2/libsigc++-$VERSION.tar.bz2}
ARCHIVE=$(basename $SOURCE)
set -e # Quit if a command returns non-zero
# sanity checks
if [ "$(id -u)" = "0" ]; then
echo "Do not run this SlackBuild as ROOT !"
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
mkdir -p $TMP
echo "$TMP does not exist or is not a directory!"
exit 1
fi
# download the tarball if it's not found
# Compilation flags
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
;;
esac
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
echo "Downloading $ARCHIVE..."
rm -f $ARCHIVE.part
wget -vc $SOURCE -O $ARCHIVE.part
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# check SHA1 sums
if [ -r $ARCHIVE.sha1 ]; then
sha1sum -c $ARCHIVE.sha1
else
echo "$ARCHIVE.sha1 SHA1 sums not found !"
exit 1
fi
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$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"
fi
# cleanup
rm -rf $PKG
mkdir -p $PKG
# extraction
# Compile
cd $TMP
rm -rf libsigc++-$DIRVER
tar -xvf $CWD/libsigc++-$VERSION.tar.bz2
cd libsigc++-$DIRVER
# make sure ownerships and permissions are sane
chmod -R a-s,u+rw,go-w+r .
# configure
CFLAGS=$SLKCFLAGS \
CXXFLAGS=$SLKCFLAGS \
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-static=no \
--build=$TARGET-slackware-linux
# build and install
make -j3
make DESTDIR=$PKG install
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX
make -j $JOBS
make install-strip DESTDIR=$PKG
# strip binaries
echo "Stripping binaries..."
find $PKG -type f | xargs file | grep "shared object" | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null || \
echo "No shared objects to strip..."
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME
install -m 644 AUTHORS COPYING ChangeLog NEWS README TODO $PKG/usr/doc/$NAME
# add a documentation directory
echo "Adding documentation package..."
mkdir -p $PKG/usr/doc/libsigc++-$PKGVER
install -p -m 644 \
AUTHORS ChangeLog COPYING INSTALL NEWS README TODO \
$PKG/usr/doc/libsigc++-$PKGVER
# Move HTML documentation to the right place
mv $PKG/usr/share/doc/libsigc++-2.0 $PKG/usr/doc/$NAME/docs
rmdir $PKG/usr/share/doc
sed -i "s,base=\"[^\"]\+\",base=\"/usr/doc/$NAME/docs/reference/html\"," \
$PKG/usr/share/devhelp/books/libsigc++-2.0/libsigc++-2.0.devhelp2
# adjust docs to traditional Slackware location
mv $PKG/usr/share/doc/libsigc-2.0/docs $PKG/usr/doc/libsigc++-$VERSION
rm -rf $PKG/usr/share
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
# build the package
mkdir -p $PKG/install
if [ -r $CWD/slack-desc ]; then
install -m 644 $CWD/slack-desc $PKG/install
fi
if [ -r $CWD/doinst.sh ]; then
install -m 755 $CWD/doinst.sh $PKG/install
fi
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown -R root.root .
find . -perm 664 -exec chmod 644 {} \;
find . -perm 777 -exec chmod 755 {} \;
mkdir -p $OUT
rm -f $OUT/libsigc++-$PKGVER-$ARCH-$BUILD.tgz
/sbin/makepkg -l y -c n $OUT/libsigc++-$PKGVER-$ARCH-$BUILD.tgz
rm -rf $PKG
rm -rf $TMP/libsigc++-$DIRVER
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if [ "$(which fakeroot 2> /dev/null)" ]; then
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi
exit 0

Loading…
Cancel
Save