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
This commit is contained in:
Alexander Couzens 2022-07-19 11:32:40 +02:00 committed by lynxis lazus
parent a9faa72537
commit 700979a5b1
3 changed files with 16 additions and 16 deletions

View File

@ -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]

View File

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

28
debian/rules vendored
View File

@ -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