aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2022-07-14 12:37:13 +0200
committerOliver Smith <osmith@sysmocom.de>2022-07-15 15:08:51 +0200
commit173095f9fafcd43828e709a5ce965e81d4b61b99 (patch)
tree0987cba422c840c767e263fd13594f30ce8ba84a /debian
parent9491cf41d08cdb1dd3d1a2cf922dd0bdba9209cf (diff)
debian: add packaging
Add initial debian packaging and a systemd service that starts osmo_dia2gsup. Given that dependencies listed in rebar.lock are not packaged in debian 11, this just uses rebar3 to download and compile the dependencies during the build. Resulting erlang files are installed to the following path, where they become available in the erlang shell (erl): /lib/erlang/lib/{name_of_component}/ebin/ Related: SYS#6006 Change-Id: Ic55bca1260f992d0ed8583e7c7fe948ba0160d4d
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog5
-rw-r--r--debian/compat1
-rw-r--r--debian/control17
-rw-r--r--debian/osmo-diameter2gsup.install2
-rwxr-xr-xdebian/rules18
-rw-r--r--debian/source/format1
6 files changed, 44 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..6e45d35
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+osmo-diameter2gsup (0.1.0) unstable; urgency=medium
+
+ * Initial release.
+
+ -- Oliver Smith <osmith@sysmocom.de> Wed, 14 Jul 2022 14:51:01 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..7d5b6a7
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,17 @@
+Source: osmo-diameter2gsup
+Maintainer: Osmocom Community <openbsc@lists.osmocom.org>
+Section: net
+Priority: optional
+Build-Depends: erlang-nox,
+ libpcap-dev,
+ rebar3,
+Standards-Version: 4.5.0
+
+Package: osmo-diameter2gsup
+Architecture: any
+Depends: erlang-nox
+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.
diff --git a/debian/osmo-diameter2gsup.install b/debian/osmo-diameter2gsup.install
new file mode 100644
index 0000000..6d442ad
--- /dev/null
+++ b/debian/osmo-diameter2gsup.install
@@ -0,0 +1,2 @@
+/contrib/systemd/osmo_dia2gsup.service /lib/systemd/system/
+/_lib/* /usr/lib/erlang/lib/
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..607a359
--- /dev/null
+++ b/debian/rules
@@ -0,0 +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
+
+%:
+ dh $@
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)