Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • npl/overig/curl/curl.SlackBuild.orig

    r105afb5 rc5c522c  
    1 #!/bin/bash
     1#!/bin/sh
    22
    3 # Copyright 2008, 2009, 2010, 2011, 2013, 2014, 2016, 2017, 2018, 2020, 2021  Patrick J. Volkerding, Sebeka, MN, USA
     3# Copyright 2008, 2009, 2010, 2011, 2013, 2014, 2016  Patrick J. Volkerding, Sebeka, MN, USA
    44# All rights reserved.
    55#
     
    2121#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2222
    23 cd $(dirname $0) ; CWD=$(pwd)
    2423
    2524PKGNAM=curl
    26 VERSION=${VERSION:-$(echo curl-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
     25VERSION=${VERSION:-$(echo curl-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
    2726BUILD=${BUILD:-1}
    2827
     
    3736fi
    3837
    39 # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
    40 # the name of the created package would be, and then exit. This information
    41 # could be useful to other scripts.
    42 if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
    43   echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
    44   exit 0
    45 fi
     38NUMJOBS=${NUMJOBS:-" -j7 "}
    4639
    47 NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
    48 
     40CWD=$(pwd)
    4941TMP=${TMP:-/tmp}
    5042PKG=$TMP/package-curl
    5143
    52 # Set this variable to "--without-ssl" to build a no-SSL version:
    53 SSLOPT=${SSLOPT:-"--with-openssl"}
     44# Uncomment to build a no-SSL version:
     45#SSLOPT=--without-ssl
    5446
    5547if [ "$ARCH" = "i586" ]; then
     
    7163cd $TMP
    7264rm -rf curl-$VERSION
    73 tar xvf $CWD/curl-$VERSION.tar.xz || exit 1
    74 cd curl-$VERSION || exit 1
     65tar xvf $CWD/curl-$VERSION.tar.bz2 || exit 1
     66cd curl-$VERSION
    7567
    7668chown -R root:root .
    7769find . \
    7870  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
    79   -exec chmod 755 {} \+ -o \
     71  -exec chmod 755 {} \; -o \
    8072  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
    81   -exec chmod 644 {} \+
     73  -exec chmod 644 {} \;
    8274
    8375CFLAGS="$SLKCFLAGS" \
     
    8678  --libdir=/usr/lib${LIBDIRSUFFIX} \
    8779  --mandir=/usr/man \
    88   --with-gssapi \
     80  --with-ca-bundle=/usr/share/curl/ca-bundle.crt \
    8981  --enable-static=no \
    90   --without-ca-bundle \
    91   --with-ca-path=/etc/ssl/certs \
    92   $SSLOPT || exit 1
     82  $SSLOPT
    9383
    9484make $NUMJOBS || make || exit 1
    9585make install DESTDIR=$PKG || exit 1
    9686
    97 # Don't ship .la files:
    98 rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
    99 
    100 # We have always installed the man3 documentation, so we'll keep doing it
    101 # even though these are no longer installed by default. No || exit 1, if
    102 # it works, it works, and if it doesn't, we tried.
    103 ( cd docs/libcurl
    104   make install-man3 DESTDIR=$PKG
    105   cd opts
    106   make install-man3 DESTDIR=$PKG
     87mkdir -p $PKG/usr/share/curl
     88cp -a $CWD/cacert.pem.bz2 $PKG/usr/share/curl
     89( cd $PKG/usr/share/curl
     90  bzip2 -d cacert.pem.bz2
     91  mv cacert.pem ca-bundle.crt
     92  chown root:root ca-bundle.crt
     93  chmod 644 ca-bundle.crt
    10794)
    10895
     
    117104mkdir -p $PKG/usr/doc/curl-$VERSION
    118105cp -a \
    119   COPYING* README*  \
     106  COPYING* README* \
    120107  $PKG/usr/doc/curl-$VERSION
     108( cd docs
     109  rm -rf Makefile* curl-config.1 curl-config.html curl.1 curl.html libcurl
     110  cp -a \
     111    BUGS  FAQ FEATURES INSTALL  MANUAL README* RESOURCES THANKS TODO examples \
     112    $PKG/usr/doc/curl-$VERSION )
    121113# Get rid of .deps cruft:
    122 rm -rf $PKG/usr/doc/curl-$VERSION/examples/.deps || true
     114rm -rf $PKG/usr/doc/curl-$VERSION/examples/.deps
    123115
    124116# If there's a CHANGES file, installing at least part of the recent history
Note: See TracChangeset for help on using the changeset viewer.