| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
#export DH_VERBOSE=1 |
| 4 |
|
| 5 |
bridgeCstrDir:=libervia/backend/bridge/bridge_constructor |
| 6 |
export PYTHONPATH=$(CURDIR)/sat_tmp:$(CURDIR) |
| 7 |
export XDG_DATA_HOME=$(CURDIR)/.local/share |
| 8 |
|
| 9 |
# Install scripts in different directory than libs because entrypoint |
| 10 |
# sat collides with directory sat. |
| 11 |
PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/libervia/ --install-scripts=/launchers/ |
| 12 |
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) |
| 13 |
PYBUILD_INSTALL_ARGS+=--verbose |
| 14 |
endif |
| 15 |
export PYBUILD_INSTALL_ARGS |
| 16 |
export PYBUILD_TEST_PYTEST=1 |
| 17 |
export PYBUILD_TEST_ARGS=tests/unit/ |
| 18 |
|
| 19 |
%: |
| 20 |
dh $@ --with sphinxdoc --buildsystem=pybuild |
| 21 |
|
| 22 |
execute_before_dh_auto_build: |
| 23 |
cd $(bridgeCstrDir) && \ |
| 24 |
ln -s ../../../../libervia/ . && \ |
| 25 |
./bridge_constructor.py --side core --force && \ |
| 26 |
mv generated/dbus_bridge.py .. && \ |
| 27 |
./bridge_constructor.py --protocole pb --side core --force && \ |
| 28 |
mv generated/pb.py .. && \ |
| 29 |
./bridge_constructor.py --side frontend --force && \ |
| 30 |
mv generated/dbus_bridge.py ../../../frontends/bridge && \ |
| 31 |
./bridge_constructor.py --protocole pb --side frontend --force && \ |
| 32 |
mv generated/pb.py ../../../frontends/bridge |
| 33 |
rm -f $(bridgeCstrDir)/libervia |
| 34 |
|
| 35 |
execute_after_dh_auto_build: |
| 36 |
$(MAKE) -C doc html |
| 37 |
|
| 38 |
execute_after_dh_auto_install: |
| 39 |
find sat_tmp \( -name LICENSE -o -name README \) -delete |
| 40 |
cp -rap $(CURDIR)/sat_tmp/ $(CURDIR)/debian/tmp/usr/share/libervia/ |
| 41 |
mv $(CURDIR)/debian/tmp/usr/lib/python3.*/dist-packages/libervia/backend/core/launcher.py \ |
| 42 |
$(CURDIR)/debian/tmp/usr/share/libervia/ |
| 43 |
find debian -name __pycache__ -type d | xargs rm -rf |
| 44 |
rm -r $(CURDIR)/debian/tmp/usr/lib/python3.*/dist-packages/libervia/backend/test/ |
| 45 |
rm -r $(CURDIR)/debian/tmp/usr/share/libervia/sat_tmp/wokkel/test/ |
| 46 |
|
| 47 |
execute_after_dh_fixperms: |
| 48 |
chmod +x $(CURDIR)/debian/libervia-backend/usr/share/libervia/launcher.py |