blob: f3085e781c286e36a09d8b33e4991a3c099250c3 [file] [log] [blame]
Oliver Smith2f7fb2e2020-05-14 11:45:19 +02001#
2# spec file for package osmo-hlr
3#
4# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
5# Copyright (c) 2016, Martin Hauke <mardnh@gmx.de>
6#
7# All modifications and additions to the file contributed by third parties
8# remain the property of their copyright owners, unless otherwise agreed
9# upon. The license for this file, and modifications and additions to the
10# file, is the same license as for the pristine package itself (unless the
11# license for the pristine package is not an Open Source License, in which
12# case the license is the MIT License). An "Open Source License" is a
13# license that conforms to the Open Source Definition (Version 1.9)
14# published by the Open Source Initiative.
15
Oliver Smith2f7fb2e2020-05-14 11:45:19 +020016Name: osmo-hlr
Oliver Smith102e3622020-05-14 11:46:08 +020017Version: @VERSION@
Oliver Smith2f7fb2e2020-05-14 11:45:19 +020018Release: 0
19Summary: Osmocom Home Location Register for GSUP protocol towards OsmoSGSN and OsmoCSCN
20License: AGPL-3.0-or-later AND GPL-2.0-or-later
21Group: Productivity/Telephony/Servers
Oliver Smith102e3622020-05-14 11:46:08 +020022URL: https://osmocom.org/projects/osmo-hlr
Oliver Smith2f7fb2e2020-05-14 11:45:19 +020023Source: %{name}-%{version}.tar.xz
24BuildRequires: autoconf
25BuildRequires: automake
26BuildRequires: libtool
27BuildRequires: pkgconfig >= 0.20
Oliver Smith102e3622020-05-14 11:46:08 +020028BuildRequires: python3
29%if 0%{?suse_version}
Oliver Smith2f7fb2e2020-05-14 11:45:19 +020030BuildRequires: systemd-rpm-macros
Oliver Smith102e3622020-05-14 11:46:08 +020031%endif
Pau Espin Pedrold052f072023-09-12 14:41:33 +020032BuildRequires: pkgconfig(libosmoabis) >= 1.5.0
33BuildRequires: pkgconfig(libosmocore) >= 1.9.0
34BuildRequires: pkgconfig(libosmoctrl) >= 1.9.0
35BuildRequires: pkgconfig(libosmogsm) >= 1.9.0
36BuildRequires: pkgconfig(libosmovty) >= 1.9.0
Oliver Smith2f7fb2e2020-05-14 11:45:19 +020037BuildRequires: pkgconfig(sqlite3)
38BuildRequires: pkgconfig(talloc) >= 2.0.1
39# only needed for populate_hlr_db.pl
40Requires: libdbi-drivers-dbd-sqlite3
Oliver Smith102e3622020-05-14 11:46:08 +020041%{?systemd_requires}
Oliver Smith2f7fb2e2020-05-14 11:45:19 +020042
43%description
44The GSUP HLR is a stand-alone HLR (Home Location Register) for SIM
45and USIM based subscribers which exposes the GSUP protocol towards
46its users. OsmoSGSN supports this protocol.
47
48osmo-gsup-hlr is still very simplistic. It is a single-threaded
49architecture and uses only sqlite3 tables as back-end. It is suitable
50for installations of the scale that OsmoNITB was able to handle. It
51also lacks various features like fine-grained control of subscribed
52services (like supplementary services).
53
54%package -n libosmo-gsup-client0
55Summary: Osmocom GSUP (General Subscriber Update Protocol) client library
56License: GPL-2.0-or-later
57Group: System/Libraries
58
59%description -n libosmo-gsup-client0
60This is a shared library that can be used to implement client programs for
61the GSUP protocol. The typical GSUP server is OsmoHLR, with OsmoMSC, OsmoSGSN
62and External USSD Entities (EUSEs) using this library to implement clients.
63
64%package -n libosmo-gsup-client-devel
65Summary: Development files for the Osmocom GSUP client library
66License: GPL-2.0-or-later
67Group: Development/Libraries/C and C++
68Requires: libosmo-gsup-client0 = %{version}
69
70%description -n libosmo-gsup-client-devel
71This is a shared library that can be used to implement client programs for
72the GSUP protocol. The typical GSUP server is OsmoHLR, with OsmoMSC, OsmoSGSN
73and External USSD Entities (EUSEs) using this library to implement clients.
74
75This subpackage contains libraries and header files for developing
76applications that want to make use of libosmo-gsup-client.
77
Pau Espin Pedroled939152023-02-07 16:49:14 +010078%package -n libosmo-mslookup1
Oliver Smith2f7fb2e2020-05-14 11:45:19 +020079Summary: Osmocom MS lookup library
80License: GPL-2.0-or-later
81Group: System/Libraries
82
Pau Espin Pedroled939152023-02-07 16:49:14 +010083%description -n libosmo-mslookup1
Oliver Smith2f7fb2e2020-05-14 11:45:19 +020084This shared library contains routines for looking up mobile subscribers.
85
86%package -n libosmo-mslookup-devel
87Summary: Development files for the Osmocom MS lookup library
88License: GPL-2.0-or-later
89Group: Development/Libraries/C and C++
Pau Espin Pedroled939152023-02-07 16:49:14 +010090Requires: libosmo-mslookup1 = %{version}
Oliver Smith2f7fb2e2020-05-14 11:45:19 +020091
92%description -n libosmo-mslookup-devel
93This shared library contains routines for looking up mobile subscribers.
94
95This subpackage contains libraries and header files for developing
96applications that want to make use of libosmo-mslookup.
97
98
99%package -n osmo-mslookup-client
100Summary: Standalone program using libosmo-mslookup
101License: GPL-2.0-or-later
102Group: Development/Libraries/C and C++
103
104%description -n osmo-mslookup-client
105Standalone program using libosmo-mslookup to easily integrate with programs
106that want to connect services (SIP, SMS,...) to the current location of a
107subscriber.
108
109%prep
110%setup -q
111
112%build
113echo "%{version}" >.tarball-version
114autoreconf -fi
115%configure \
116 --docdir="%{_docdir}/%{name}" \
117 --with-systemdsystemunitdir=%{_unitdir} \
118 --enable-shared \
119 --disable-static
120make V=1 %{?_smp_mflags}
121
122%install
123%make_install
124install -d "%{buildroot}/%{_localstatedir}/lib/osmocom"
125find %{buildroot} -type f -name "*.la" -delete -print
126
127%check
128make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
129
Oliver Smith102e3622020-05-14 11:46:08 +0200130%if 0%{?suse_version}
Oliver Smith2f7fb2e2020-05-14 11:45:19 +0200131%preun
132%service_del_preun %{name}.service
133
134%postun
135%service_del_postun %{name}.service
136
137%pre
138%service_add_pre %{name}.service
Oliver Smith60673e72021-05-31 09:45:07 +0200139%endif
Oliver Smith2f7fb2e2020-05-14 11:45:19 +0200140
141%post
Oliver Smith60673e72021-05-31 09:45:07 +0200142%if 0%{?suse_version}
Oliver Smith2f7fb2e2020-05-14 11:45:19 +0200143%service_add_post %{name}.service
Oliver Smith102e3622020-05-14 11:46:08 +0200144%endif
Oliver Smith60673e72021-05-31 09:45:07 +0200145/usr/share/osmocom/osmo-hlr-post-upgrade.sh
Oliver Smith2f7fb2e2020-05-14 11:45:19 +0200146
147%post -n libosmo-gsup-client0 -p /sbin/ldconfig
148%postun -n libosmo-gsup-client0 -p /sbin/ldconfig
Pau Espin Pedroled939152023-02-07 16:49:14 +0100149%post -n libosmo-mslookup1 -p /sbin/ldconfig
150%postun -n libosmo-mslookup1 -p /sbin/ldconfig
Oliver Smith2f7fb2e2020-05-14 11:45:19 +0200151
152%files
153%license COPYING
154%dir %{_docdir}/%{name}
155%dir %{_docdir}/%{name}/examples
156%{_docdir}/%{name}/examples/osmo-hlr.cfg
157%{_docdir}/%{name}/examples/osmo-hlr-dgsm.cfg
158%dir %{_docdir}/%{name}/sql
159%{_docdir}/%{name}/sql/hlr.sql
160%{_docdir}/%{name}/sql//hlr_data.sql
161%dir %{_sysconfdir}/osmocom
162%dir %{_localstatedir}/lib/osmocom
163%{_bindir}/osmo-hlr
164%{_bindir}/osmo-hlr-db-tool
165%dir %{_sysconfdir}/osmocom
166%config %{_sysconfdir}/osmocom/osmo-hlr.cfg
167%{_unitdir}/osmo-hlr.service
Oliver Smith60673e72021-05-31 09:45:07 +0200168%dir %{_datadir}/osmocom
169%{_datadir}/osmocom/osmo-hlr-post-upgrade.sh
Oliver Smith2f7fb2e2020-05-14 11:45:19 +0200170
171%files -n libosmo-gsup-client0
172%{_libdir}/libosmo-gsup-client.so.0*
173
174%files -n libosmo-gsup-client-devel
175%{_bindir}/osmo-euse-demo
176%dir %{_includedir}/osmocom
177%dir %{_includedir}/osmocom/gsupclient
178%{_includedir}/osmocom/gsupclient/*.h
179%{_libdir}/libosmo-gsup-client.so
180%{_libdir}/pkgconfig/libosmo-gsup-client.pc
181
Pau Espin Pedroled939152023-02-07 16:49:14 +0100182%files -n libosmo-mslookup1
183%{_libdir}/libosmo-mslookup.so.1*
Oliver Smith2f7fb2e2020-05-14 11:45:19 +0200184
185%files -n libosmo-mslookup-devel
186%dir %{_includedir}/osmocom
187%dir %{_includedir}/osmocom/mslookup
188%{_includedir}/osmocom/mslookup/*.h
189%{_libdir}/libosmo-mslookup.so
190%{_libdir}/pkgconfig/libosmo-mslookup.pc
191
192%files -n osmo-mslookup-client
193%{_bindir}/osmo-mslookup-client
194
195%changelog