plchat/Makefile

64 lines
2.2 KiB
Makefile
Raw Permalink Normal View History

2021-04-15 15:16:38 -05:00
ifeq ($(PREFIX),)
2021-04-17 12:38:40 -05:00
PREFIX := /usr/local/
endif
ifeq ($(LIBDIR),)
LIBDIR := lib/
2021-04-15 15:16:38 -05:00
endif
2021-04-17 23:39:30 -05:00
PRODUCTVER=0101
2021-04-15 15:16:38 -05:00
2021-04-16 20:59:52 -05:00
all: default pack
fresh: clean default pack
systemlibs: systemlibtarget pack
2021-04-18 19:57:22 -05:00
deb: debtarget pack packdeb
2021-04-17 15:31:25 -05:00
windows: windowstarget
2021-04-16 20:59:52 -05:00
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
2021-04-17 15:31:25 -05:00
windowstarget:
2021-04-18 12:41:45 -05:00
python3 -m nuitka --follow-imports --include-module=win32ctypes --enable-plugin=qt-plugins --include-qt-plugins=all --windows-disable-console --windows-icon-from-ico=fedi.ico --windows-company-name=plchat --windows-product-name=plchat --windows-product-version=$(PRODUCTVER) --python-flag=-O -o plchat plchat.py
2021-04-16 20:59:52 -05:00
2021-04-18 19:57:22 -05:00
debtarget:
echo "You will need to make .deb packages using bash, ensuring you are doing so."
2021-04-18 19:57:22 -05:00
sudo ./deb/DEBIAN/postinst
source /usr/lib/plchat/venv/bin/activate
pip3 install keyring notify-py appdirs python-dateutil requests urllib3 websockets PyQt5 python-magic
python3 -m nuitka --file-reference-choice=runtime --follow-imports --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
2021-04-18 19:57:22 -05:00
2021-04-16 20:59:52 -05:00
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
2021-04-16 20:59:52 -05:00
pack:
mkdir dist
mv plchat dist
cp fedi.svg dist
cp fedi.ico dist
cp send.svg dist
cp unread.svg dist
2021-04-17 15:31:25 -05:00
cp README.md dist
cp LICENSE dist
cp COPYING dist
2021-04-16 20:59:52 -05:00
2021-04-18 19:57:22 -05:00
packdeb:
mkdir -p deb/usr/lib/plchat
mv dist deb/usr/lib/plchat
dpkg --build deb
mv deb.deb plchat.deb
2021-04-16 20:59:52 -05:00
clean:
2021-04-16 22:22:31 -05:00
rm -r dist || true
install:
2021-04-17 12:38:40 -05:00
mkdir $(PREFIX)$(LIBDIR)
install dist/plchat $(PREFIX)$(LIBDIR)
install dist/fedi.ico $(PREFIX)$(LIBDIR)
install dist/fedi.svg $(PREFIX)$(LIBDIR)
install dist/send.svg $(PREFIX)$(LIBDIR)
install dist/unread.svg $(PREFIX)$(LIBDIR)
2021-04-18 12:41:45 -05:00
ln -sf $(PREFIX)$(LIBDIR)plchat $(PREFIX)bin/plchat