File: rules

package info (click to toggle)
erlang-p1-mysql 1.0.1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 172 kB
  • ctags: 172
  • sloc: erlang: 973; makefile: 20
file content (22 lines) | stat: -rwxr-xr-x 635 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/make -f
#export DH_VERBOSE=1

include /usr/share/dpkg/default.mk

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


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


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