File: rules

package info (click to toggle)
nodejs 0.10.29~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 32,760 kB
  • ctags: 58,506
  • sloc: cpp: 330,356; ansic: 47,440; python: 12,756; sh: 1,365; makefile: 665; lisp: 222; ruby: 76; xml: 16; awk: 10
file content (64 lines) | stat: -rwxr-xr-x 2,571 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

# recent OpenSSL needed because... FIXME (git commit c232e17)
ssl-minver = 1.0.0g

# Needed by upstream build
#  * recent gyp needed to build using flock
bdeps = binutils, openssl (>= $(ssl-minver)), pkg-config
bdeps +=, bash-completion, curl, procps, zlib1g-dev
bdeps +=, libkvm-dev [kfreebsd-any], gyp (>= 0.1~svn1654)

# Needed by upstream build and binary development package
#  * recent libv8 because... FIXME (git commit eb490ef)
#  * recent libc-ares because... FIXME (git commit ccad613)
deps = python, libv8-3.14-dev (>= 3.7), libssl-dev (>= $(ssl-minver))
deps +=, libc-ares-dev (>= 1.7.5), ca-certificates

CDBS_BUILD_DEPENDS +=, $(bdeps), $(deps)
CDBS_DEPENDS_nodejs-dev = $(deps)

# suppress checking binary files, to not upset dpkg-source
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(doc/trademark-policy\.pdf|doc/mac_osx_nodejs_installer_logo\.png|doc/.*-white-stripe\.jpg|favicon\.ico|deps/v8/benchmarks/v8-logo\.png|test/fixtures/person\.jpg.*|src/res/node\.ico|debian/(changelog|copyright(|_hints|_newhints)))$

DEB_CONFIGURE_NORMAL_ARGS =
DEB_CONFIGURE_EXTRA_FLAGS = --without-npm --shared-v8 --without-snapshot --shared-cares --shared-openssl --shared-zlib --prefix=/usr

DEB_DESTDIR = $(CURDIR)/debian/tmp
DEB_MAKE_CLEAN_TARGET = clean
#  * relax regression tests when targeted experimental suite
exp-relax-check := $(if $(shell dpkg-parsechangelog | grep -x 'Distribution: \(experimental\|UNRELEASED\)'),-i)
DEB_MAKE_CHECK_TARGET = $(exp-relax-check) test-simple test-message

ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
DEB_CONFIGURE_EXTRA_FLAGS += --dest-os=kfreebsd
endif

# hardening gyp
CXXFLAGS+=$(CPPFLAGS)
export CXXFLAGS
export LDFLAGS

# properly clean files from build, test, python
clean::
	rm -f config.gypi
	rm -f config.mk
	rm -f test/fixtures/hello.txt
	rm -rf test/tmp
	find . -name "*.pyc" -delete
	rm -rf out

binary-post-install/nodejs::
	mv debian/nodejs/usr/bin/node debian/nodejs/usr/bin/nodejs
	mv debian/nodejs/usr/share/man/man1/node.1 debian/nodejs/usr/share/man/man1/nodejs.1

# remove *.json files from documentation
# remove all <script> tags from html files, js files are not installed anyway
# TODO: when doc will be generated from markdown, patch doc/template.html instead
binary-install/nodejs::
	find debian/nodejs/usr/share/doc/nodejs -name *.json -delete
	sed -i -n '1h; 1!H; $${g; s/<script[^><]*>[^><]*<.script[^><]*>//g; p;}' debian/nodejs/usr/share/doc/nodejs/api/*.html