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:
parent
af7b9348a5
commit
d357296306
5 changed files with 50 additions and 97 deletions
16
.travis.yml
16
.travis.yml
|
@ -4,22 +4,22 @@ python: '3.6'
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
install:
|
install: |
|
||||||
- make docker-pull
|
docker pull kbumsik/virtscreen
|
||||||
- pip3 install .
|
pip3 install .
|
||||||
|
|
||||||
script:
|
script: |
|
||||||
- echo No test scripts implemented yet. Travis is used only for deploy yet.
|
echo No test scripts implemented yet. Travis is used only for deploy yet.
|
||||||
|
|
||||||
before_deploy:
|
before_deploy: |
|
||||||
- package/build_all.sh $TRAVIS_TAG
|
package/build_all.sh $TRAVIS_TAG
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
- provider: releases
|
- provider: releases
|
||||||
api_key:
|
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=
|
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:
|
file:
|
||||||
- package/debian/build/virtscreen_$TRAVIS_TAG-1_all.deb
|
- package/debian/virtscreen_$TRAVIS_TAG-1_all.deb
|
||||||
- package/appimage/VirtScreen-x86_64.AppImage
|
- package/appimage/VirtScreen-x86_64.AppImage
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
on:
|
on:
|
||||||
|
|
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_TTY=docker run --interactive --tty -v $(shell pwd):/app $(DOCKER_NAME)
|
||||||
DOCKER_RUN_DEB=docker run -v $(shell pwd)/package/debian:/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:
|
.ONESHELL:
|
||||||
|
|
||||||
# Docker
|
# Docker tools
|
||||||
docker-build:
|
.PHONY: docker docker-build
|
||||||
docker build -f Dockerfile -t $(DOCKER_NAME) .
|
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
$(DOCKER_RUN_TTY) /bin/bash
|
$(DOCKER_RUN_TTY) /bin/bash
|
||||||
|
|
||||||
docker-rm:
|
docker-build:
|
||||||
docker image rm -f $(DOCKER_NAME)
|
docker build -f Dockerfile -t $(DOCKER_NAME) .
|
||||||
|
|
||||||
docker-pull:
|
# Python wheel package for PyPI
|
||||||
docker pull $(DOCKER_NAME)
|
.PHONY: wheel-clean
|
||||||
|
|
||||||
docker-push:
|
package/pypi/%.whl:
|
||||||
docker login
|
python3 setup.py bdist_wheel --universal
|
||||||
docker push $(DOCKER_NAME)
|
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
|
# 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) package/appimage/build.sh
|
||||||
$(DOCKER_RUN) chown -R $(shell id -u):$(shell id -u) package/appimage
|
$(DOCKER_RUN) chown -R $(shell id -u):$(shell id -u) package/appimage
|
||||||
|
|
||||||
appimage-clean:
|
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
|
# For Debian packaging, https://www.debian.org/doc/manuals/debmake-doc/ch08.en.html#setup-py
|
||||||
deb-make:
|
.PHONY: deb-contents deb-clean
|
||||||
$(DOCKER_RUN_DEB) /app/debmake.sh
|
|
||||||
|
|
||||||
deb-build: deb-make
|
package/debian/%.deb:
|
||||||
$(DOCKER_RUN_DEB) /app/copy_debian.sh
|
$(DOCKER_RUN_DEB) /app/debmake.sh virtualenv
|
||||||
$(DOCKER_RUN_DEB) /app/debuild.sh
|
$(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:
|
deb-contents:
|
||||||
$(DOCKER_RUN_DEB) /app/contents.sh
|
$(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:
|
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
|
# For AUR: https://wiki.archlinux.org/index.php/Python_package_guidelines
|
||||||
# and: https://wiki.archlinux.org/index.php/Creating_packages
|
# and: https://wiki.archlinux.org/index.php/Creating_packages
|
||||||
arch-update:
|
.PHONY: arch-upload arch-clean
|
||||||
cd package/archlinux
|
|
||||||
makepkg --printsrcinfo > .SRCINFO
|
|
||||||
|
|
||||||
arch-install: arch-update
|
arch-upload: package/archlinux/.SRCINFO
|
||||||
cd package/archlinux
|
|
||||||
makepkg -si
|
|
||||||
|
|
||||||
arch-build: arch-update
|
|
||||||
cd package/archlinux
|
|
||||||
makepkg
|
|
||||||
|
|
||||||
arch-upload: arch-update
|
|
||||||
cd package/archlinux
|
cd package/archlinux
|
||||||
git clone ssh://aur@aur.archlinux.org/virtscreen.git
|
git clone ssh://aur@aur.archlinux.org/virtscreen.git
|
||||||
cp PKGBUILD virtscreen
|
cp PKGBUILD virtscreen
|
||||||
|
@ -100,8 +70,13 @@ arch-upload: arch-update
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf virtscreen
|
rm -rf virtscreen
|
||||||
|
|
||||||
|
package/archlinux/.SRCINFO:
|
||||||
|
cd package/archlinux
|
||||||
|
makepkg --printsrcinfo > .SRCINFO
|
||||||
|
|
||||||
arch-clean:
|
arch-clean:
|
||||||
cd package/archlinux
|
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
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
|
@ -29,11 +29,11 @@ override_version () {
|
||||||
}
|
}
|
||||||
|
|
||||||
build_pypi () {
|
build_pypi () {
|
||||||
make -C $ROOT python-wheel
|
make -C $ROOT package/pypi/virtscreen-$VERSION-py2.py3-none-any.whl
|
||||||
}
|
}
|
||||||
|
|
||||||
build_appimage () {
|
build_appimage () {
|
||||||
make -C $ROOT appimage-build
|
make -C $ROOT package/appimage/VirtScreen-x86_64.AppImage
|
||||||
}
|
}
|
||||||
|
|
||||||
build_arch () {
|
build_arch () {
|
||||||
|
@ -43,16 +43,15 @@ build_arch () {
|
||||||
perl -pi -e "s/sha256sums=\('.*'\)/sha256sums=('$SHA256')/" \
|
perl -pi -e "s/sha256sums=\('.*'\)/sha256sums=('$SHA256')/" \
|
||||||
$ROOT/package/archlinux/PKGBUILD
|
$ROOT/package/archlinux/PKGBUILD
|
||||||
rm $VERSION.tar.gz
|
rm $VERSION.tar.gz
|
||||||
make -C $ROOT arch-upload
|
# make -C $ROOT arch-upload
|
||||||
}
|
}
|
||||||
|
|
||||||
build_debian () {
|
build_debian () {
|
||||||
make -C $ROOT deb-env-build
|
make -C $ROOT package/debian/virtscreen_$VERSION-1_all.deb
|
||||||
make -C $ROOT deb-chown
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override_version
|
override_version
|
||||||
# build_pypi
|
build_pypi
|
||||||
build_appimage
|
build_appimage
|
||||||
# build_arch
|
build_arch
|
||||||
build_debian
|
build_debian
|
||||||
|
|
1
package/pypi/.gitignore
vendored
Normal file
1
package/pypi/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
virtscreen*.whl
|
Loading…
Reference in a new issue