diff options
author | Eric Hameleers <alien@slackware.com> | 2012-07-27 08:27:51 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2012-07-27 08:27:51 +0000 |
commit | 1cc820f826745e1a92d1c02d10d309177e5f2b99 (patch) | |
tree | 8c3a789446a35f227e449dea6895ab85c359c096 /BeautifulSoup/build | |
parent | 177515d0c66b3d37a4c87597baa5799497c6526d (diff) | |
download | asb-1cc820f826745e1a92d1c02d10d309177e5f2b99.tar.gz asb-1cc820f826745e1a92d1c02d10d309177e5f2b99.tar.xz |
Update to bs4
Diffstat (limited to 'BeautifulSoup/build')
-rwxr-xr-x | BeautifulSoup/build/BeautifulSoup.SlackBuild | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/BeautifulSoup/build/BeautifulSoup.SlackBuild b/BeautifulSoup/build/BeautifulSoup.SlackBuild index 19f18f46..d5d28a94 100755 --- a/BeautifulSoup/build/BeautifulSoup.SlackBuild +++ b/BeautifulSoup/build/BeautifulSoup.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright 2010, 2011 Eric Hameleers, Eindhoven, NL +# Copyright 2010, 2011, 2012 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -34,6 +34,8 @@ # * Initial build. # 3.2.0-1: 15/may/2011 by Eric Hameleers <alien@slackware.com> # * Update. Note that older than 3.1 will not work with python3. +# 4.1.1-1: 27/jul/2012 by Eric Hameleers <alien@slackware.com> +# * Update. Works with Python 2 (2.7+) and Python 3. # # Run 'sh BeautifulSoup.SlackBuild' to build a Slackware package. # The package (.tgz) and .txt file as well as build logs are created in /tmp . @@ -44,7 +46,9 @@ # Set initial variables: PRGNAM=BeautifulSoup -VERSION=${VERSION:-3.2.0} +SRCNAM=beautifulsoup4 +VERSION=${VERSION:-4.1.1} +SRCVER=$(echo $VERSION | cut -f1,2 -d.) BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:" -j4 "} TAG=${TAG:-alien} @@ -57,20 +61,22 @@ TMP=${TMP:-/tmp/build} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz" -SRCURL="http://www.crummy.com/software/${PRGNAM}/download/3.x/${PRGNAM}-${VERSION}.tar.gz" +SOURCE="$SRCDIR/${SRCNAM}-${VERSION}.tar.gz" +SRCURL="http://www.crummy.com/software/BeautifulSoup/bs4/download/${SRCVER}/${SRCNAM}-${VERSION}.tar.gz" ## ## --- with a little luck, you won't have to edit below this point --- ## ## # Automatically determine the architecture we're building on: +MARCH=$( uname -m ) if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) export ARCH=i486 ;; - arm*) export ARCH=arm ;; + case "$MARCH" in + i?86) export ARCH=i486 ;; + armv7hl) export ARCH=$MARCH ;; + arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$( uname -m ) ;; + *) export ARCH=$MARCH ;; esac fi @@ -96,10 +102,11 @@ rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log # Source file availability: if ! [ -f ${SOURCE} ]; then + echo "Source '$(basename ${SOURCE})' not available yet..." + # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT + [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" + if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi if ! [ "x${SRCURL}" == "x" ]; then - # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT - [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" - echo "Source '$(basename ${SOURCE})' not available yet..." echo "Will download file to $(dirname $SOURCE)" wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then @@ -127,7 +134,7 @@ echo "++" cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." tar -xvf ${SOURCE} -cd ${PRGNAM}-${VERSION} +cd ${SRCNAM}-${VERSION} chown -R root:root . chmod -R u+w,go+r-w,a+X-s . |