From fd023843e552693495120c057547e689e642bc5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Hern=C3=A1ndez=20Blas?= Date: Thu, 13 May 2010 00:30:58 +0200 Subject: [PATCH] libraries/libixp: Updated for version 0.4 --- libraries/libixp/README | 3 -- libraries/libixp/libixp-0.4-libdir.diff | 18 +++++++++ libraries/libixp/libixp.SlackBuild | 49 ++++++++++++++----------- libraries/libixp/libixp.info | 4 +- libraries/libixp/slack-desc | 8 ++-- 5 files changed, 52 insertions(+), 30 deletions(-) create mode 100644 libraries/libixp/libixp-0.4-libdir.diff diff --git a/libraries/libixp/README b/libraries/libixp/README index 6b40d1a101..0286f96ef7 100644 --- a/libraries/libixp/README +++ b/libraries/libixp/README @@ -1,6 +1,3 @@ -libixp - A standalone client/server 9P library - libixp is a stand-alone client/server 9P library including ixpc client which behaves like wmiir in the past. It consists of less than 2000 lines of code (including ixpc). - diff --git a/libraries/libixp/libixp-0.4-libdir.diff b/libraries/libixp/libixp-0.4-libdir.diff new file mode 100644 index 0000000000..3e8c73b073 --- /dev/null +++ b/libraries/libixp/libixp-0.4-libdir.diff @@ -0,0 +1,18 @@ +diff -Nur libixp-0.4.orig/mk/lib.mk libixp-0.4/mk/lib.mk +--- libixp-0.4.orig/mk/lib.mk 2007-11-05 08:36:22.000000000 -0600 ++++ libixp-0.4/mk/lib.mk 2009-08-03 00:20:42.479105075 -0500 +@@ -1,4 +1,4 @@ +-PTARG = ${ROOT}/lib/${TARG} ++PTARG = ${ROOT}/@baselibdir@/${TARG} + LIB = ${PTARG}.a + OFILES = ${OBJ:=.o} + +@@ -20,7 +20,7 @@ + + ${LIB}: ${OFILES} + echo AR $$($(ROOT)/util/cleanname $(BASE)/$@) +- mkdir ${ROOT}/lib 2>/dev/null || true ++ mkdir ${ROOT}/@baselibdir@ 2>/dev/null || true + ${AR} $@ ${OFILES} + + include ${ROOT}/mk/common.mk diff --git a/libraries/libixp/libixp.SlackBuild b/libraries/libixp/libixp.SlackBuild index 5085cb154e..115a481ed8 100644 --- a/libraries/libixp/libixp.SlackBuild +++ b/libraries/libixp/libixp.SlackBuild @@ -34,10 +34,13 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" fi set -e @@ -46,7 +49,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find . \ @@ -55,29 +58,32 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Fix prefixes and cflags values -sed -i \ - -e 's:^PREFIX = /usr/local:PREFIX = /usr:' \ - -e 's:^MAN = ${PREFIX}/share/man:MAN = /usr/man:' \ - -e 's:^ETC = ${PREFIX}/etc:ETC = /etc:' \ - -e 's:^CFLAGS =:CFLAGS += :' \ - config.mk -CFLAGS="$SLKCFLAGS" make +# Fix cflags value +sed -i 's:^CFLAGS =:CFLAGS += :' config.mk -# This is *needed* to install correctly under $PKG -sed -i \ - -e 's:^PREFIX = /usr:PREFIX = '${PKG}'/usr:' \ - -e 's:^MAN = /usr/man:MAN = '${PKG}'/usr/man:' \ - -e 's:^ETC = /etc:ETC = '${PKG}'/etc:' \ - config.mk -make install +CFLAGS="$SLKCFLAGS" make \ + PREFIX=/usr \ + LIBDIR=/usr/lib${LIBDIRSUFFIX} \ + MAN=/usr/man \ + ETC=/etc + +# Fix hardcoded /usr/lib +sed "s%@baselibdir@%lib$LIBDIRSUFFIX%g" $CWD/libixp-0.4-libdir.diff | patch -p1 + +make install \ + PREFIX=$PKG/usr \ + LIBDIR=$PKG/usr/lib${LIBDIRSUFFIX} \ + MAN=$PKG/usr/man \ + ETC=$PKG/etc # Erase "/etc", it's empty rmdir $PKG/etc -( - find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - find $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + 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 @@ -86,12 +92,11 @@ rmdir $PKG/etc ) mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cd libixp -cp -a LICENSE LICENSE.p9p README $PKG/usr/doc/$PRGNAM-$VERSION +cp -a libixp/LICENSE* libixp/README $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/libraries/libixp/libixp.info b/libraries/libixp/libixp.info index cd0d9e17ce..ac1b649a6f 100644 --- a/libraries/libixp/libixp.info +++ b/libraries/libixp/libixp.info @@ -3,6 +3,8 @@ VERSION="0.4" HOMEPAGE="http://libs.suckless.org/libixp" DOWNLOAD="http://code.suckless.org/dl/libs/libixp-0.4.tar.gz" MD5SUM="59d9e918adffaf4413b32ac4f66724fd" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" MAINTAINER="Antonio Hernández Blas" EMAIL="hba.nihilismus@gmail.com" -APPROVED="David Somero" +APPROVED="dsomero" diff --git a/libraries/libixp/slack-desc b/libraries/libixp/slack-desc index 4f7d89cafc..777a3397db 100644 --- a/libraries/libixp/slack-desc +++ b/libraries/libixp/slack-desc @@ -13,7 +13,7 @@ libixp: client which behaves like wmiir in the past. It consists of less libixp: than 2000 lines of code (including ixpc). libixp: libixp: Homepage: http://www.suckless.org/wiki/libs/libixp -libixp: -libixp: -libixp: -libixp: +libixp: +libixp: +libixp: +libixp: