File: rules

package info (click to toggle)
node-leveldown 1.5.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 420 kB
  • ctags: 248
  • sloc: cpp: 1,844; sh: 75; makefile: 21
file content (36 lines) | stat: -rwxr-xr-x 796 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
30
31
32
33
34
35
36
#!/usr/bin/make -f
# -*- makefile -*-

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

SHLIBSDIR = debian/node-leveldown/usr/lib/nodejs/leveldown/build
SHLIBS = leveldown.node

%:
	dh $@ --with nodejs

override_dh_auto_build:
	node-gyp configure build

override_dh_auto_clean:
	node-gyp clean

override_dh_auto_test:
	echo "Skipping tests; test dependencies not yet in debian"

# rename .node to .so so they are detected by dh_strip dh_shlibdeps etc
override_dh_install:
	dh_install
	cd $(SHLIBSDIR) && { \
	  chmod -x $(SHLIBS); \
	  for i in $(SHLIBS); do mv "$$i" "$${i%.node}.so"; done; }

# restore .node name
override_dh_shlibdeps:
	dh_shlibdeps
	cd $(SHLIBSDIR) && { \
	  mv leveldown.so leveldown.node; }

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG.md