1
0
Fork 0
mirror of https://github.com/kbumsik/VirtScreen.git synced 2025-02-12 11:21:53 +00:00

Makefile: cleanup build system

This commit is contained in:
Bumsik Kim 2018-06-26 03:33:46 -04:00
parent af7b9348a5
commit d357296306
No known key found for this signature in database
GPG key ID: E31041C8EC5B01C6
5 changed files with 50 additions and 97 deletions

View file

@ -4,22 +4,22 @@ python: '3.6'
services:
- docker
install:
- make docker-pull
- pip3 install .
install: |
docker pull kbumsik/virtscreen
pip3 install .
script:
- echo No test scripts implemented yet. Travis is used only for deploy yet.
script: |
echo No test scripts implemented yet. Travis is used only for deploy yet.
before_deploy:
- package/build_all.sh $TRAVIS_TAG
before_deploy: |
package/build_all.sh $TRAVIS_TAG
deploy:
- provider: releases
api_key:
secure: zFbsCIKcsvWU/Yc+9k294Qj8QY48VlkV8DSScP5gz6dQegeUSaSHI/YafherkFQ0B03bIY8yc7roMtDo7HAkEnPptjFhdUiOFI11+xDVb3s7Y8Ek2nV3znQzdtR4CR/94l3in6R3DH+eNA6+6Je/NIWLdVcvRX07RBSfBVdPmnsAyAD9KNTsl8Q4c20HgtLNxfWv2s5eCyD+heCTLYrErEZKZ5vYeeANmWomHvT2ED/4QerpBP8wkh59QXD1S79CF7oyq6X173ZJUQVxdBP+OSXt/mDBAoqf+TV6okawRZn48JluvCWAJ7BceX7t9emd1rVI/s8t3wCP+eMcmNn5g/6UJaCPnTJ5YplTuUWRc63UFSkE0AY8WYcRlrz+/OiXYgQ8LMXfN23aWgarHCbS2vHR3Afu9gpLCoKucr36hKhs3zfjJzVLFFW16mnbaTFcBzfDDRpkvOANB1aZwGVRFpTIWIMjkn0+lxWTC/moIJvQlfRPsC4dN5cDAilRQlguHzayebtGE8X0PuIe9A8bkET3V/y+KPnQiSJ7J+5PNoDSdqRAE4IKvVOLEyHtlqBVkvIHKnugUnWPIZ21gm5RemMEj9/YGa8Efwz7PIKtJJ3kFMGDYKVlIKyB+rg/TFWNdo6jjevnWM6y4SfVI3kFyjA+mp31o6nshrQy0zVQpd8=
file:
- package/debian/build/virtscreen_$TRAVIS_TAG-1_all.deb
- package/debian/virtscreen_$TRAVIS_TAG-1_all.deb
- package/appimage/VirtScreen-x86_64.AppImage
skip_cleanup: true
on:

View file

@ -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

View file

@ -1,22 +0,0 @@
pkgbase = virtscreen
pkgdesc = Make your iPad/tablet/computer as a secondary monitor on Linux
pkgver = 0.2.4
pkgrel = 1
url = https://github.com/kbumsik/VirtScreen
arch = i686
arch = x86_64
license = GPL
makedepends = python-pip
depends = xorg-xrandr
depends = x11vnc
depends = python-pyqt5
depends = python-twisted
depends = python-netifaces
depends = python-qt5reactor
optdepends = arandr: for display settings option
provides = virtscreen
source = https://github.com/kbumsik/VirtScreen/archive/0.2.4.tar.gz
sha256sums = 0a62fd5e2b89ff7d83f9769d33b6a795c452a8bf09cf2e61ccd8282b40cefd6f
pkgname = virtscreen

View file

@ -29,11 +29,11 @@ override_version () {
}
build_pypi () {
make -C $ROOT python-wheel
make -C $ROOT package/pypi/virtscreen-$VERSION-py2.py3-none-any.whl
}
build_appimage () {
make -C $ROOT appimage-build
make -C $ROOT package/appimage/VirtScreen-x86_64.AppImage
}
build_arch () {
@ -43,16 +43,15 @@ build_arch () {
perl -pi -e "s/sha256sums=\('.*'\)/sha256sums=('$SHA256')/" \
$ROOT/package/archlinux/PKGBUILD
rm $VERSION.tar.gz
make -C $ROOT arch-upload
# make -C $ROOT arch-upload
}
build_debian () {
make -C $ROOT deb-env-build
make -C $ROOT deb-chown
make -C $ROOT package/debian/virtscreen_$VERSION-1_all.deb
}
override_version
# build_pypi
build_pypi
build_appimage
# build_arch
build_arch
build_debian

1
package/pypi/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
virtscreen*.whl