diff --git a/.gitignore b/.gitignore index e32000c8..7041f69c 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,5 @@ doc/manuals/build doc/manuals/common doc/manuals/generated doc/manuals/*.pdf + +contrib/osmo-iuh.spec diff --git a/configure.ac b/configure.ac index 1875d5e7..692db57e 100644 --- a/configure.ac +++ b/configure.ac @@ -167,4 +167,5 @@ AC_OUTPUT( doc/manuals/Makefile contrib/Makefile contrib/systemd/Makefile + contrib/osmo-iuh.spec ) diff --git a/contrib/osmo-iuh.spec b/contrib/osmo-iuh.spec.in similarity index 95% rename from contrib/osmo-iuh.spec rename to contrib/osmo-iuh.spec.in index e2abd35d..82046fef 100644 --- a/contrib/osmo-iuh.spec +++ b/contrib/osmo-iuh.spec.in @@ -12,17 +12,13 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ -# - - Name: osmo-iuh -Version: 0.6.0.13 +Version: @VERSION@ Release: 0 Summary: Osmocom code for the Iuh interface (HNBAP, RUA, RANAP) License: AGPL-3.0-or-later AND GPL-2.0-or-later Group: Hardware/Mobile -URL: https://osmocom.org/projects/osmohnbgw/wiki +URL: https://osmocom.org/projects/osmohnbgw Source: %{name}-%{version}.tar.xz BuildRequires: automake >= 1.9 BuildRequires: libtool >= 2 @@ -30,6 +26,9 @@ BuildRequires: lksctp-tools-devel BuildRequires: pkgconfig >= 0.20 # python3 for asn1tostruct.py BuildRequires: python3 +%if 0%{?suse_version} +BuildRequires: systemd-rpm-macros +%endif BuildRequires: pkgconfig(libasn1c) >= 0.9.30 BuildRequires: pkgconfig(libosmo-netif) >= 0.3.0 BuildRequires: pkgconfig(libosmo-sigtran) >= 0.10.0 @@ -38,6 +37,7 @@ BuildRequires: pkgconfig(libosmoctrl) >= 0.12.0 BuildRequires: pkgconfig(libosmogb) BuildRequires: pkgconfig(libosmogsm) >= 0.12.0 BuildRequires: pkgconfig(libosmovty) >= 0.12.0 +%{?systemd_requires} %description Osmocom code for the Iuh interface (HNBAP, RUA, RANAP) @@ -103,10 +103,13 @@ make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) %postun -n libosmo-ranap3 -p /sbin/ldconfig %post -n libosmo-sabp0 -p /sbin/ldconfig %postun -n libosmo-sabp0 -p /sbin/ldconfig + +%if 0%{?suse_version} %pre %service_add_pre osmo-hnbgw.service %post %service_add_post osmo-hnbgw.service %preun %service_del_preun osmo-hnbgw.service %postun %service_del_postun osmo-hnbgw.service +%endif %files %license COPYING