#!/bin/bash # Generic python build script. (C)DatuX # Put in in a builddirectory with a python tarfile that contains a setup.py. # Please python_modulename for python modules. #wow..so many dependencies for certbot :( #maybe use https://github.com/Neilpang/acme.sh instead? #DEP:python #DEP:python_setuptools #DEP:python_mock #DEP:python_ZopeInterface #DEP:python_ZopeComponent #DEP:python_six #DEP:python_requests #DEP:python_pytz #DEP:python_pyrfc3339 #DEP:python_pyOpenSSL #DEP:python_cryptography #DEP:python_funcsigs #DEP:python_pyasn1 #DEP:python_ndg_httpsclient #DEP:python_ipaddress #DEP:python_enum34 #DEP:python_idna #DEP:python_parsedatetime #DEP:python_configobj #DEP:python_configargparse #DEP:python_ZopeEvent #######Essential package info. #Change these if autodetection fails. #Name of the Syn-3 package that we are going to create NAME=`basename $0|sed 's/.SlackBuild//'` #Archive of the sourcefiles to unpack SRC_ARC=`ls *.tar.*` #Version of the sourcefiles VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g'` #Directory of the sourcefiles to build (after optional unpacking) SRC_DIR=`echo $SRC_ARC| sed 's/\.tar\..*$//g'` #Architecture that the created binaries run on. #Use noarch for scripts. ARCH=`uname -m` ########Build and create the pacakge. #Uncomment the stuff that you dont want or need #prevent automated downloads/installs by python setuptools rm /etc/resolv.conf #Unpack source #(uncomment if not needed) syn3_unpack $SRC_ARC || exit 1 #apply patches #patch -p1 -d $SRC_DIR < fluxkiosk.patch || exit 1 pushd $SRC_DIR/acme || exit 1 python setup.py install --root=/tmp/pkg || exit 1 python setup.py install || exit 1 popd pushd $SRC_DIR || exit 1 python setup.py install --root=/tmp/pkg || exit 1 python setup.py install || exit 1 popd #strip bins and other stuff syn3_strip /tmp/pkg || exit 1 #move development stuff and create seperate development package syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 #make main package syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1