Switch to running from source for dpkg

develop
knotteye 2021-04-25 14:37:04 -05:00
parent 51eea001d7
commit a82116b1b5
4 changed files with 25 additions and 13 deletions

View File

@ -10,7 +10,7 @@ all: default pack
systemlibs: systemlibtarget pack systemlibs: systemlibtarget pack
dpkg: debtarget pack dpkg-build dpkg: debtarget dpkg-build
windows: wtarget wpack windows: wtarget wpack
@ -18,9 +18,25 @@ default:
python3 -m nuitka --follow-imports --file-reference-choice=runtime --include-module=certifi --include-module=keyring.backends.kwallet --include-module=keyring.backends.chainer --enable-plugin=qt-plugins --include-qt-plugins=all --python-flag=-O -o plchat plchat.py python3 -m nuitka --follow-imports --file-reference-choice=runtime --include-module=certifi --include-module=keyring.backends.kwallet --include-module=keyring.backends.chainer --enable-plugin=qt-plugins --include-qt-plugins=all --python-flag=-O -o plchat plchat.py
debtarget: debtarget:
cat deb.patch > plchatdeb.py mkdir -p deb/usr/lib/plchat
cat plchat.py >> plchatdeb.py echo "#!/usr/lib/plchat/venv/bin/python" > deb/usr/lib/plchat/plchatdeb.py
python3 -m nuitka --follow-imports --file-reference-choice=runtime --nofollow-import-to=certifi --include-module=keyring.backends.kwallet --include-module=keyring.backends.chainer --enable-plugin=qt-plugins --include-qt-plugins=all --python-flag=-O -o plchat plchatdeb.py echo "" >> deb/usr/lib/plchat/plchatdeb.py
cat plchat.py >> deb/usr/lib/plchat/plchatdeb.py
chmod +x deb/usr/lib/plchat/plchatdeb.py
cp fedi.svg deb/usr/lib/plchat
cp fedi.ico deb/usr/lib/plchat
cp send.svg deb/usr/lib/plchat
cp unread.svg deb/usr/lib/plchat
cp README.md deb/usr/lib/plchat
cp LICENSE deb/usr/lib/plchat
cp COPYING deb/usr/lib/plchat
cp audiowidget.py deb/usr/lib/plchat
cp misc.py deb/usr/lib/plchat
cp pleroma.py deb/usr/lib/plchat
cp monkeypatch.py deb/usr/lib/plchat
cp timeconvert.py deb/usr/lib/plchat
cp plchatdeb.py deb/usr/lib/plchat
cp videowidget.py deb/usr/lib/plchat
systemlibtarget: systemlibtarget:
python3 -m nuitka --file-reference-choice=runtime --nofollow-imports --follow-import-to=misc --follow-import-to=monkeypatch --follow-import-to=pleroma --follow-import-to=timeconvert --follow-import-to=videowidget --follow-import-to=audiowidget --python-flag=-O -o plchat plchat.py python3 -m nuitka --file-reference-choice=runtime --nofollow-imports --follow-import-to=misc --follow-import-to=monkeypatch --follow-import-to=pleroma --follow-import-to=timeconvert --follow-import-to=videowidget --follow-import-to=audiowidget --python-flag=-O -o plchat plchat.py
@ -47,8 +63,6 @@ pack:
cp COPYING dist cp COPYING dist
dpkg-build: dpkg-build:
mkdir -p deb/usr/lib
mv dist deb/usr/lib/plchat
dpkg --build deb dpkg --build deb
mv deb.deb plchat.deb mv deb.deb plchat.deb

View File

@ -1,2 +0,0 @@
import sys
sys.path.insert(1, '/usr/lib/plchat/venv/lib/python3.8/site-packages')

View File

@ -2,10 +2,10 @@ Package: plchat
Version: 1.0.2 Version: 1.0.2
Section: net Section: net
Priority: optional Priority: optional
Architecture: amd64 Architecture: all
Description: A pleroma chat client Description: A pleroma chat client
Homepage: https://git.waldn.net/git/knotteye/plchat Homepage: https://git.waldn.net/git/knotteye/plchat
Maintainer: Knott Eye <knotteye@airmail.cc> Maintainer: Knott Eye <knotteye@airmail.cc>
Pre-Depends: python3 (>= 3.8.0~), python3-pip (>= 19.3), python3-venv, bash Pre-Depends: python3 (>= 3.8.0~), python3-pip (>= 19.3), python3-venv, bash
Depends: dbus, libmagic1, libc6, gstreamer1.0-nice, gstreamer1.0-libav, gstreamer1.0-plugins-bad, gstreamer1.0-plugins-good, gstreamer1.0-plugins-ugly, gstreamer1.0-qt5, gstreamer1.0-plugins-base, gstreamer1.0-python3-plugin-loader Depends: dbus, libmagic1, libc6, gstreamer1.0-nice, gstreamer1.0-libav, gstreamer1.0-plugins-bad, gstreamer1.0-plugins-good, gstreamer1.0-plugins-ugly, gstreamer1.0-qt5, gstreamer1.0-plugins-base, gstreamer1.0-python3-plugin-loader, python3-keyring, python3-appdirs, python3-magic, python3-dateutil, python3-websockets, python3-requests, python3-dateutil, python3-urllib3
Suggests: gnome-keyring Suggests: gnome-keyring

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
mkdir -p /usr/lib/plchat mkdir -p /usr/lib/plchat
cd /usr/lib/plchat cd /usr/lib/plchat
python3 -m venv venv python3 -m venv --system-site-packages venv
source venv/bin/activate source venv/bin/activate
pip3 install PyQt5==5.15.4 PyQt5-Qt5 PyQt5-sip certifi cryptography pip3 install PyQt5==5.15.4 PyQt5-Qt5 PyQt5-sip notify-py
ln -sf /usr/lib/plchat/plchat /usr/bin/plchat ln -sf /usr/lib/plchat/plchatdeb.py /usr/bin/plchat