diff options
Diffstat (limited to 'dev/libs')
-rw-r--r-- | dev/libs/eina/Manifest | 2 | ||||
-rw-r--r-- | dev/libs/eina/eina.SlackBuild | 167 |
2 files changed, 169 insertions, 0 deletions
diff --git a/dev/libs/eina/Manifest b/dev/libs/eina/Manifest new file mode 100644 index 00000000..901645be --- /dev/null +++ b/dev/libs/eina/Manifest @@ -0,0 +1,2 @@ +MKBUILD eina.mkbuild 2790 MD5 e6a57e9ae1658e98420c914514151c2f RMD160 7b65f192ceb50726dbe98c15811073336461559c SHA1 f13763f85b24cb6eb2833d7b6f4a4cd27212d0b4 SHA256 012756c208af1dc7dbd7462347b4b06b1afbb66403952566179faec160bb9b38 SHA512 37b66b9268319d4bd2b78d3cccb5f0bb586bf7f87e8ae947f86bef2c6b36187957eb8eec594a937ced08ac3701060802e69d50e6ab6d348338c8e458bd553505 +SLACKBUILD eina.SlackBuild 4919 MD5 729bdb21c451306eb31e596ffc388e9f RMD160 90601af6f0a8783a4e05d4340460481414f20ee7 SHA1 68d062163d3a4dad2b8c5d756db3cc3bf70c8d0e SHA256 799235c23a29006584d9f531e75af096b988eab35d275681d846855e761a8b89 SHA512 0d2d345b3dca5ad95ce9c79c9a5d547cb2928444826ce2db76c7d065dcca55a9bd1be80094ca42ac0b3b3c87fd9309b33ec55482e9ebfbae81fc19df82ff2949 diff --git a/dev/libs/eina/eina.SlackBuild b/dev/libs/eina/eina.SlackBuild new file mode 100644 index 00000000..e58f8783 --- /dev/null +++ b/dev/libs/eina/eina.SlackBuild @@ -0,0 +1,167 @@ +#!/bin/bash +# +# eina.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# eina.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for eina, by Silvio Rhatto +# requires: +# tested: eina-svn_version +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="eina" +PKG_NAME="eina" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=svn_version} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc"} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 +ERROR_MANIFEST=43; + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Get svn source code +cd "$SRC_DIR" +SND_DIR="`basename http://svn.enlightenment.org/svn/e/trunk/eina`" + +if [ "`find "$SRC_DIR/" -name .svn`" != "" ] && [ -d "$SRC_DIR/$SND_DIR" ]; then + cd $SND_DIR + svn update || exit $ERROR_VCS +else + svn checkout http://svn.enlightenment.org/svn/e/trunk/eina $SND_DIR || exit $ERROR_VCS + cd $SND_DIR +fi + +PKG_VERSION="`svn info | awk '/Last Changed Rev:/ { print $4 }'`_svn" + +# Copy svn source +cd "$PKG_WORK" +cp -a $SRC_DIR/* . +PKG_SRC="$PWD/$SND_DIR" +cd "$PKG_SRC" + +# Configure +./autogen.sh || exit $ERROR_CONF +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# 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 +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog NEWS README" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$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---------------------------------------------------------| +eina: eina +eina: +eina: Eina is a multi-platform library that provides optimized +eina: data types and a few tools that could be used for projects. +eina: +eina: +eina: +eina: +eina: +eina: +eina: +EODESC + +# Copy slack-required +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +if [ -f "$CWD/slack-required" ]; then + cp $CWD/slack-required $PKG/install +fi + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi |