diff --git a/.gitignore b/.gitignore index 09659358..3d9c81b5 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,5 @@ doc/manuals/generated/ doc/manuals/osmomsc-usermanual.xml doc/manuals/common doc/manuals/build + +contrib/osmo-hlr.spec diff --git a/configure.ac b/configure.ac index 0e03ff0d..4ed6978b 100644 --- a/configure.ac +++ b/configure.ac @@ -200,6 +200,7 @@ AC_OUTPUT( contrib/Makefile contrib/systemd/Makefile contrib/dgsm/Makefile + contrib/osmo-hlr.spec tests/Makefile tests/auc/Makefile tests/auc/gen_ts_55_205_test_sets/Makefile diff --git a/contrib/osmo-hlr.spec b/contrib/osmo-hlr.spec.in similarity index 97% rename from contrib/osmo-hlr.spec rename to contrib/osmo-hlr.spec.in index 3b5a9fa9..bd1b278e 100644 --- a/contrib/osmo-hlr.spec +++ b/contrib/osmo-hlr.spec.in @@ -13,24 +13,22 @@ # 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-hlr -Version: 1.2.0.48 +Version: @VERSION@ Release: 0 Summary: Osmocom Home Location Register for GSUP protocol towards OsmoSGSN and OsmoCSCN License: AGPL-3.0-or-later AND GPL-2.0-or-later Group: Productivity/Telephony/Servers -URL: https://projects.osmocom.org/projects/osmo-hlr +URL: https://osmocom.org/projects/osmo-hlr Source: %{name}-%{version}.tar.xz BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: pkgconfig >= 0.20 -BuildRequires: python2 +BuildRequires: python3 +%if 0%{?suse_version} BuildRequires: systemd-rpm-macros +%endif BuildRequires: pkgconfig(libosmoabis) >= 0.6.0 BuildRequires: pkgconfig(libosmocore) >= 1.2.0 BuildRequires: pkgconfig(libosmoctrl) >= 1.2.0 @@ -40,6 +38,7 @@ BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(talloc) >= 2.0.1 # only needed for populate_hlr_db.pl Requires: libdbi-drivers-dbd-sqlite3 +%{?systemd_requires} %description The GSUP HLR is a stand-alone HLR (Home Location Register) for SIM @@ -128,6 +127,7 @@ find %{buildroot} -type f -name "*.la" -delete -print %check make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) +%if 0%{?suse_version} %preun %service_del_preun %{name}.service @@ -139,6 +139,7 @@ make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) %post %service_add_post %{name}.service +%endif %post -n libosmo-gsup-client0 -p /sbin/ldconfig %postun -n libosmo-gsup-client0 -p /sbin/ldconfig