|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2016,2017,2019 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2016,2017,2019,2020 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -25,13 +25,12 @@
|
|
|
|
|
# Latest cryptography sourcecode is available at: |
|
|
|
|
# <https://github.com/pyca/cryptography>. |
|
|
|
|
# |
|
|
|
|
# Depends: l/python-cffi, l/python-enum34, l/python-ipaddress |
|
|
|
|
# Depends: l/python-cffi |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-cryptography} |
|
|
|
|
VERSION=${VERSION:-2.8} |
|
|
|
|
VERSION=${VERSION:-2.9.2} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-python-cryptography} |
|
|
|
@ -73,8 +72,7 @@ esac
|
|
|
|
|
|
|
|
|
|
# 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) |
|
|
|
@ -86,10 +84,6 @@ tar xf $CWD/$ARCHIVE
|
|
|
|
|
cd $NAME |
|
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
|
python2 setup.py build |
|
|
|
|
python2 setup.py install --root=$PKG |
|
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
|
python3 setup.py build |
|
|
|
|
python3 setup.py install --root=$PKG |
|
|
|
|
|
|
|
|
@ -108,8 +102,6 @@ install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
|
|
|
|
|
# Add dependency infos |
|
|
|
|
cat <<EOF >$PKG/install/slack-required |
|
|
|
|
python-cffi |
|
|
|
|
python-enum34 |
|
|
|
|
python-ipaddress |
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
# Package the tree |
|
|
|
|