1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/usr/bin/make -f
export PYBUILD_NAME=sos
export PYBUILD_DESTDIR=debian/$(PYBUILD_NAME)
build-pkgs := $(shell dh_listpackages)
%:
dh $@ --with python3 --buildsystem=pybuild
override_dh_install:
# Move config file to the right location.
mkdir -p debian/sos/etc/sos
mv debian/sos/usr/config/sos.conf debian/sos/etc/sos/sos.conf
# Remove unnecessary unused dir.
rm -rf debian/sos/usr/config
ifneq (,$(filter sosreport,${build-pkgs}))
mkdir -p debian/sosreport/usr/bin
install -p -m755 debian/bin.sosreport debian/sosreport/usr/bin/sosreport
install -p -m755 debian/bin.sos-collector debian/sosreport/usr/bin/sos-collector
endif
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
python3 -m unittest -v $(shell find tests/unittests -name "*_tests.py" -not -path "*policy_tests.py")
endif
|