1
0
Fork 0
mirror of https://github.com/kbumsik/VirtScreen.git synced 2025-03-09 15:40:18 +00:00

Makefile: Added tar.gz archive

This commit is contained in:
Bumsik Kim 2018-11-07 16:56:21 +09:00
parent 4a2e7d0c54
commit 88079ad98a
No known key found for this signature in database
GPG key ID: E31041C8EC5B01C6
3 changed files with 15 additions and 6 deletions

3
.gitignore vendored
View file

@ -11,6 +11,9 @@
# files & folders for development use
debug
# Archive file
*.tar.gz
################################################################################
# Byte-compiled / optimized / DLL files
__pycache__/

View file

@ -8,12 +8,13 @@ DOCKER_RUN_TTY=docker run --interactive --tty -v $(shell pwd):/app $(DOCKER_NAME
PKG_APPIMAGE=package/appimage/VirtScreen.AppImage
PKG_DEBIAN=package/debian/virtscreen.deb
ARCHIVE=virtscreen-$(VERSION).tar.gz
.ONESHELL:
.PHONY: run debug run-appimage debug-appimage
all: package/pypi/*.whl $(PKG_APPIMAGE) $(PKG_DEBIAN)
all: package/pypi/*.whl $(ARCHIVE) $(PKG_APPIMAGE) $(PKG_DEBIAN)
# Run script
run:
@ -28,6 +29,12 @@ run-appimage: $(PKG_APPIMAGE)
debug-appimage: $(PKG_APPIMAGE)
QT_DEBUG_PLUGINS=1 QML_IMPORT_TRACE=1 $< --log=DEBUG
# tar.gz
.PHONY: archive
archive $(ARCHIVE):
git archive --format=tar.gz --prefix=virtscreen-$(VERSION)/ -o $@ HEAD
# Docker tools
.PHONY: docker docker-build
@ -64,7 +71,7 @@ appimage-clean:
# https://www.debian.org/doc/manuals/debmake-doc/ch08.en.html#setup-py
.PHONY: deb-contents deb-clean
$(PKG_DEBIAN): $(PKG_APPIMAGE)
$(PKG_DEBIAN): $(PKG_APPIMAGE) $(ARCHIVE)
$(DOCKER_RUN) package/debian/build.sh
$(DOCKER_RUN) mv package/debian/*.deb $@
$(DOCKER_RUN) chown -R $(shell id -u):$(shell id -u) package/debian
@ -121,3 +128,4 @@ override-version:
# Clean packages
clean: appimage-clean arch-clean deb-clean wheel-clean
-rm -f $(ARCHIVE)

View file

@ -11,10 +11,8 @@ ROOT=$SCRIPT_DIR/../..
# Generate necessary files for package building (generated by debmake)
cd $ROOT/package/debian
wget -q https://github.com/kbumsik/VirtScreen/archive/$PKGVER.tar.gz
tar -xzmf $PKGVER.tar.gz
mv VirtScreen-$PKGVER virtscreen-$PKGVER
mv $PKGVER.tar.gz virtscreen-$PKGVER.tar.gz
cp $ROOT/virtscreen-$PKGVER.tar.gz .
tar -xzmf virtscreen-$PKGVER.tar.gz
cp $ROOT/package/debian/Makefile \
$ROOT/package/debian/virtscreen-$PKGVER/Makefile
cd $ROOT/package/debian/virtscreen-$PKGVER