makefile: dist archives include sample config file

This commit is contained in:
mappu 2017-08-13 16:54:44 +12:00
parent 91a87f065e
commit b3d25a25fc

View File

@ -56,15 +56,21 @@ build/win32/archive-server.exe: $(SOURCES) staticResources.go
go build $(GOFLAGS) -o ../../build/win32/archive-server.exe \
)
_dist/archive-$(VERSION)-linux64.tar.gz: build/linux64/archive-server
mkdir -p _dist
tar caf _dist/archive-$(VERSION)-linux64.tar.gz -C build/linux64 archive-server --owner=0 --group=0
build/linux64/config.json.SAMPLE: cmd/archive-server/config.json.SAMPLE
cp cmd/archive-server/config.json.SAMPLE build/linux64/config.json.SAMPLE
build/win32/config.json.SAMPLE: cmd/archive-server/config.json.SAMPLE
cp cmd/archive-server/config.json.SAMPLE build/win32/config.json.SAMPLE
_dist/archive-$(VERSION)-win32.7z: build/win32/archive-server.exe
_dist/archive-$(VERSION)-linux64.tar.gz: build/linux64/archive-server build/linux64/config.json.SAMPLE
mkdir -p _dist
tar caf _dist/archive-$(VERSION)-linux64.tar.gz -C build/linux64 archive-server config.json.SAMPLE --owner=0 --group=0
_dist/archive-$(VERSION)-win32.7z: build/win32/archive-server.exe build/win32/config.json.SAMPLE
mkdir -p _dist
( cd build/win32 ; \
if [ -f dist.7z ] ; then rm dist.7z ; fi ; \
7z a dist.7z archive-server.exe ; \
7z a dist.7z archive-server.exe config.json.SAMPLE ; \
mv dist.7z ../../_dist/archive-$(VERSION)-win32.7z \
)