Add packaging for *nix to Makefile

This commit is contained in:
Juhani Krekelä 2019-06-30 00:43:01 +03:00
parent 20383e649c
commit cf3d935c2f
3 changed files with 19 additions and 3 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
*.love
tmp/
*.zip
*.tar.gz

View File

@ -1,17 +1,22 @@
LOVEFILE=eitmer.love
WIN32_ZIPBALL=eitmer-win32.zip
NIX_TARBALL=eitmer-nix.tar.gz
.PHONY: all clean distclean run
all: $(LOVEFILE) eitmer-win32.zip
all: $(LOVEFILE) $(WIN32_ZIPBALL) $(NIX_TARBALL)
$(LOVEFILE): bundle/main.lua bundle/conf.lua bundle/win_image.png
cd bundle; zip -9 -r ../$@ *
eitmer-win32.zip: $(LOVEFILE)
$(WIN32_ZIPBALL): $(LOVEFILE) CC0 README
sh scripts/package-win32.sh
$(NIX_TARBALL): $(LOVEFILE) CC0 README
sh scripts/package-nix.sh
clean:
rm -rf $(LOVEFILE) *.zip tmp/
rm -rf $(LOVEFILE) $(WIN32_ZIPBALL) $(NIX_TARBALL) tmp/
distclean: clean

10
scripts/package-nix.sh Normal file
View File

@ -0,0 +1,10 @@
die() {
echo "$0: Error: $*" >&2
exit 1
}
mkdir -p tmp/eitmer-nix || die mkdir
cp eitmer.love README CC0 tmp/eitmer-nix
cd tmp
tar czvf ../eitmer-nix.tar.gz eitmer-nix