source: npl/overig/automake/automake.SlackBuild.orig @ 9befa48

Last change on this file since 9befa48 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.2 KB
Line 
1#!/bin/sh
2
3# Copyright 2008, 2009, 2012, 2015  Patrick J. Volkerding, Sebeka, Minnesota, USA
4# All rights reserved.
5#
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
24VERSION=${VERSION:-$(echo automake-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
25NUMJOBS=${NUMJOBS:-" -j7 "}
26BUILD=${BUILD:-1}
27
28# Note: the package is _built_ as 'noarch'
29# Automatically determine architecture for build & packaging:
30if [ -z "$ARCH" ]; then
31  case "$( uname -m )" in
32    i?86) export ARCH=i586 ;;
33    # Unless $ARCH is already set, use uname -m for all other archs:
34    *)    export ARCH=$( uname -m ) ;;
35  esac
36fi
37
38CWD=$(pwd)
39TMP=${TMP:-/tmp}
40PKG=$TMP/package-automake
41
42rm -rf $PKG
43mkdir -p $TMP $PKG
44
45cd $TMP
46rm -rf automake-$VERSION
47tar xvf $CWD/automake-$VERSION.tar.xz || exit 1
48cd automake-$VERSION
49
50# Patch to work with Perl 5.20:
51zcat $CWD/automake-1.15-perl-escape-curly-bracket.patch.gz | patch -p1 --verbose || exit 1
52
53chown -R root:root .
54find . \
55 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
56 -exec chmod 755 {} \; -o \
57 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
58 -exec chmod 644 {} \;
59
60./configure \
61  --prefix=/usr \
62  --mandir=/usr/man \
63  --infodir=/usr/info \
64  --build=$ARCH-slackware-linux
65
66make $NUMJOBS || make || exit 1
67make install DESTDIR=$PKG || exit 1
68
69rm -f $PKG/usr/info/dir
70gzip -9 $PKG/usr/info/*
71
72# Change hard links to symlinks:
73SHORTNAME=$(echo $VERSION | cut -f1,2 -d .)
74( cd $PKG/usr/bin
75  rm -f aclocal
76  ln -sf aclocal-$SHORTNAME aclocal
77  rm -rf automake
78  ln -sf automake-$SHORTNAME automake
79)
80#linkup;
81
82# Create local aclocal dir:
83mkdir -p $PKG/usr/share/aclocal
84touch $PKG/usr/share/aclocal
85
86# Compress manual pages:
87find $PKG/usr/man -type f -exec gzip -9 {} \;
88for i in $( find $PKG/usr/man -type l ) ; do
89  ln -s $( readlink $i ).gz $i.gz
90  rm $i
91done
92
93mkdir -p $PKG/usr/doc/automake-$VERSION
94mv $PKG/usr/share/doc/automake/* $PKG/usr/doc/automake-$VERSION
95cp -a \
96  AUTHORS COPYING* NEWS README* THANKS TODO \
97  $PKG/usr/doc/automake-$VERSION
98rm -rf $PKG/usr/share/doc
99
100mkdir -p $PKG/install
101zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
102cat $CWD/slack-desc > $PKG/install/slack-desc
103
104cd $PKG
105/sbin/makepkg -l y -c n $TMP/automake-$VERSION-noarch-$BUILD.txz
106
Note: See TracBrowser for help on using the repository browser.