Skip to content

Commit 88079ad

Browse files
committed
Makefile: Added tar.gz archive
1 parent 4a2e7d0 commit 88079ad

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
# files & folders for development use
1212
debug
1313

14+
# Archive file
15+
*.tar.gz
16+
1417
################################################################################
1518
# Byte-compiled / optimized / DLL files
1619
__pycache__/

Makefile

+10-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ DOCKER_RUN_TTY=docker run --interactive --tty -v $(shell pwd):/app $(DOCKER_NAME
88

99
PKG_APPIMAGE=package/appimage/VirtScreen.AppImage
1010
PKG_DEBIAN=package/debian/virtscreen.deb
11+
ARCHIVE=virtscreen-$(VERSION).tar.gz
1112

1213
.ONESHELL:
1314

1415
.PHONY: run debug run-appimage debug-appimage
1516

16-
all: package/pypi/*.whl $(PKG_APPIMAGE) $(PKG_DEBIAN)
17+
all: package/pypi/*.whl $(ARCHIVE) $(PKG_APPIMAGE) $(PKG_DEBIAN)
1718

1819
# Run script
1920
run:
@@ -28,6 +29,12 @@ run-appimage: $(PKG_APPIMAGE)
2829
debug-appimage: $(PKG_APPIMAGE)
2930
QT_DEBUG_PLUGINS=1 QML_IMPORT_TRACE=1 $< --log=DEBUG
3031

32+
# tar.gz
33+
.PHONY: archive
34+
35+
archive $(ARCHIVE):
36+
git archive --format=tar.gz --prefix=virtscreen-$(VERSION)/ -o $@ HEAD
37+
3138
# Docker tools
3239
.PHONY: docker docker-build
3340

@@ -64,7 +71,7 @@ appimage-clean:
6471
# https://www.debian.org/doc/manuals/debmake-doc/ch08.en.html#setup-py
6572
.PHONY: deb-contents deb-clean
6673

67-
$(PKG_DEBIAN): $(PKG_APPIMAGE)
74+
$(PKG_DEBIAN): $(PKG_APPIMAGE) $(ARCHIVE)
6875
$(DOCKER_RUN) package/debian/build.sh
6976
$(DOCKER_RUN) mv package/debian/*.deb $@
7077
$(DOCKER_RUN) chown -R $(shell id -u):$(shell id -u) package/debian
@@ -121,3 +128,4 @@ override-version:
121128

122129
# Clean packages
123130
clean: appimage-clean arch-clean deb-clean wheel-clean
131+
-rm -f $(ARCHIVE)

package/debian/build.sh

+2-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ ROOT=$SCRIPT_DIR/../..
1111

1212
# Generate necessary files for package building (generated by debmake)
1313
cd $ROOT/package/debian
14-
wget -q https://github.com/kbumsik/VirtScreen/archive/$PKGVER.tar.gz
15-
tar -xzmf $PKGVER.tar.gz
16-
mv VirtScreen-$PKGVER virtscreen-$PKGVER
17-
mv $PKGVER.tar.gz virtscreen-$PKGVER.tar.gz
14+
cp $ROOT/virtscreen-$PKGVER.tar.gz .
15+
tar -xzmf virtscreen-$PKGVER.tar.gz
1816
cp $ROOT/package/debian/Makefile \
1917
$ROOT/package/debian/virtscreen-$PKGVER/Makefile
2018
cd $ROOT/package/debian/virtscreen-$PKGVER

0 commit comments

Comments
 (0)