Skip to content

Commit

Permalink
buster: build cleanups
Browse files Browse the repository at this point in the history
 * use := for PYTHON3
 * rearrange mlat-client rules to be simpler
 * simplify mlat-client cleanup to avoid invoking setup.py
  • Loading branch information
mutability committed Oct 17, 2023
1 parent f68be9d commit fa2249f
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions buster/rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

PYTHON3=/usr/bin/$(shell py3versions -d)
PYTHON3 := /usr/bin/$(shell py3versions -d)

VENV=$(CURDIR)/debian/venv

Expand All @@ -18,11 +18,11 @@ override http_proxy := http://127.0.0.1:9/
override https_proxy := http://127.0.0.1:9/
export http_proxy https_proxy

override_dh_auto_clean: clean_tcllauncher clean_dump1090 clean_mlat-client clean_venv clean_piaware clean_dump978
override_dh_auto_clean: clean_tcllauncher clean_dump1090 clean_mlat-client clean_piaware clean_dump978

override_dh_auto_configure: check_versions configure_tcllauncher

override_dh_auto_build: build_tcllauncher build_dump1090 setup_venv build_cxfreeze build_mlat-client build_dump978
override_dh_auto_build: build_tcllauncher build_dump1090 build_mlat-client build_dump978

override_dh_auto_install: install_tcllauncher install_dump1090 install_mlat-client install_piaware install_dump978

Expand Down Expand Up @@ -62,19 +62,15 @@ install_dump978:
install -d $(CURDIR)/debian/piaware/usr/lib/piaware/helpers
install -t $(CURDIR)/debian/piaware/usr/lib/piaware/helpers dump978/faup978

setup_venv:
build_mlat-client:
# setup venv for mlat-client build
$(PYTHON3) -m venv --system-site-packages --without-pip $(VENV)

clean_venv:
rm -fr $(VENV)

build_cxfreeze:
# build cxfreeze for later packaging of mlat-client
cd typing_extensions-3.6.5 && $(VENV)/bin/python setup.py install
cd zipp-0.5.0 && $(VENV)/bin/python setup.py install
cd importlib_metadata-4.3.1 && $(VENV)/bin/python setup.py install
cd cx_Freeze-6.8.3 && $(VENV)/bin/python setup.py install

build_mlat-client:
# build mlat-client proper
cd mlat-client && $(VENV)/bin/python setup.py install

install_mlat-client:
Expand All @@ -84,7 +80,12 @@ install_mlat-client:
cp -a $(CURDIR)/freeze-mlat-client/* $(CURDIR)/debian/piaware/usr/lib/piaware/helpers/

clean_mlat-client:
cd mlat-client && $(PYTHON3) setup.py clean -a
rm -fr mlat-client/build mlat-client/dist
rm -fr cx_Freeze-6.8.3/build cx_Freeze-6.8.3/dist
rm -fr importlib_metadata-4.3.1/build importlib_metadata-4.3.1/dist
rm -fr zipp-0.5.0/build zipp-0.5.0/dist
rm -fr typing_extensions-3.6.5/build typing_extensions-3.6.5/dist
rm -fr $(VENV)

install_piaware:
make -C piaware DESTDIR=$(CURDIR)/debian/piaware install INSTALL_SUDOERS=1 SYSTEMD= SYSVINIT= TCLLAUNCHER=$(CURDIR)/debian/piaware/usr/bin/tcllauncher
Expand Down

0 comments on commit fa2249f

Please sign in to comment.