mirror of
https://github.com/kbumsik/VirtScreen.git
synced 2025-03-09 15:40:18 +00:00
Makefile: cleanup build system
This commit is contained in:
parent
af7b9348a5
commit
d357296306
5 changed files with 50 additions and 97 deletions
95
Makefile
95
Makefile
|
|
@ -6,89 +6,59 @@ 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)
|
||||
|
||||
.PHONY:
|
||||
|
||||
python-wheel:
|
||||
python3 setup.py bdist_wheel --universal
|
||||
|
||||
python-install:
|
||||
pip3 install . --user
|
||||
|
||||
python-uninstall:
|
||||
pip3 uninstall virtscreen
|
||||
|
||||
python-clean:
|
||||
rm -rf build dist virtscreen.egg-info virtscreen/qml/*.qmlc
|
||||
|
||||
pip-upload: python-wheel
|
||||
twine upload dist/*
|
||||
|
||||
.ONESHELL:
|
||||
|
||||
# Docker
|
||||
docker-build:
|
||||
docker build -f Dockerfile -t $(DOCKER_NAME) .
|
||||
# Docker tools
|
||||
.PHONY: docker docker-build
|
||||
|
||||
docker:
|
||||
$(DOCKER_RUN_TTY) /bin/bash
|
||||
|
||||
docker-rm:
|
||||
docker image rm -f $(DOCKER_NAME)
|
||||
|
||||
docker-build:
|
||||
docker build -f Dockerfile -t $(DOCKER_NAME) .
|
||||
|
||||
docker-pull:
|
||||
docker pull $(DOCKER_NAME)
|
||||
# Python wheel package for PyPI
|
||||
.PHONY: wheel-clean
|
||||
|
||||
docker-push:
|
||||
docker login
|
||||
docker push $(DOCKER_NAME)
|
||||
package/pypi/%.whl:
|
||||
python3 setup.py bdist_wheel --universal
|
||||
cp dist/* package/pypi
|
||||
-rm -rf build dist *.egg-info
|
||||
|
||||
wheel-clean:
|
||||
-rm package/pypi/virtscreen*.whl
|
||||
|
||||
# For AppImage packaging, https://github.com/AppImage/AppImageKit/wiki/Creating-AppImages
|
||||
appimage-build:
|
||||
.PHONY: appimage-clean
|
||||
|
||||
package/appimage/%.AppImage:
|
||||
$(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
|
||||
-rm -rf package/appimage/virtscreen.AppDir package/appimage/VirtScreen-x86_64.AppImage
|
||||
|
||||
# For Debian packaging, https://www.debian.org/doc/manuals/debmake-doc/ch08.en.html#setup-py
|
||||
deb-make:
|
||||
$(DOCKER_RUN_DEB) /app/debmake.sh
|
||||
.PHONY: deb-contents deb-clean
|
||||
|
||||
deb-build: deb-make
|
||||
$(DOCKER_RUN_DEB) /app/copy_debian.sh
|
||||
$(DOCKER_RUN_DEB) /app/debuild.sh
|
||||
package/debian/%.deb:
|
||||
$(DOCKER_RUN_DEB) /app/debmake.sh virtualenv
|
||||
$(DOCKER_RUN_DEB) /app/copy_debian.sh virtualenv
|
||||
$(DOCKER_RUN_DEB) /app/debuild.sh virtualenv
|
||||
$(DOCKER_RUN_DEB) chown -R $(shell id -u):$(shell id -u) /app/build
|
||||
cp package/debian/build/virtscreen*.deb package/debian
|
||||
|
||||
deb-contents:
|
||||
$(DOCKER_RUN_DEB) /app/contents.sh
|
||||
|
||||
deb-env-make:
|
||||
$(DOCKER_RUN_DEB) /app/debmake.sh virtualenv
|
||||
|
||||
deb-env-build: deb-env-make
|
||||
$(DOCKER_RUN_DEB) /app/copy_debian.sh virtualenv
|
||||
$(DOCKER_RUN_DEB) /app/debuild.sh virtualenv
|
||||
|
||||
deb-chown:
|
||||
$(DOCKER_RUN_DEB) chown -R $(shell id -u):$(shell id -u) /app/build
|
||||
|
||||
deb-clean:
|
||||
$(DOCKER_RUN_DEB) rm -rf /app/build
|
||||
rm -rf package/debian/build package/debian/*.deb
|
||||
|
||||
# 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
|
||||
.PHONY: arch-upload arch-clean
|
||||
|
||||
arch-install: arch-update
|
||||
cd package/archlinux
|
||||
makepkg -si
|
||||
|
||||
arch-build: arch-update
|
||||
cd package/archlinux
|
||||
makepkg
|
||||
|
||||
arch-upload: arch-update
|
||||
arch-upload: package/archlinux/.SRCINFO
|
||||
cd package/archlinux
|
||||
git clone ssh://aur@aur.archlinux.org/virtscreen.git
|
||||
cp PKGBUILD virtscreen
|
||||
|
|
@ -100,8 +70,13 @@ arch-upload: arch-update
|
|||
cd ..
|
||||
rm -rf virtscreen
|
||||
|
||||
package/archlinux/.SRCINFO:
|
||||
cd package/archlinux
|
||||
makepkg --printsrcinfo > .SRCINFO
|
||||
|
||||
arch-clean:
|
||||
cd package/archlinux
|
||||
rm -rf pkg src *.tar*
|
||||
-rm -rf pkg src *.tar* .SRCINFO
|
||||
|
||||
clean: appimage-clean arch-clean deb-clean python-clean
|
||||
# Clean packages
|
||||
clean: appimage-clean arch-clean deb-clean wheel-clean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue