File: rules

package info (click to toggle)
node-sqlite3 2.2.0%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,156 kB
  • ctags: 420
  • sloc: sql: 10,062; cpp: 1,881; makefile: 85; python: 8; sh: 1
file content (60 lines) | stat: -rwxr-xr-x 1,439 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/make -f
# -*- makefile -*-

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

ifndef UPVER
UPVER := $(shell dpkg-parsechangelog -SVersion | cut -d- -f1 | cut -d+ -f1)
endif

DSVER := $(shell dpkg-parsechangelog -SVersion | cut -d- -f1 | cut -d+ -f2)

TARDIR := node-sqlite3-$(UPVER)
TARNAME := node-sqlite3_$(UPVER)+$(DSVER).orig.tar


%:
	dh $@

override_dh_install:
	dh_install
	dh_buildinfo
	chrpath -d $(CURDIR)/debian/node-sqlite3/usr/lib/nodejs/sqlite3/lib/node_sqlite3.node
	chmod 644 $(CURDIR)/debian/node-sqlite3/usr/lib/nodejs/sqlite3/lib/node_sqlite3.node

override_dh_auto_configure:
	node-gyp configure --sqlite=external

override_dh_auto_build:
	node-gyp build

override_dh_auto_test:

override_dh_shlibdeps:
	dpkg-shlibdeps \
		-T$(CURDIR)/debian/node-sqlite3.substvars \
		$(CURDIR)/debian/node-sqlite3/usr/lib/nodejs/sqlite3/lib/node_sqlite3.node

override_dh_strip:
	strip \
		--remove-section=.comment \
		--remove-section=.note \
		--strip-unneeded \
		$(CURDIR)/debian/node-sqlite3/usr/lib/nodejs/sqlite3/lib/node_sqlite3.node

get-orig-source:
	mkdir -p ../tarballs
	uscan \
		--verbose \
		--download-version $(UPVER) \
		--force-download \
		--destdir ../tarballs \
		--rename
	tar xvf ../tarballs/node-sqlite3_$(UPVER).orig.tar.gz
	@echo Repackaging
	rm -rf $(TARDIR)/deps/sqlite-*.tar.gz
	tar cf $(TARNAME) $(TARDIR)/
	rm -rf $(TARDIR)/
	gzip -9 $(TARNAME)
	mv $(TARNAME).gz ../tarballs/