File: rules

package info (click to toggle)
node-leveldown 1.5.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 424 kB
  • sloc: cpp: 1,844; sh: 75; makefile: 22
file content (37 lines) | stat: -rwxr-xr-x 830 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
37
#!/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
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

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