#Packager: George Vlahavas # # So this has too many dependencies for me to bother. I'll just take the # easy way out and use pip to install all dependencies in a virtualenv # and package that instead. Makes the package (a lot) larger but there # are no external dependencies, so I guess that's a win. pkgname=magic-wormhole pkgver=0.12.0 pkgrel=1gv url=https://github.com/warner/magic-wormhole source=("https://github.com/magic-wormhole/magic-wormhole/archive/refs/tags/$pkgver.tar.gz") slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "magic-wormhole (Securely transfer data between computers)" "This package provides a command-line tool named wormhole, which makes" "it possible to get arbitrary-sized files and directories (or short" "pieces of text) from one computer to another. The two endpoints are" "identified by using identical \"wormhole codes\": in general, the" "sending machine generates and displays the code, which must then be" "typed into the receiving machine." ) build() { cd $startdir/src/ mkdir virtualenv virtualenv -p python3 virtualenv source virtualenv/bin/activate pip install $pkgname==$pkgver deactivate virtualenv-make-relocatable virtualenv sed -i "1 s|^#!.*|#!/usr/lib${LIBDIRSUFFIX}/$pkgname/bin/python|" virtualenv/bin/wormhole # clean up stuff that is not really needed find virtualenv -type d \ \( \ -name __pycache__ \ -o -name pip \ -o -name "pip-*.dist.info" \ -o -name setuptools \ -o -name "setuptools-*.dist.info" \ -o -name distutils \ -o -name "distutils-*.dist.info" \ -o -name wheel \ -o -name "wheel-*.dist.info" \ \) \ -exec rm -rf {} \; rm -f virtualenv/bin/{easy_install,pip,wheel}* virtualenv/pip-selfcheck.json mkdir -p $startdir/pkg/usr/lib${LIBDIRSUFFIX}/ cp -r virtualenv $startdir/pkg/usr/lib${LIBDIRSUFFIX}/$pkgname mkdir $startdir/pkg/usr/bin ( cd $startdir/pkg/usr/bin ln -sf ../lib${LIBDIRSUFFIX}/$pkgname/bin/wormhole ) }