#!/bin/bash export CFLAGS=-"O2" export CXXFLAGS="-O2" PKG_VER=1.1 URL=https://files.pythonhosted.org/packages/source/h/html5lib/html5lib-$PKG_VER.tar.gz TAR=$(echo $URL | sed -r 's|(.*)/||') DIR=$(echo $TAR | sed 's|.tar.*||g') PACKAGE=python-$(echo $DIR | sed 's|-[^-]*$||g') # Get Package cd /blfs/builds wget $URL wget https://patch-diff.githubusercontent.com/raw/html5lib/html5lib-python/pull/589.patch tar -xvf $TAR cd $DIR # Build patch -Np1 < ../589.patch python3 -m build --wheel --skip-dependency-check # Install sudo python3 -m installer --destdir=/pkgs/$PACKAGE dist/*.whl cd /pkgs sudo cp -rpv /pkgs/$PACKAGE/* / sudo echo "python-webencodings python python-lxml python-genshi" > /pkgs/$PACKAGE/depends sudo echo "python-genshi python-build python-six python-installer" > /pkgs/$PACKAGE/make-depends sudo echo "$PKG_VER" > /pkgs/$PACKAGE/version sudo tar -cvapf $PACKAGE.tar.xz $PACKAGE sudo cp $PACKAGE.tar.xz /finished cd /blfs/builds sudo rm -r $DIR