File: rules

package info (click to toggle)
erlang-p1-sip 1.0.41-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 784 kB
  • sloc: erlang: 4,099; ansic: 367; makefile: 63
file content (34 lines) | stat: -rwxr-xr-x 898 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/make -f
export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/default.mk
export ERL_COMPILER_OPTIONS=deterministic

DESTDIR=$(CURDIR)/debian/erlang-p1-sip


%:
	dh $@ --buildsystem=rebar --with rebar


override_dh_auto_configure:
	./configure
	dh_auto_configure


override_dh_auto_install:
	rm -rf ebin/examples
	dh_auto_install
	for file in include/*.hrl priv/lib/*.so; do \
		fname=$$(basename $${file}) ; \
		subdir=$$(dirname $${file}) ; \
		if [ ! -f $(DESTDIR)/usr/lib/erlang/lib/p1_sip-$(DEB_VERSION_UPSTREAM)/$${subdir}/$${fname} ] ; then \
			install -m 755 -d $(DESTDIR)/usr/lib/erlang/lib/p1_sip-$(DEB_VERSION_UPSTREAM)/$${subdir} ; \
			install -m 644 $${file} $(DESTDIR)/usr/lib/erlang/lib/p1_sip-$(DEB_VERSION_UPSTREAM)/$${subdir} ; \
		fi ; \
	done


override_dh_auto_clean:
	rm -f config.log config.status vars.config
	dh_auto_clean