-
Notifications
You must be signed in to change notification settings - Fork 0
/
rules
executable file
·39 lines (30 loc) · 1.06 KB
/
rules
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
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
# Uncomment this to change the hardening options
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
SCONS = scons
HASH := \#
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
SCONSFLAGS += -j$(NUMJOBS)
endif
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
%:
dh $@ --parallel
override_dh_auto_build:
SCONSFLAGS=$(SCONSFLAGS) $(SCONS)
$(MAKE) -C tools/bspc
override_dh_auto_install:
# Install into ./install/
SCONSFLAGS=$(SCONSFLAGS) $(SCONS) install
cp -a contrib/bobtoolz/bt install/modules/ # missing in SConscript.module
# bspc is "installed" in ./tools/bspc/
# Create language files from po/*.po into ./install/locale/
for pofile in po/*.po; do \
lang=$${pofile$(HASH)po/} && lang=$${lang%.po} && \
mkdir -p install/locale/$$lang/LC_MESSAGES && \
msgfmt -c "$$pofile" -o install/locale/$$lang/LC_MESSAGES/radiant.mo; \
done