WIP: packaging

Change-Id: Ic55bca1260f992d0ed8583e7c7fe948ba0160d4d
This commit is contained in:
Oliver Smith 2022-07-14 12:37:13 +02:00
parent 9491cf41d0
commit dd18739704
10 changed files with 80 additions and 0 deletions

8
.gitignore vendored
View File

@ -9,3 +9,11 @@ erl_crash.dump
src/diameter_3gpp*
src/diameter_rfc*
src/diameter_etsi*
/rebar3
/debian/*.debhelper
/debian/files
/debian/osmo-diameter2gsup.substvars
/debian/osmo-diameter2gsup/
/debian/debhelper-build-stamp

View File

@ -0,0 +1,13 @@
[Unit]
Description=Osmocom DIAMETER to GSUP translator
[Service]
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()."
RestartSec=2
[Install]
WantedBy=multi-user.target

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
osmo-diameter2gsup (0.0.1) UNRELEASED; urgency=medium
* Initial release. (Closes: #XXXXXX)
-- Harald Welte <lafore@gnumonks.org> Tue, 12 Jul 2022 17:51:01 +0200

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
10

16
debian/control vendored Normal file
View File

@ -0,0 +1,16 @@
Source: osmo-diameter2gsup
Maintainer: Osmocom Community <openbsc@lists.osmocom.org>
Section: net
Priority: optional
Build-Depends: erlang,
libpcap-dev,
Standards-Version: 4.5.0
Package: osmo-diameter2gsup
Architecture: any
Depends: erlang
Multi-Arch: allowed
Description: Osmocom DIAMETER to GSUP translator
This can be used to translate DIAMETER requests (such as those by an EPC)
to the Osmocom specific GSUP protocol, which means you can use OsmoHLR
as a simplistic HSS.

1
debian/dh-rebar.conf vendored Normal file
View File

@ -0,0 +1 @@
EXEC_REBAR_COMMANDS=compile eunit

14
debian/download_rebar3.sh vendored Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh -e
# HACK: rebar3 is not packaged for debian 11, and building it requires rebar3
# itself.
REBAR3_VERSION=3.19.0
if [ -x ./rebar3 ]; then
echo "rebar3 already downloaded"
exit 0
fi
set -x
wget -q "https://github.com/erlang/rebar3/releases/download/$REBAR3_VERSION/rebar3"
chmod +x rebar3

2
debian/osmo-diameter2gsup.install vendored Normal file
View File

@ -0,0 +1,2 @@
/contrib/systemd/osmo_dia2gsup.service /lib/systemd/system/
/_lib/* /usr/lib/erlang/lib/

19
debian/rules vendored Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/make -f
build:
debian/download_rebar3.sh
./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 $@

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (native)