File: rules

package info (click to toggle)
stylish 1.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,156 kB
  • ctags: 334
  • sloc: makefile: 19
file content (29 lines) | stat: -rwxr-xr-x 1,013 bytes parent folder | download
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

IDLDIR=$(shell pkg-config libxul --variable=idldir)
SDKDIR=$(shell pkg-config libxul --variable=sdkdir)
IDL_FILES=$(notdir $(wildcard idl/*.idl))
XPT_FILES=$(addprefix components/, $(IDL_FILES:.idl=.xpt))

%:
	dh $@ --with xul-ext --buildsystem=xul_ext --parallel

$(XPT_FILES):
	python $(SDKDIR)/sdk/bin/typelib.py -I $(IDLDIR) -o $@ $(addprefix idl/,$(notdir $(@:.xpt=.idl)))

override_dh_auto_build: $(XPT_FILES)
	dh_auto_build

override_dh_builddeb:
	dh_builddeb -- -Zxz

PKD  = $(abspath $(dir $(MAKEFILE_LIST)))
PKG  = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{Version:\s*([\d\.+git]+)}')
.PHONY: get-orig-source
get-orig-source:  $(info I: $(PKG)_$(VER))
	@echo "# Downloading..."
	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)