-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathrules
More file actions
executable file
·66 lines (53 loc) · 2.1 KB
/
rules
File metadata and controls
executable file
·66 lines (53 loc) · 2.1 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKE_FLAGS += -j$(NUMJOBS)
endif
KVERSION ?= $(shell uname -r)
KERNEL_SRC := /lib/modules/$(KVERSION)
MOD_SRC_DIR := $(shell pwd)
export INSTALL_MOD_DIR := extra
export KBUILD_EXTRA_SYMBOLS := $(KERNEL_SRC)/Module.symvers.PDDF
PACKAGE_PRE_NAME := platform-modules
MODULE_DIRS := dx010 haliburton silverstone seastone2 ds1000 questone2 silverstone-v2 ds2000 ds3000
%:
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_configure:
(set -e; for mod in $(MODULE_DIRS); do \
if [ -f $(MOD_SRC_DIR)/$${mod}/setup.py ]; then \
PYBUILD_NAME=$${mod} pybuild --configure -d $${mod}; \
fi; \
done)
override_dh_auto_build:
(set -e; for mod in $(MODULE_DIRS); do \
$(MAKE) $(MAKE_FLAGS) -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules modules; \
if [ -f $(MOD_SRC_DIR)/$${mod}/setup.py ]; then \
PYBUILD_NAME=$${mod} pybuild --build -d $${mod}; \
fi; \
if [ -f $(MOD_SRC_DIR)/$${mod}/pddf/setup.py ]; then \
python3 -m build --no-isolation --wheel --outdir $(MOD_SRC_DIR)/build-$${mod} $(MOD_SRC_DIR)/$${mod}/pddf; \
echo "Finished making pddf whl package for $$mod"; \
fi; \
done)
override_dh_usrlocal:
# Ignore making directories
override_dh_auto_test:
# No tests to run
override_dh_auto_install:
(set -e; for mod in $(MODULE_DIRS); do \
$(MAKE) -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules INSTALL_MOD_PATH=$(MOD_SRC_DIR)/debian/$(PACKAGE_PRE_NAME)-$${mod} modules_install; \
if [ -f $(MOD_SRC_DIR)/$${mod}/setup.py ]; then \
PYBUILD_NAME=$${mod} pybuild --install -d $${mod} --dest-dir debian/$(PACKAGE_PRE_NAME)-$${mod}; \
fi; \
done)
override_dh_auto_clean:
(set -e; for mod in $(MODULE_DIRS); do \
rm -rf $(MOD_SRC_DIR)/build-$${mod}; \
$(MAKE) clean -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \
if [ -f $(MOD_SRC_DIR)/$${mod}/setup.py ]; then \
PYBUILD_NAME=$${mod} pybuild --clean -d $${mod}; \
fi; \
done)
dh_clean