# package up st2
# → now using fpm
#-- meta data
NAME=streamtuner2
VERSION=$(version --get:plugin st2.py --write:python st2.py --write:control PKG-INFO)
gzip -9c NEWS > NEWS.gz
#-- bundle
DEPS="-d python-pyquery -d python-gtk2 -d python-requests -d python-keybinder"
fpm -s src -t deb -u man,fixperms $DEPS -p "$NAME-$VERSION.deb" --prefix=/usr/share/streamtuner2 --deb-compression xz -f st2.py
#fpm -s src -t rpm -p "$NAME-$VERSION.rpm" --prefix=/usr/share/streamtuner2 --rpm-compression xz -f st2.py
#fpm -s src -t exe -p "$NAME-$VERSION.exe" --prefix=/usr/share/streamtuner2 --exe-autoextract -f st2.py
#fpm -s src -t tar -p "$NAME-$VERSION.bin.tar.xz" --prefix=/usr/local/share/streamtuner2 --verbose -f st2.py
fpm -s src -t zip -p "$NAME-$VERSION.pyz" --prefix=./ --verbose -f .zip.py st2.py
exit
#dpkg-deb -I streamtuner2*deb
#dpkg-deb -c streamtuner2*deb
cd ..
pax -wvJf streamtuner2-$VERSION.src.txz \
streamtuner2/*.py streamtuner2/*.xml streamtuner2/channels/*.{py,png} \
streamtuner2/*.png streamtuner2/*.svg streamtuner2/*.desktop \
streamtuner2/README streamtuner2/help/* streamtuner2/contrib/* \
streamtuner2/bundle/* \
streamtuner2/PKG-INFO streamtuner2/_pack streamtuner2/*.epm
cd -