Skip to content

Commit

Permalink
Rename files in distribution archives
Browse files Browse the repository at this point in the history
(they are meant for different operating systems)
  • Loading branch information
carstene1ns committed May 25, 2015
1 parent beba290 commit 0c3ea3e
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

# helper variable
# helper variables
MYDIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
.PHONY: help dist dist-zip dist-tar optimize optimize-png

help:
@echo "This Makefile is intended to be used by developers only."
@echo "Therefore it does nothing by default. Available targets:"
@echo " optimize :"
@echo " optimize"
@echo " -png : Recompresses png files with zopfli for smaller file size"
@echo " dist : "
@echo " dist"
@echo " -zip : Creates a distribution zip archive (for use under Windows)"
@echo " -tar : Creates a distribution tarball (for other platforms)"
@echo "The meta targets will execute all their subtargets."
Expand All @@ -16,11 +17,22 @@ dist: dist-tar dist-zip

dist-zip:
@rm -f easyrpg-rtp.zip
@git archive --prefix=EasyRPG-RTP/ -9 --output=$(MYDIR)/easyrpg-rtp.zip --worktree-attributes master
@rm -rf dist-zip
@mkdir dist-zip
@git archive --prefix=EasyRPG-RTP/ --worktree-attributes master | tar xf - -C dist-zip
@cd dist-zip/EasyRPG-RTP; mv README.md README.txt; mv AUTHORS.md AUTHORS.txt; mv COPYING COPYING.txt; \
unix2dos -q COPYING.txt README.txt AUTHORS.txt
@cd dist-zip; zip -9 -q -r $(MYDIR)/easyrpg-rtp.zip EasyRPG-RTP
@rm -rf dist-zip

dist-tar:
@rm -f easyrpg-rtp.tar.gz
@git archive --prefix=EasyRPG-RTP/ --output=$(MYDIR)/easyrpg-rtp.tar.gz --worktree-attributes master
@rm -rf dist-tar
@mkdir dist-tar
@git archive --prefix=EasyRPG-RTP/ --worktree-attributes master | tar xf - -C dist-tar
@cd dist-tar/EasyRPG-RTP; mv README.md README; mv AUTHORS.md AUTHORS
@tar czf easyrpg-rtp.tar.gz -C dist-tar EasyRPG-RTP
@rm -rf dist-tar

optimize: optimize-png

Expand Down

0 comments on commit 0c3ea3e

Please sign in to comment.