File: rules

package info (click to toggle)
cockpit-podman 120-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 271,812 kB
  • sloc: javascript: 695,724; cpp: 11,141; python: 7,762; sh: 901; makefile: 156; xml: 90
file content (29 lines) | stat: -rwxr-xr-x 807 bytes parent folder | download | duplicates (8)
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

# Ubuntu 22.04 LTS's node.js version 12 is too old to understand our source, so
# keep the pre-built dist/ for that release only
KEEP_DIST = $(filter $(shell . /etc/os-release; echo $${VERSION_ID:-unstable}),22.04)

export PREFIX=/usr

%:
	dh $@

ifeq ($(KEEP_DIST),)
override_dh_auto_build:
	# upstream releases include a pre-built dist/, rebuild it
	rm -fr dist/
	# HACK: names for additional tarballs can't contain '_', so we name it just "orig-node"
	ln -fs node node_modules
	NODE_ENV=production ./build.js
else
override_dh_auto_clean:
	# don't call `make clean`, in Ubuntu 22.04 dist/ is precious
endif

execute_after_dh_auto_clean:
	rm -f po/LINGUAS
	if [ -L node_modules ]; then rm node_modules; fi

override_dh_auto_test:
	# don't call `make check`, these are integration tests