ADDED Makefile Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -0,0 +1,50 @@ +SHELL := /bin/bash #(for brace expansion) +NAME := streamtuner2 +VERSION := $(shell version get:plugin st2.py) +PACK := xpm +DEPS := -n $(NAME) -d python-pyquery -d python-gtk2 -d python-requests -d python-keybinder +OPTS := -s src -u man,fixperms -f --prefix=/usr/share/streamtuner2 --deb-compression xz --rpm-compression xz --exe-autoextract +all: gtk3 #(most used) + +# Convert between internal GtkBuilder-zlib file and uncompressed xml +# (workaround because Python2 has no working gzip support) +gtk3: + zlib-flate -compress < gtk3.xml > gtk3.xml.zlib +glade: + zlib-flate -uncompress < gtk3.xml.zlib > gtk3.xml + glade gtk3.xml 2>/dev/null + zlib-flate -compress < gtk3.xml > gtk3.xml.zlib + +# Package up using fpm/xpm +pack: gtk3, ver, docs, xpm, src + +docs: # update static files + gzip -9c NEWS > NEWS.gz +ver: # copy `version:` info + version get:plugin st2.py write:control PKG-INFO +clean: + rm *.pyc */*.pyc + rm -r __pycache__ */__pycache__ + +#-- bundles +xpm: deb, pyz#, bin, rpm, exe +deb: + $(PACK) $(OPTS) $(DEPS) -t deb -p "$(NAME)-VERSION.deb" st2.py +rpm: + $(PACK) $(OPTS) $(DEPS) -t rpm -p "$(NAME)-VERSION.rpm" st2.py +bin: + $(PACK) $(OPTS) $(DEPS) -t tar -p "$(NAME)-VERSION.bin.txz" st2.py +zip:pyz +pyz: + $(PACK) -s src -t zip -p "$(NAME)-VERSION.pyz" --prefix=./ --verbose -f .zip.py st2.py +src: + cd .. && pax -wvJf streamtuner2/streamtuner2-$(VERSION).src.txz \ + streamtuner2/*.{py,png,svg,desktop} streamtuner2/channels/*.{py,png} \ + streamtuner2/{bundle/,help/,gtk,NEWS,READ,PACK,PKG,CRED,Make,bin,.zip}* + +# test .deb contents +check: + dpkg-deb -c streamtuner2*deb + dpkg-deb -I streamtuner2*deb + rpm -qpil *rpm + DELETED _pack Index: _pack ================================================================== --- _pack +++ _pack @@ -1,30 +0,0 @@ -# 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 - -