gnome/libxml++: Added.

slackware-14.2
Damien Goutte-Gattat 2008-12-20 21:30:59 +01:00
parent b7e6fb3102
commit 45fb075ab9
3 changed files with 177 additions and 0 deletions

View File

@ -0,0 +1 @@
8c69339e1b472bd5e541e30fdaa47b152bc186bc ./libxml++-2.22.0.tar.bz2

View File

@ -0,0 +1,156 @@
#! /bin/sh
#
# by: H4kTeUr - http://www.slackbuilds.net < h4kteur at slackbuilds dot net >
# Copyright 2007, 2008 H4kTeUr. All rights reserved.
#
# 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
# 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.
#
# Latest libxml++ sourcecode is available at http://libxmlplusplus.sf.net
# Depends: gnome/glibmm
set -e
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=${PKG:-$TMP/package-libxml++}
OUT=${OUT:-$TMP/build}
# version on the tarball
VERSION=${VERSION:-2.22.0}
# version used in the source directory to cd into
DIRVER=${DIRVER:-2.22.0}
# version used for the Slackware package
PKGVER=${PKGVER:-2.22.0}
# target
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
BUILD=${BUILD:-1_SBn}
# set tarball download link
SOURCE=${SOURCE:-http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.22/libxml++-$VERSION.tar.bz2}
ARCHIVE=$(basename $SOURCE)
# sanity checks
if [ "$(id -u)" = "0" ]; then
echo "Do not run this SlackBuild as ROOT !"
exit 1
fi
if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
# download the tarball if it's not found
if [ ! -r $ARCHIVE ]; then
echo "Downloading $ARCHIVE..."
rm -f $ARCHIVE.part
wget -vc $SOURCE -O $ARCHIVE.part
mv $ARCHIVE.part $ARCHIVE
fi
# 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
cd $TMP
rm -rf libxml++-$DIRVER
tar -xvf $CWD/libxml++-$VERSION.tar.bz2
cd libxml++-$DIRVER
# make sure ownerships and permissions are sane
chmod -R a-s,u+rw,go-w+r .
# configure
CFLAGS=$SLKCFLAGS \
CXXFLAGS=$SLKCFLAGS \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-static=no \
--build=$TARGET-slackware-linux
# build and install
make -j3
make DESTDIR=$PKG install
# 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..."
# add a documentation directory
echo "Adding documentation package..."
mkdir -p $PKG/usr/doc/libxml++-$PKGVER
install -p -m 644 \
AUTHORS ChangeLog COPYING INSTALL NEWS README \
$PKG/usr/doc/libxml++-$PKGVER
# adjust docs to traditional Slackware location
mv $PKG/usr/share/doc/libxml++-2.6/docs/* $PKG/usr/doc/libxml++-$VERSION
rm -rf $PKG/usr/share
# 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
cd $PKG
PACKAGING="
chown -R root.root .
find . -perm 664 -exec chmod 644 {} \;
find . -perm 777 -exec chmod 755 {} \;
mkdir -p $OUT
rm -f $OUT/libxml++-$PKGVER-$ARCH-$BUILD.tgz
/sbin/makepkg -l y -c n $OUT/libxml++-$PKGVER-$ARCH-$BUILD.tgz
rm -rf $PKG
rm -rf $TMP/libxml++-$DIRVER
"
if [ "$(which fakeroot 2> /dev/null)" ]; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi
exit 0

20
gnome/libxml++/slack-desc Normal file
View File

@ -0,0 +1,20 @@
# 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------------------------------------------------------|
libxml++: libxml++ (C++ wrapper for the GNOME libxml2 library)
libxml++:
libxml++: This library provides a C++ interface to XML files. It uses
libxml++: libxml 2 to access the XML files, and in order to configure libxml++
libxml++: you must have both libxml and pkg-config installed.
libxml++:
libxml++:
libxml++:
libxml++:
libxml++:
libxml++: