#Packager: George Vlahavas pkgname=magic-wormhole pkgver=0.12.0 pkgrel=1gv url=https://github.com/warner/magic-wormhole slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "magic-wormhole (Securely transfer data between computers)" "This package provides 0a 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 --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 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 ) }