- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
npl/system/libmpc/libmpc.SlackBuild
rc5c522c r1a19ecd 1 #!/bin/sh 1 #!/bin/bash 2 # 3 # Automaticly created by importpackage v1.0 4 # Imported from: http://mirrors.slackware.com/slackware/slackware-current/source/l/libmpc/ 5 # Created at Tue Jan 31 00:15:39 CET 2017 6 #DEP:mpfr 7 #DEP:gmp 2 8 3 #DEP:gmp 4 #DEP:mpfr 5 6 # Copyright 2010, 2011 Patrick J. Volkerding, Sebeka, Minnesota, USA 7 # All rights reserved. 8 # 9 # Redistribution and use of this script, with or without modification, is 10 # permitted provided that the following conditions are met: 11 # 12 # 1. Redistributions of this script must retain the above copyright 13 # notice, this list of conditions and the following disclaimer. 14 # 15 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 16 # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 18 # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 21 # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 23 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 26 27 # I really do not like to package source under a different name than upstream, 28 # but in this case there is a media player frontend that is well-known as 29 # mpc already, and it appears that other projects are packaging this mpc as 30 # libmpc instead. It is probably best to follow suit. 31 SRCNAM=mpc 32 PKGNAM=libmpc 33 VERSION=${VERSION:-$(echo $SRCNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} 34 BUILD=${BUILD:-2} 35 36 # Automatically determine the architecture we're building on: 37 if [ -z "$ARCH" ]; then 38 case "$( uname -m )" in 39 i?86) export ARCH=i486 ;; 40 arm*) export ARCH=arm ;; 41 # Unless $ARCH is already set, use uname -m for all other archs: 42 *) export ARCH=$( uname -m ) ;; 43 esac 44 fi 45 46 NUMJOBS=${NUMJOBS:-" -j7 "} 47 48 if [ "$ARCH" = "i486" ]; then 49 SLKCFLAGS="-O2 -march=i486 -mtune=i686" 50 LIBDIRSUFFIX="" 51 elif [ "$ARCH" = "s390" ]; then 52 SLKCFLAGS="-O2" 53 LIBDIRSUFFIX="" 54 elif [ "$ARCH" = "x86_64" ]; then 55 SLKCFLAGS="-O2 -fPIC" 56 LIBDIRSUFFIX="64" 57 else 58 SLKCFLAGS="-O2" 59 LIBDIRSUFFIX="" 60 fi 61 62 CWD=$(pwd) 63 TMP=${TMP:-/tmp} 64 PKG=$TMP/package-$SRCNAM 65 rm -rf $PKG 66 mkdir -p $TMP $PKG 67 68 cd $TMP 69 rm -rf $SRCNAM-$VERSION 70 tar xvf $CWD/$SRCNAM-$VERSION.tar.?z* || exit 1 71 cd $SRCNAM-$VERSION 72 chown -R root:root . 73 74 CFLAGS="$SLKCFLAGS" \ 75 ./configure \ 76 --prefix=/usr \ 77 --libdir=/usr/lib${LIBDIRSUFFIX} \ 78 --infodir=/usr/info \ 79 --docdir=/usr/doc/$PKGNAM-$VERSION \ 80 --enable-static=yes \ 81 --enable-shared=yes \ 82 --build=$ARCH-slackware-linux 83 84 make $NUMJOBS || make || exit 1 85 make install DESTDIR=$PKG || exit 1 86 87 find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ 88 | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null 89 90 # Hardly a savings doing this... 91 #strip -g $PKG/usr/lib${LIBDIRSUFFIX}/*.a 92 93 rm -f $PKG/usr/info/dir 94 gzip -9 $PKG/usr/info/* 95 96 mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION 97 cp -a \ 98 AUTHORS COPYING* INSTALL NEWS README* TODO \ 99 $PKG/usr/doc/$PKGNAM-$VERSION 100 101 # If there's a ChangeLog, installing at least part of the recent history 102 # is useful, but don't let it get totally out of control: 103 if [ -r ChangeLog ]; then 104 DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) 105 cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog 106 touch -r ChangeLog $DOCSDIR/ChangeLog 107 fi 108 109 mkdir -p $PKG/install 110 cat $CWD/slack-desc > $PKG/install/slack-desc 111 112 cd $PKG 113 /sbin/makepkg -l y -c n $TMP/$PKGNAM-${VERSION}-${ARCH}-${BUILD}.txz 9 ########### source original slackbuild (hopefully we dont need to modify it) 10 CWD=`pwd` 11 set -e 12 source ./libmpc.SlackBuild.orig 114 13 115 14 … … 117 16 cd $CWD 118 17 for PKG in /tmp/package-*; do 119 NAME=`echo $PKG| sed 's/.* -//'`18 NAME=`echo $PKG| sed 's/.*package-//'| sed 's/-/_/g'` 120 19 121 20 #seperate dev-package
Note: See TracChangeset
for help on using the changeset viewer.