1
0
Fork 0
mirror of https://github.com/kbumsik/VirtScreen.git synced 2025-03-09 15:40:18 +00:00
This commit is contained in:
Joel 2022-07-01 00:54:11 +00:00 committed by GitHub
commit cbb6b72989
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 35 additions and 52 deletions

View file

@ -1,6 +1,6 @@
# See https://packaging.python.org/tutorials/distributing-packages/#packaging-your-project # See https://packaging.python.org/tutorials/distributing-packages/#packaging-your-project
# for python packaging reference. # for python packaging reference.
VERSION ?= 0.3.1 VERSION ?= 0.3.2
DOCKER_NAME=kbumsik/virtscreen DOCKER_NAME=kbumsik/virtscreen
DOCKER_RUN=docker run --interactive --tty -v $(shell pwd):/app $(DOCKER_NAME) DOCKER_RUN=docker run --interactive --tty -v $(shell pwd):/app $(DOCKER_NAME)

View file

@ -1,41 +1,25 @@
# Maintainer: Bumsik Kim <k.bumsik@gmail.com> # Maintainer: Luis Martinez <luis dot martinez at tuta dot io>
_pkgname_camelcase=VirtScreen # Contributor: Bumsik Kim <k.bumsik@gmail.com>
pkgname=virtscreen
pkgver=0.3.1
pkgrel=1
pkgdesc="Make your iPad/tablet/computer as a secondary monitor on Linux"
arch=("i686" "x86_64")
url="https://github.com/kbumsik/VirtScreen"
license=('GPL')
groups=()
depends=('xorg-xrandr' 'x11vnc' 'python-pyqt5' 'qt5-quickcontrols2' 'python-quamash-git' 'python-netifaces')
makedepends=('python-pip' 'perl')
optdepends=(
'arandr: for display settings option'
)
provides=($pkgname)
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=(src::git+https://github.com/kbumsik/$_pkgname_camelcase.git#tag=$pkgver)
noextract=()
md5sums=('SKIP')
prepare() { pkgname=virtscreen
cd $srcdir/src pkgver=0.3.2
# Delete PyQt5 from install_requires because python-pyqt5 does not have PyPI metadata. pkgrel=0
# See https://bugs.archlinux.org/task/58887 pkgdesc="Make your iPad/tablet/computer as a secondary monitor on Linux"
perl -pi -e "s/\'PyQt5>=\d+\.\d+\.\d+\',//" \ arch=('any')
setup.py url="https://github.com/dderjoel/VirtScreen"
license=('GPL3')
depends=('xorg-xrandr' 'x11vnc' 'python-pyqt5' 'qt5-quickcontrols2' 'python-qasync' 'python-netifaces')
makedepends=('python-setuptools')
optdepends=('arandr: for display settings option')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('fdf4192829a1b2c2554e2f33b1c12756d34b691aad280bee207db3c9cd62f11d')
build() {
cd "VirtScreen-$pkgver"
python setup.py build
} }
package() { package() {
cd $srcdir/src cd "VirtScreen-$pkgver"
PIP_CONFIG_FILE=/dev/null /usr/bin/pip install --isolated --root="$pkgdir" --ignore-installed --ignore-requires-python --no-deps . python setup.py install --root="$pkgdir" --optimize=1 --skip-build
# These are already installed by setup.py }
# install -Dm644 "data/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
# install -Dm644 "data/icon.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
}

View file

@ -1,12 +1,12 @@
#!/bin/bash #!/bin/bash
PKGVER=0.3.1 PKGVER=0.3.2
# Required for debmake # Required for debmake
DEBEMAIL="k.bumsik@gmail.com" DEBEMAIL="k.bumsik@gmail.com"
DEBFULLNAME="Bumsik Kim" DEBFULLNAME="Bumsik Kim"
export PKGVER DEBEMAIL DEBFULLNAME export PKGVER DEBEMAIL DEBFULLNAME
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT=$SCRIPT_DIR/../.. ROOT=$SCRIPT_DIR/../..
# Generate necessary files for package building (generated by debmake) # Generate necessary files for package building (generated by debmake)
@ -14,7 +14,7 @@ cd $ROOT/package/debian
cp $ROOT/virtscreen-$PKGVER.tar.gz . cp $ROOT/virtscreen-$PKGVER.tar.gz .
tar -xzmf virtscreen-$PKGVER.tar.gz tar -xzmf virtscreen-$PKGVER.tar.gz
cp $ROOT/package/debian/Makefile \ cp $ROOT/package/debian/Makefile \
$ROOT/package/debian/virtscreen-$PKGVER/Makefile $ROOT/package/debian/virtscreen-$PKGVER/Makefile
cd $ROOT/package/debian/virtscreen-$PKGVER cd $ROOT/package/debian/virtscreen-$PKGVER
debmake --yes -b':sh' debmake --yes -b':sh'
@ -22,18 +22,18 @@ debmake --yes -b':sh'
# debmake files # debmake files
mkdir -p $ROOT/package/debian/build mkdir -p $ROOT/package/debian/build
cp -R $ROOT/package/debian/virtscreen-$PKGVER/debian \ cp -R $ROOT/package/debian/virtscreen-$PKGVER/debian \
$ROOT/package/debian/build/debian $ROOT/package/debian/build/debian
cp $ROOT/package/debian/Makefile \ cp $ROOT/package/debian/Makefile \
$ROOT/package/debian/build/ $ROOT/package/debian/build/
cp $ROOT/package/debian/{control,README.Debian} \ cp $ROOT/package/debian/{control,README.Debian} \
$ROOT/package/debian/build/debian/ $ROOT/package/debian/build/debian/
# binary and data files # binary and data files
cp $ROOT/package/appimage/VirtScreen.AppImage \ cp $ROOT/package/appimage/VirtScreen.AppImage \
$ROOT/package/debian/build/ $ROOT/package/debian/build/
cp $ROOT/virtscreen.desktop \ cp $ROOT/virtscreen.desktop \
$ROOT/package/debian/build/ $ROOT/package/debian/build/
cp -R $ROOT/data \ cp -R $ROOT/data \
$ROOT/package/debian/build/ $ROOT/package/debian/build/
# Build .deb package # Build .deb package
cd $ROOT/package/debian/build cd $ROOT/package/debian/build
@ -41,4 +41,4 @@ dpkg-buildpackage -b
# cleanup # cleanup
rm -rf $ROOT/package/debian/virtscreen-$PKGVER \ rm -rf $ROOT/package/debian/virtscreen-$PKGVER \
$ROOT/package/debian/*.tar.gz $ROOT/package/debian/*.tar.gz

View file

@ -40,7 +40,7 @@ setup(
# For a discussion on single-sourcing the version across setup.py and the # For a discussion on single-sourcing the version across setup.py and the
# project code, see # project code, see
# https://packaging.python.org/en/latest/single_source_version.html # https://packaging.python.org/en/latest/single_source_version.html
version='0.3.1', # Required version='0.3.2', # Required
# This is a one-line description or tagline of what your project does. This # This is a one-line description or tagline of what your project does. This
# corresponds to the "Summary" metadata field: # corresponds to the "Summary" metadata field:
@ -143,8 +143,7 @@ setup(
# #
# For an analysis of "install_requires" vs pip's requirements files see: # For an analysis of "install_requires" vs pip's requirements files see:
# https://packaging.python.org/en/latest/requirements.html # https://packaging.python.org/en/latest/requirements.html
install_requires=['PyQt5>=5.10.1', install_requires=['qasync>=0.23.0',
'Quamash>=0.6.0',
'netifaces>=0.10.6'], # Optional 'netifaces>=0.10.6'], # Optional
# List additional groups of dependencies here (e.g. development # List additional groups of dependencies here (e.g. development

View file

@ -22,7 +22,7 @@ from PyQt5.QtWidgets import QApplication
from PyQt5.QtQml import qmlRegisterType, QQmlApplicationEngine from PyQt5.QtQml import qmlRegisterType, QQmlApplicationEngine
from PyQt5.QtGui import QIcon from PyQt5.QtGui import QIcon
from PyQt5.QtCore import Qt, QUrl from PyQt5.QtCore import Qt, QUrl
from quamash import QEventLoop from qasync import QEventLoop
from .display import DisplayProperty from .display import DisplayProperty
from .xrandr import XRandR from .xrandr import XRandR