1
0
Fork 0
mirror of https://github.com/kbumsik/VirtScreen.git synced 2025-02-12 19:31:50 +00:00
VirtScreen/Makefile

108 lines
2.5 KiB
Makefile
Raw Permalink Normal View History

# See https://packaging.python.org/tutorials/distributing-packages/#packaging-your-project
# for python packaging reference.
2018-06-18 00:14:40 +00:00
DOCKER_NAME=kbumsik/virtscreen
DOCKER_RUN=docker run --interactive --tty -v $(shell pwd):/app $(DOCKER_NAME)
DOCKER_RUN_TTY=docker run --interactive --tty -v $(shell pwd):/app $(DOCKER_NAME)
DOCKER_RUN_DEB=docker run -v $(shell pwd)/package/debian:/app $(DOCKER_NAME)
2018-06-18 00:14:40 +00:00
.PHONY:
python-wheel:
2018-06-18 07:11:21 +00:00
python3 setup.py bdist_wheel --universal
python-install:
2018-06-18 07:11:21 +00:00
pip3 install . --user
python-uninstall:
2018-06-18 07:11:21 +00:00
pip3 uninstall virtscreen
2018-05-23 23:40:15 +00:00
python-clean:
rm -rf build dist virtscreen.egg-info virtscreen/qml/*.qmlc
2018-05-23 23:40:15 +00:00
2018-05-21 19:09:42 +00:00
pip-upload: python-wheel
twine upload dist/*
.ONESHELL:
2018-06-18 00:14:40 +00:00
# Docker
docker-build:
docker build -f Dockerfile -t $(DOCKER_NAME) .
2018-05-23 01:26:17 +00:00
2018-06-18 00:14:40 +00:00
docker:
2018-06-18 07:11:21 +00:00
$(DOCKER_RUN_TTY) /bin/bash
2018-05-23 01:26:17 +00:00
2018-06-18 00:14:40 +00:00
docker-rm:
docker image rm -f $(DOCKER_NAME)
docker-pull:
docker pull $(DOCKER_NAME)
2018-05-23 01:26:17 +00:00
2018-06-18 00:14:40 +00:00
docker-push:
docker login
docker push $(DOCKER_NAME)
# For AppImage packaging, https://github.com/AppImage/AppImageKit/wiki/Creating-AppImages
appimage-build:
$(DOCKER_RUN) package/appimage/build.sh
$(DOCKER_RUN) chown -R $(shell id -u):$(shell id -u) package/appimage
appimage-clean:
$(DOCKER_RUN) rm -rf package/appimage/virtscreen.AppDir package/appimage/VirtScreen-x86_64.AppImage
2018-06-18 00:14:40 +00:00
# For Debian packaging, https://www.debian.org/doc/manuals/debmake-doc/ch08.en.html#setup-py
2018-05-23 01:26:17 +00:00
deb-make:
$(DOCKER_RUN_DEB) /app/debmake.sh
2018-05-23 01:26:17 +00:00
2018-06-18 07:11:21 +00:00
deb-build: deb-make
$(DOCKER_RUN_DEB) /app/copy_debian.sh
$(DOCKER_RUN_DEB) /app/debuild.sh
2018-05-23 01:26:17 +00:00
2018-05-25 18:35:57 +00:00
deb-contents:
$(DOCKER_RUN_DEB) /app/contents.sh
2018-05-25 18:35:57 +00:00
2018-06-03 15:55:15 +00:00
deb-env-make:
$(DOCKER_RUN_DEB) /app/debmake.sh virtualenv
2018-06-03 15:55:15 +00:00
2018-06-18 07:11:21 +00:00
deb-env-build: deb-env-make
$(DOCKER_RUN_DEB) /app/copy_debian.sh virtualenv
$(DOCKER_RUN_DEB) /app/debuild.sh virtualenv
2018-06-18 07:11:21 +00:00
deb-chown:
$(DOCKER_RUN_DEB) chown -R $(shell id -u):$(shell id -u) /app/build
2018-06-03 15:55:15 +00:00
2018-05-23 01:26:17 +00:00
deb-clean:
$(DOCKER_RUN_DEB) rm -rf /app/build
2018-05-21 19:09:42 +00:00
# For AUR: https://wiki.archlinux.org/index.php/Python_package_guidelines
# and: https://wiki.archlinux.org/index.php/Creating_packages
arch-update:
cd package/archlinux
makepkg --printsrcinfo > .SRCINFO
arch-install: arch-update
cd package/archlinux
makepkg -si
arch-build: arch-update
cd package/archlinux
makepkg
2018-05-21 19:09:42 +00:00
arch-upload: arch-update
cd package/archlinux
git clone ssh://aur@aur.archlinux.org/virtscreen.git
cp PKGBUILD virtscreen
cp .SRCINFO virtscreen
cd virtscreen
git add --all
git commit
git push
cd ..
rm -rf virtscreen
arch-clean:
cd package/archlinux
rm -rf pkg src *.tar*
clean: appimage-clean arch-clean deb-clean python-clean