source: npl/overig/libtermcap/libtermcap.SlackBuild.orig @ c5c522c

gcc484ntopperl-5.22
Last change on this file since c5c522c 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: 2.8 KB
Line 
1#!/bin/sh
2
3# Copyright 2005-2010  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=1.2.3
25BUILD=${BUILD:-7}
26
27# Automatically determine the architecture we're building on:
28if [ -z "$ARCH" ]; then
29  case "$( uname -m )" in
30    i?86) export ARCH=i486 ;;
31    arm*) export ARCH=arm ;;
32    # Unless $ARCH is already set, use uname -m for all other archs:
33       *) export ARCH=$( uname -m ) ;;
34  esac
35fi
36
37CWD=$(pwd)
38TMP=${TMP:-/tmp}
39PKG=$TMP/package-libtermcap
40
41if [ "$ARCH" = "x86_64" ]; then
42  LIBDIRSUFFIX="64"
43else
44  LIBDIRSUFFIX=""
45fi
46
47rm -rf $PKG
48mkdir -p $TMP $PKG
49
50cd $TMP
51tar xzvf $CWD/termcap-compat_$VERSION.tar.gz
52cd termcap-compat-$VERSION
53chown -R root.root .
54zcat $CWD/termcap-compat_$VERSION.diff.gz | patch -p1 --verbose --backup --suffix=.orig
55zcat $CWD/termcap.h.diff.gz | patch -p0 --verbose --backup --suffix=.orig
56zcat $CWD/termcap.bufsize.diff.gz | patch -p1 --verbose --backup --suffix=.orig
57
58make
59
60# Install stuff manually:
61mkdir -p $PKG/lib${LIBDIRSUFFIX} $PKG/usr/lib${LIBDIRSUFFIX} \
62  $PKG/usr/{include,info}
63install -m755 libtermcap.so.* $PKG/lib${LIBDIRSUFFIX}/
64install -m644 libtermcap.a $PKG/usr/lib${LIBDIRSUFFIX}/
65install -m644 termcap.h $PKG/usr/include/
66install -m644 termcap.info* $PKG/usr/info/
67
68( cd $PKG/lib${LIBDIRSUFFIX} ; ldconfig -n . ; chown root:root libtermcap* )
69( cd $PKG/usr/lib${LIBDIRSUFFIX}
70  rm -f libermcap.so*
71  ln -sf /lib${LIBDIRSUFFIX}/$(basename $(find $PKG/lib${LIBDIRSUFFIX} -type f)) libtermcap.so
72)
73
74# Save docs:
75mkdir -p $PKG/usr/doc/termcap-$VERSION
76cp -a ChangeLog debian/changelog README $PKG/usr/doc/termcap-$VERSION
77
78# Compress the info pages:
79( cd $PKG/usr/info ; gzip -9f *.info* )
80
81# Add the package description:
82mkdir -p $PKG/install
83cat $CWD/slack-desc > $PKG/install/slack-desc
84
85cd $PKG
86makepkg -l y -c n $TMP/libtermcap-$VERSION-$ARCH-$BUILD.txz
87
Note: See TracBrowser for help on using the repository browser.