File: rules

package info (click to toggle)
sks 1.1.6+git20200620.9e9d504-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 69,852 kB
  • sloc: ml: 15,197; ansic: 1,064; sh: 367; makefile: 331; python: 25
file content (39 lines) | stat: -rwxr-xr-x 1,115 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
#!/usr/bin/make -f
TMP     =$(CURDIR)/debian/sks

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

OCAMLABI = $(shell ocamlc -version)
BYTECODE = $(shell [ -x /usr/bin/ocamlopt ] || echo yes)
prebuild = $(if $(BYTECODE),bdb/bdb.cma,bdb/bdb.cmxa)
all      = $(if $(BYTECODE),all.bc,all)
OCAMLRUN = $(if $(BYTECODE),ocaml-base-nox-$(OCAMLABI))

export DEB_BUILD_OPTIONS += $(if $(BYTECODE)," nostrip",)

BDB_VERSION ?= $(shell LC_ALL=C dpkg-query -l 'libdb[45].[0-9]-dev' | grep ^.i | sed -e 's|.*\s\libdb\([45]\.[0-9]\)-dev\s.*|\1|')

%:
	dh  $@ --with=ocaml

override_dh_auto_clean:
	cp debian/Makefile.local ./Makefile.local
	dh_auto_clean

override_dh_auto_build:
	cp debian/Makefile.local ./Makefile.local
	make dep
#	Check that we have a value for BDB_VERSION
	[ -n "$(BDB_VERSION)" ]
	echo $(BDB_VERSION) > debian/berkeley_db.txt
	dh_auto_build -v -- $(prebuild)
	dh_auto_build -v -- $(all)
	$(if $(BYTECODE), $(foreach x, sks sks_add_mail, mv $(x).bc $(x);))
	chmod a+x sks_build.sh

override_dh_auto_install:

override_dh_gencontrol:
	dh_gencontrol -- -Vbdb:Depends="db$(BDB_VERSION)-util"

override_dh_dwz: