lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/28652 )
Change subject: debian: rework packaging ......................................................................
debian: rework packaging
- use the rebar3' debian/rules as template - use override targets instead of the exact targets - only install the escriptize osmo_dia2gsup file
Related: SYS#6006 Change-Id: I40add168875de87ef0cc62deeb5377d2ce080e45 --- M contrib/systemd/osmo_dia2gsup.service M debian/osmo-diameter2gsup.install M debian/rules 3 files changed, 16 insertions(+), 16 deletions(-)
Approvals: daniel: Looks good to me, but someone else must approve lynxis lazus: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/contrib/systemd/osmo_dia2gsup.service b/contrib/systemd/osmo_dia2gsup.service index 3ae9b68..df56e71 100644 --- a/contrib/systemd/osmo_dia2gsup.service +++ b/contrib/systemd/osmo_dia2gsup.service @@ -7,7 +7,7 @@ Restart=always Environment="HOME=/var/lib/osmo_dia2gsup" ExecStartPre=/usr/bin/mkdir -p /var/lib/osmo_dia2gsup -ExecStart=/usr/bin/erl -noshell -sname osmo_dia2gsup -eval "osmo_dia2gsup:start()." +ExecStart=/usr/bin/osmo-dia2gsup RestartSec=2
[Install] diff --git a/debian/osmo-diameter2gsup.install b/debian/osmo-diameter2gsup.install index 6d442ad..398a000 100644 --- a/debian/osmo-diameter2gsup.install +++ b/debian/osmo-diameter2gsup.install @@ -1,2 +1,2 @@ /contrib/systemd/osmo_dia2gsup.service /lib/systemd/system/ -/_lib/* /usr/lib/erlang/lib/ +/_build/default/bin/osmo-dia2gsup /usr/bin/ diff --git a/debian/rules b/debian/rules index 607a359..22b84ed 100755 --- a/debian/rules +++ b/debian/rules @@ -1,18 +1,18 @@ #!/usr/bin/make -f - -build: - rebar3 compile - rebar3 escriptize - rebar3 eunit - for i in _build/default/lib/*; do \ - libdir=_lib/"$$(basename "$$i")"; \ - mkdir -pv "$$libdir"; \ - cp -rv "$$i/ebin" "$$libdir"; \ - done - find _lib -name .empty -delete - -clean: - rm -rf _build _lib +export DH_VERBOSE=1 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +include /usr/share/dpkg/default.mk +export ERL_COMPILER_OPTIONS=deterministic
%: dh $@ + +override_dh_auto_build: + dh_auto_build + rebar3 compile + rebar3 escriptize + rebar3 eunit + +override_dh_clean: + dh_clean + rm -rf _build