aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2008-04-29 23:35:49 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2008-04-29 23:35:49 +0000
commit88a066732e99b57e46901c3833244c2ca65bcab9 (patch)
tree24a72fea4362bd0cf7b53299560e8753d63ab826
parent2c865c8340b8224232183f05a5eb86eda2e37271 (diff)
downloadslackbuilds-88a066732e99b57e46901c3833244c2ca65bcab9.tar.gz
slackbuilds-88a066732e99b57e46901c3833244c2ca65bcab9.tar.bz2
gnutls: rebuilt from mkbuild
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1852 370017ae-e619-0410-ac65-c121f96126d4
-rwxr-xr-xnet/libs/gnutls/gnutls.SlackBuild387
-rw-r--r--net/libs/gnutls/slack-desc19
-rw-r--r--net/libs/gnutls/slack-required3
3 files changed, 163 insertions, 246 deletions
diff --git a/net/libs/gnutls/gnutls.SlackBuild b/net/libs/gnutls/gnutls.SlackBuild
index 00e6247c..7d86b59a 100755
--- a/net/libs/gnutls/gnutls.SlackBuild
+++ b/net/libs/gnutls/gnutls.SlackBuild
@@ -1,258 +1,197 @@
#!/bin/bash
#
-# slackbuild for gnutls from http://www.slacky.it/download/libraries/gnutls/1.2.11/
+# gnutls.SlackBuild is free software; you can redistribute
+# it and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the License,
+# or any later version.
#
-# Heavily based on the Slackware 10.2 SlackBuild
-# ftp://ftp.gnutls.org/pub/gnutls/
-# Requirements: libgpg-error, libgcrypt and optionally opencdk, libtasn1, libcfg+, lzo
+# gnutls.SlackBuild is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
#
-# small changes by rhatto
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# slackbuild for gnutls, by Silvio Rhatto
+# requires:
+# tested: gnutls-2.0.4
#
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building gnutls are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD=`pwd`
-
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE="gnutls"
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="gnutls"
+PKG_NAME="gnutls"
ARCH=${ARCH:=i486}
-VERSION=${VERSION:=1.6.1}
+SRC_VERSION=${VERSION:=2.0.4}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:="--disable-static" "}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
+fi
-# ------- error codes for createpkg --------------
+# Set error codes (used by createpkg)
ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
-ERROR_PATCH=40
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
-if [ "$ARCH" == "x86_64" ]; then
- export LDFLAGS="-L/lib64 -L/usr/lib64"
- LIBDIR=/usr/lib64
-else
- LIBDIR=/usr/lib
-fi
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
-RTOOL="wget"
-TARGET="$ARCH"
-NAME="$PACKAGE"
-PACKAGE_EXT="bz2"
-SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
-URL="ftp://ftp.gnupg.org/gcrypt/alpha/$PACKAGE/$SRC"
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
-SRC_DIR="$SRC_DIR/$PACKAGE"
-mkdir -p $SRC_DIR
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.bz2"
+URL="ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/$SRC"
-if [ "$RTOOL" == "wget" ]; then
- if [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
- fi
- if [ ! -f "$SRC_DIR/$SRC.sig" ]; then
- wget "$URL.sig" -O "$SRC_DIR/$SRC.sig" || exit $ERROR_WGET
- fi
+if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/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y3A2M5lrQoFDeo7SS3U25ENqLFpDS3fgSsFX+/cyDoUgbjL3IPpfI
-i9kbOnPZ+hS6Et/jrmw3uI4ERBwvCQEEAMQi3pmMcFqhsFwVKjF++Bk0FC5L7UnP
-NrF1oscq4TzcmsWCrgL5SjtJ5FxhAMEv2DAuJvoCe4k4rJBvYlj36FzyuUvNQI0V
-+zQPAd+AQG+ayW1tnh8qTi0PfTFFAWM7jSy6qcAWU3rpqGs+w4KCBzaTKQ+MfyK8
-NZl/N8TYUOhfACCmrTlNiMUEGAECAA8FAkQcLwkCGwwFCQIPWAAACgkQ7aIelLVl
-cW99LwT/UPWxwEvtQiVlfZMl0Gvm976sLclV4OW5bladAxHPuNMlO2/E5gID0GyH
-nPf5K+O4bqi7tQlYp5bMjygJ8qXn6Pu2QPf2b1jF7TZcd5/h2RQe4mO9AHWupGPk
-skkt3dVpx6PwM00nhDTdyP1Jfd9euuIObas9BNm7tK20z7/jJ+e3O0nAXdJ+5lgO
-2SN1HuoO+KLbYxMku5qc0eHmK4eGog==
-=5IXo
------END PGP PUBLIC KEY BLOCK-----
-EOF
-
-gpg --verify $SRC_DIR/$SRC.sig $SRC_DIR/$SRC || exit $ERROR_GPG
-
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mcpu=i686"
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2"
+# Import minimized signing key from
+if echo http://josefsson.org/key.txt | grep -q -v "SIGNING KEY URL"; then
+ lynx -dump http://josefsson.org/key.txt | gpg --import || exit $ERROR_GPG
+elif echo [[SIGNING KEY ID]] | grep -q -v "SIGNING KEY ID"; then
+ gpg --recv-keys [[SIGNING KEY ID]] || exit $ERROR_GPG
+else
+ gpg --import << EOKEY || exit $ERROR_GPG
+[[SIGNING KEY]]
+EOKEY
fi
-TMP="$TMP/$PACKAGE"
-PKG=$TMP/package-gnutls
-rm -rf $TMP
-mkdir -p $PKG
-
-cd $TMP
+# Download source's signature if necessary and check it
+if echo [[SIGNING URL]] | grep -q -v "SIGNING URL"; then
+ SIGNATURE="`basename [[SIGNING URL]]`"
+ if [ ! -s "$SRC_DIR/$SIGNATURE" ]; then
+ wget "[[SIGNING URL]]" -O "$SRC_DIR/$SIGNATURE" || exit $ERROR_WGET
+ fi
+else
+ if [ -s "$SRC_DIR/$SRC.sig" ]; then
+ SIGNATURE="$SRC.sig"
+ elif [ -s "$SRC_DIR/$SRC.asc" ]; then
+ SIGNATURE="$SRC.asc"
+ else
+ echo Trying to get signature file from $URL.sig...
+ if wget "$URL.sig" -O "$SRC_DIR/$SRC.sig"; then
+ SIGNATURE="$SRC.sig"
+ else
+ rm $SRC_DIR/$SRC.sig
+ echo Trying to get signature file from $URL.asc...
+ if wget "$URL.asc" -O "$SRC_DIR/$SRC.asc"; then
+ SIGNATURE="$SRC.asc"
+ else
+ rm $SRC_DIR/$SRC.asc
+ echo "Error getting source's signature file"
+ exit $ERROR_GPG
+ fi
+ fi
+ fi
+fi
-tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR
-cd $NAME-$VERSION
+echo Checking $SRC_DIR/$SRC with gpg using $SRC_DIR/$SIGNATURE...
+gpg --verify "$SRC_DIR/$SIGNATURE" "$SRC_DIR/$SRC" || exit $ERROR_GPG
+echo Success.
-chown -R root.root .
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $8 }'`"
+cd "$PKG_SRC"
+# Configure
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure --prefix=/usr --libdir=$LIBDIR \
---disable-static \
---program-prefix="" \
---program-suffix="" \
-$TARGET-slackware-linux || exit $ERROR_CONF
-
-make || exit $ERROR_MAKE
-make install DESTDIR=$PKG || exit $ERROR_INSTALL
-
-mkdir -p $PKG/usr/doc/$NAME-$VERSION
-cp -a AUTHORS COPYING* ChangeLog INSTALL NEWS README THANKS $PKG/usr/doc/$NAME-$VERSION
-cd $PKG
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-chown -R root.bin $PKG/usr/bin
-gzip -9 $PKG/usr/man/*/*
-rm $PKG/usr/info/dir
-gzip -9 $PKG/usr/info/*
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc
-cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
-#requiredbuilder -v -y -s $CWD $PKG
-makepkg -l y -c n $REPOS/$NAME-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
-
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="AUTHORS COPYING* ChangeLog INSTALL NEWS README THANKS"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-------------------------------------------------------|
+gnutls: Gnutls (Transport Layer Security)
+gnutls:
+gnutls: This is the GNU TLS library. More up to date information can be found
+gnutls: at http://www.gnu.org/software/gnutls/ and http://www.gnutls.org/
+gnutls:
+gnutls:
+gnutls:
+gnutls:
+gnutls:
+gnutls:
+gnutls:
+EODESC
+
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+
+# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP
+ rm -rf "$PKG_WORK" "$PKG"
fi
-
diff --git a/net/libs/gnutls/slack-desc b/net/libs/gnutls/slack-desc
deleted file mode 100644
index a58b83c9..00000000
--- a/net/libs/gnutls/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler-------------------------------------------------------|
-gnutls: Gnutls (Transport Layer Security)
-gnutls:
-gnutls: This is the GNU TLS library. More up to date information can be found
-gnutls: at http://www.gnu.org/software/gnutls/ and http://www.gnutls.org/
-gnutls:
-gnutls:
-gnutls:
-gnutls:
-gnutls:
-gnutls:
-gnutls: Requirements: libgpg-error, libgcrypt, opencdk, libtasn1, libcfg+, lzo
diff --git a/net/libs/gnutls/slack-required b/net/libs/gnutls/slack-required
deleted file mode 100644
index 05ccb229..00000000
--- a/net/libs/gnutls/slack-required
+++ /dev/null
@@ -1,3 +0,0 @@
-glibc-solibs
-libgcrypt >= 1.2.2
-libgpg-error