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
changes/52/28652/3
Alexander Couzens 6 months ago committed by lynxis lazus
parent a9faa72537
commit 700979a5b1
  1. 2
      contrib/systemd/osmo_dia2gsup.service
  2. 2
      debian/osmo-diameter2gsup.install
  3. 24
      debian/rules

@ -7,7 +7,7 @@ Type=simple
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]

@ -1,2 +1,2 @@
/contrib/systemd/osmo_dia2gsup.service /lib/systemd/system/
/_lib/* /usr/lib/erlang/lib/
/_build/default/bin/osmo-dia2gsup /usr/bin/

24
debian/rules vendored

@ -1,18 +1,18 @@
#!/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
build:
%:
dh $@
override_dh_auto_build:
dh_auto_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
%:
dh $@
override_dh_clean:
dh_clean
rm -rf _build

Loading…
Cancel
Save