blob: c4029be2755a29195d16bd5a3aace1dd350f53b2 [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 Pedrol62404652021-02-23 18:13:53 +010032BuildRequires: pkgconfig(libosmoabis) >= 1.1.0
33BuildRequires: pkgconfig(libosmocore) >= 1.5.0
34BuildRequires: pkgconfig(libosmoctrl) >= 1.5.0
35BuildRequires: pkgconfig(libosmogsm) >= 1.5.0
36BuildRequires: pkgconfig(libosmovty) >= 1.5.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
78%package -n libosmo-mslookup0
79Summary: Osmocom MS lookup library
80License: GPL-2.0-or-later
81Group: System/Libraries
82
83%description -n libosmo-mslookup0
84This 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++
90Requires: libosmo-mslookup0 = %{version}
91
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
139
140%post
141%service_add_post %{name}.service
Oliver Smith102e3622020-05-14 11:46:08 +0200142%endif
Oliver Smith2f7fb2e2020-05-14 11:45:19 +0200143
144%post -n libosmo-gsup-client0 -p /sbin/ldconfig
145%postun -n libosmo-gsup-client0 -p /sbin/ldconfig
146%post -n libosmo-mslookup0 -p /sbin/ldconfig
147%postun -n libosmo-mslookup0 -p /sbin/ldconfig
148
149%files
150%license COPYING
151%dir %{_docdir}/%{name}
152%dir %{_docdir}/%{name}/examples
153%{_docdir}/%{name}/examples/osmo-hlr.cfg
154%{_docdir}/%{name}/examples/osmo-hlr-dgsm.cfg
155%dir %{_docdir}/%{name}/sql
156%{_docdir}/%{name}/sql/hlr.sql
157%{_docdir}/%{name}/sql//hlr_data.sql
158%dir %{_sysconfdir}/osmocom
159%dir %{_localstatedir}/lib/osmocom
160%{_bindir}/osmo-hlr
161%{_bindir}/osmo-hlr-db-tool
162%dir %{_sysconfdir}/osmocom
163%config %{_sysconfdir}/osmocom/osmo-hlr.cfg
164%{_unitdir}/osmo-hlr.service
165
166%files -n libosmo-gsup-client0
167%{_libdir}/libosmo-gsup-client.so.0*
168
169%files -n libosmo-gsup-client-devel
170%{_bindir}/osmo-euse-demo
171%dir %{_includedir}/osmocom
172%dir %{_includedir}/osmocom/gsupclient
173%{_includedir}/osmocom/gsupclient/*.h
174%{_libdir}/libosmo-gsup-client.so
175%{_libdir}/pkgconfig/libosmo-gsup-client.pc
176
177%files -n libosmo-mslookup0
178%{_libdir}/libosmo-mslookup.so.0*
179
180%files -n libosmo-mslookup-devel
181%dir %{_includedir}/osmocom
182%dir %{_includedir}/osmocom/mslookup
183%{_includedir}/osmocom/mslookup/*.h
184%{_libdir}/libosmo-mslookup.so
185%{_libdir}/pkgconfig/libosmo-mslookup.pc
186
187%files -n osmo-mslookup-client
188%{_bindir}/osmo-mslookup-client
189
190%changelog