|
|
@ -1,6 +1,6 @@ |
|
|
|
#!/bin/bash |
|
|
|
# Build script for Slackware |
|
|
|
# Copyright (C) 2016,2019 Damien Goutte-Gattat |
|
|
|
# Copyright (C) 2016,2019,2020 Damien Goutte-Gattat |
|
|
|
# |
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
# is permitted provided that the following conditions are met: |
|
|
@ -27,10 +27,9 @@ |
|
|
|
# Depends: l/pytz |
|
|
|
|
|
|
|
# Source package infos |
|
|
|
NAMESRC=${NAMESRC:-babel} |
|
|
|
VERSION=${VERSION:-1.3} |
|
|
|
NAMESRC=${NAMESRC:-Babel} |
|
|
|
VERSION=${VERSION:-2.8.0} |
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
WGET=${WGET:-https://github.com/python-babel/babel/archive/$VERSION.tar.gz} |
|
|
|
|
|
|
|
# Build infos |
|
|
|
NAMEPKG=${NAMEPKG:-python-babel} |
|
|
@ -59,8 +58,7 @@ fi |
|
|
|
|
|
|
|
# Get and verify the source archive |
|
|
|
if [ ! -r $ARCHIVE ]; then |
|
|
|
wget -c -O $ARCHIVE.part "$WGET" |
|
|
|
mv $ARCHIVE.part $ARCHIVE |
|
|
|
pip3 download --no-binary :all: --no-deps $NAMESRC==$VERSION |
|
|
|
fi |
|
|
|
sha256sum -c $ARCHIVE.sha256 |
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
|
|
@ -70,17 +68,14 @@ cd $TMP |
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
cd $NAME |
|
|
|
python2 setup.py build |
|
|
|
python2 setup.py import_cldr |
|
|
|
python2 setup.py install --root=$PKG |
|
|
|
mv $PKG/usr/bin/pybabel $PKG/usr/bin/pybabel-2.7 |
|
|
|
python3 setup.py build |
|
|
|
mkdir cldr |
|
|
|
python3 setup.py import_cldr |
|
|
|
python3 setup.py install --root=$PKG |
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
install -m 644 AUTHORS CHANGES LICENSE README $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
install -m 644 AUTHORS CHANGES LICENSE README.rst $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
|
|
|
# Copy slack-desc file |
|
|
|
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|