source: npl/overig/lynx/lynx.SlackBuild.orig @ c6da4cb

gcc484perl-5.22
Last change on this file since c6da4cb 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: 4.4 KB
Line 
1#!/bin/sh
2
3# Copyright 2008, 2009, 2010, 2012  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
24SRCVER=2.8.7
25PKGVER=2.8.7
26BUILD=${BUILD:-3}
27
28NUMJOBS=${NUMJOBS:-" -j7 "}
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
40if [ "$ARCH" = "i486" ]; then
41  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
42  LIBDIRSUFFIX=""
43elif [ "$ARCH" = "s390" ]; then
44  SLKCFLAGS="-O2"
45  LIBDIRSUFFIX=""
46elif [ "$ARCH" = "x86_64" ]; then
47  SLKCFLAGS="-O2 -fPIC"
48  LIBDIRSUFFIX="64"
49else
50  SLKCFLAGS="-O2"
51  LIBDIRSUFFIX=""
52fi
53
54CWD=$(pwd)
55TMP=${TMP:-/tmp}
56PKG=$TMP/package-lynx
57
58rm -rf $PKG
59mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX}/lynx
60cd $TMP
61rm -rf lynx2-8-7
62tar xvf $CWD/lynx${SRCVER}.tar.?z* || exit 1
63cd lynx2-8-7
64
65find . -name "*~" -exec rm -f {} \;
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
73# Fix /usr/local paths and libdir paths
74zcat $CWD/lynx.path.diff.gz | \
75  sed -e "s#@SLACK_LIBDIR@#/usr/lib${LIBDIRSUFFIX}/#g" | \
76  patch -p1 --verbose || exit 1
77
78# Apply recolorizing patch:
79zcat $CWD/lynx.cfg.diff.gz | patch -p1 --verbose --backup || exit 1
80
81CFLAGS="$SLKCFLAGS" \
82./configure \
83  --prefix=/usr \
84  --sysconfdir=/etc \
85  --libdir=/usr/lib${LIBDIRSUFFIX}/lynx \
86  --datadir=/usr/share/lynx \
87  --enable-default-colors \
88  --with-screen=ncursesw \
89  --enable-widec \
90  --enable-gzip-help \
91  --with-zlib \
92  --enable-read-eta \
93  --enable-scrollbar \
94  --with-ssl \
95  --enable-ipv6 \
96  --enable-color-style \
97  --enable-prettysrc \
98  --enable-source-cache \
99  --enable-nsl-fork \
100  --enable-nls \
101  --enable-persistent-cookies \
102  --enable-vertrace \
103  --disable-full-paths \
104  --enable-addrlist-page \
105  --enable-charset-choice \
106  --enable-cjk \
107  --enable-htmlized-cfg \
108  --enable-justify-elts \
109  --enable-locale-charset \
110  --enable-externs \
111  --enable-cgi-links \
112  --enable-change-exec \
113  --enable-exec-links \
114  --enable-exec-scripts \
115  --enable-internal-links \
116  --with-bzlib \
117  --build=$ARCH-slackware-linux
118
119make $NUMJOBS || make || exit 1
120make install DESTDIR=$PKG || exit 1
121make install-help DESTDIR=$PKG || exit 1
122make install-doc DESTDIR=$PKG || exit 1
123
124find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
125  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
126
127# Correct $DESTDIR brokenness:
128( cd $PKG/usr/share/lynx/lynx_help
129  rm -f COPYHEADER COPYING
130  ln -sf ../lynx_doc/COPYHEADER .
131  ln -sf ../lynx_doc/COPYING .
132)
133# Add documentation symlinks:
134( mkdir -p $PKG/usr/doc/lynx-$PKGVER
135  cd $PKG/usr/doc/lynx-$PKGVER
136  ln -sf /usr/share/lynx/lynx_doc .
137  ln -sf /usr/share/lynx/lynx_help .
138)
139
140# If there's a ChangeLog, installing at least part of the recent history
141# is useful, but don't let it get totally out of control:
142if [ -r CHANGES ]; then
143  DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
144  cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES
145  touch -r CHANGES $DOCSDIR/CHANGES
146fi
147
148gzip -9 $PKG/usr/man/man?/*.?
149
150mkdir -p $PKG/install
151cat $CWD/slack-desc > $PKG/install/slack-desc
152
153cd $PKG
154/sbin/makepkg -l y -c n $TMP/lynx-$PKGVER-$ARCH-$BUILD.txz
155
Note: See TracBrowser for help on using the repository browser.