15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61 | .PHONY: bin
all: gtk3 #(most used)
pack: all ver docs xpm src
gtk3: gtk3.xml.gz
zip: pyz
print-%:
@echo $*=$($*)
# Convert between internal GtkBuilder-gzipped file and uncompressed xml
gtk3.xml.gz: gtk3.xml
gzip -c9 < gtk3.xml > gtk3.xml.gz
glade:
gzip -dc > gtk3.xml < gtk3.xml.gz
glade gtk3.xml 2>/dev/null
gzip -c9 < gtk3.xml > gtk3.xml.gz
# Prepare packaging
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
pyz:
#@BUG: relative package references leave a /tmp/doc/ folder
$(PACK) -u preprocess=py -DPKG_PYZ -s src -t zip -p ".pyz" --prefix=./ --verbose -f .zip.py st2.py
echo "#!/usr/bin/env python" | cat - ".pyz" > "$(NAME)-$(VERSION).pyz"
chmod +x "$(NAME)-$(VERSION).pyz" ; rm ".pyz"
exe:
$(PACK) $(OPTS) $(DEPS) -t exe -p "$(NAME)-VERSION.exe" 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: |
>
|
|
|
<
>
|
>
>
<
|
|
<
<
| 15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61 | .PHONY: bin
all: gtk3 #(most used)
pack: all ver docs xpm src
gtk3: gtk3.xml.gz
zip: pyz
print-%:
@echo $*=$($*)
# Convert between internal GtkBuilder-gzipped file and uncompressed xml
gtk3.xml.gz: gtk3.xml
gzip -c9 < gtk3.xml > gtk3.xml.gz
glade:
gzip -dc > gtk3.xml < gtk3.xml.gz
glade gtk3.xml 2>/dev/null
gzip -c9 < gtk3.xml > gtk3.xml.gz
# Prepare packaging
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 tar rpm exe
deb:
$(PACK) $(OPTS) $(DEPS) -t $@ -p "$(NAME)-VERSION.deb" st2.py
rpm:
$(PACK) $(OPTS) $(DEPS) -t $@ -p "$(NAME)-VERSION.rpm" st2.py
tar:
$(PACK) $(OPTS) $(DEPS) -t $@ -p "$(NAME)-VERSION.bin.txz" st2.py
exe:
$(PACK) $(OPTS) $(DEPS) -t $@ -p "$(NAME)-VERSION.exe" st2.py
pyz:
#@BUG: relative package references leave a /tmp/doc/ folder
$(PACK) -u packfile -s src -t zip --zip-shebang "/usr/bin/env python" \
-f -p "$(NAME)-$(VERSION).pyz" --prefix=./ --verbose .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: |