source: npl/overig/libnl/libnl.SlackBuild @ d7191d1

gcc484perl-5.22
Last change on this file since d7191d1 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 3.4 KB
Line 
1#!/bin/sh
2
3# Copyright 2007  Andrew Psaltis, Vienna, VA, USA
4# Copyright 2009, 2010  Patrick J. Volkerding, Sebeka, MN, USA
5# All rights reserved.
6# Redistribution and use of this script, with or without modification, is
7# permitted provided that the following conditions are met:
8#
9# 1. Redistributions of this script must retain the above copyright
10#    notice, this list of conditions and the following disclaimer.
11#
12#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
13#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
15#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
17#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
18#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
19#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
20#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
21#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
23# Modified by Roberto Neri <rneri@libero.it>
24# Modified by Robby Workman <rworkman@slackware.com> for inclusion
25
26PKGNAM=libnl
27VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
28BUILD=${BUILD:-1}
29
30# Automatically determine the architecture we're building on:
31if [ -z "$ARCH" ]; then
32  case "$( uname -m )" in
33    i?86) export ARCH=i486 ;;
34    arm*) export ARCH=arm ;;
35    # Unless $ARCH is already set, use uname -m for all other archs:
36       *) export ARCH=$( uname -m ) ;;
37  esac
38fi
39
40CWD=$(pwd)
41TMP=${TMP:-/tmp}
42PKG=$TMP/package-$PKGNAM
43
44NUMJOBS=${NUMJOBS:--j6}
45
46if [ "$ARCH" = "i486" ]; then
47  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
48  LIBDIRSUFFIX=""
49elif [ "$ARCH" = "i686" ]; then
50  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
51  LIBDIRSUFFIX=""
52elif [ "$ARCH" = "x86_64" ]; then
53  SLKCFLAGS="-O2 -fPIC"
54  LIBDIRSUFFIX="64"
55else
56  SLKCFLAGS="-O2"
57  LIBDIRSUFFIX=""
58fi
59
60rm -rf $PKG
61mkdir -p $TMP $PKG
62cd $TMP
63rm -rf $PKGNAM-$VERSION
64tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
65cd $PKGNAM-$VERSION || exit 1
66chown -R root:root .
67find . \
68 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
69 -exec chmod 755 {} \; -o \
70 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
71 -exec chmod 644 {} \;
72
73CFLAGS="$SLKCFLAGS" \
74  ./configure \
75  --prefix=/usr \
76  --libdir=/usr/lib${LIBDIRSUFFIX} \
77  --sysconfdir=/etc \
78  --localstatedir=/var \
79  --with-gnu-ld \
80  --build=$ARCH-slackware-linux
81
82make $NUMJOBS || make || exit 1
83make install DESTDIR=$PKG || exit 1
84
85chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/libnl*
86
87find $PKG | xargs file | grep -e "executable" -e "shared object" \
88  | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
89
90mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
91cp -a \
92  COPYING* README* \
93  $PKG/usr/doc/$PKGNAM-$VERSION
94
95mkdir -p $PKG/install
96cat $CWD/slack-desc > $PKG/install/slack-desc
97
98cd $PKG
99/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
100
101
102############ make syn3 packages
103cd $CWD
104for PKG in /tmp/package-*; do
105        NAME=`echo $PKG| sed 's/.*package-//'| sed 's/-/_/'`
106
107        #seperate dev-package
108        syn3_move_dev $PKG $PKG""_dev
109        syn3_makepkg $PKG""_dev $NAME""_dev $VERSION $ARCH || exit 1
110
111        #make main package
112        syn3_makepkg $PKG $NAME $VERSION $ARCH || exit 1
113done
Note: See TracBrowser for help on using the repository browser.