fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/37727?usp=email )
Change subject: Makefile: add 'install' target, clean up debian/rules ......................................................................
Makefile: add 'install' target, clean up debian/rules
Debian's dh_* scripts execute make commands by default, so we no longer need to override dh_* targets in debian/rules.
Related: OS#6148 Change-Id: I0769ca5f922a41f2b0976bf283176040aae4c781 --- M Makefile D debian/osmo-diameter2gsup.install M debian/rules 3 files changed, 10 insertions(+), 9 deletions(-)
Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified
diff --git a/Makefile b/Makefile index 940e06f..f08f388 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,8 @@ +# config file used by 'run' and 'shell' CONFIG ?= examples/sys.config +# directory paths for 'install' +BINDIR ?= /usr/bin +SYSTEMDUNITDIR ?= /lib/systemd/system/
all: build
@@ -18,6 +22,12 @@ analyze: rebar3 dialyzer
+install: build + install -Dm0755 _build/default/bin/osmo-dia2gsup \ + $(DESTDIR)$(BINDIR)/osmo-dia2gsup + install -Dm0644 contrib/systemd/osmo_dia2gsup.service \ + $(DESTDIR)$(SYSTEMDUNITDIR)/osmo_dia2gsup.service + clean: # Avoid running rebar3 clean if _build doesn't exist, since it would try # to fetch deps from the Internet and that may not be avaialble when in diff --git a/debian/osmo-diameter2gsup.install b/debian/osmo-diameter2gsup.install deleted file mode 100644 index 398a000..0000000 --- a/debian/osmo-diameter2gsup.install +++ /dev/null @@ -1,2 +0,0 @@ -/contrib/systemd/osmo_dia2gsup.service /lib/systemd/system/ -/_build/default/bin/osmo-dia2gsup /usr/bin/ diff --git a/debian/rules b/debian/rules index 69e31ed..ffd896c 100755 --- a/debian/rules +++ b/debian/rules @@ -10,10 +10,3 @@ override_dh_auto_build: if [ -e build_dep.tar.gz ] ; then tar xzf ./build_dep.tar.gz ; fi dh_auto_build - rebar3 compile - rebar3 escriptize - rebar3 eunit - -override_dh_clean: - dh_clean - rm -rf _build _checkouts