File osmo-hlr.spec of Package osmo-hlr (Revision e5d5aae1c7456f2a302edd370af0fbc9)

Currently displaying revision e5d5aae1c7456f2a302edd370af0fbc9 , Show latest

215
 
1
#
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
16
Name:           osmo-hlr
17
Requires: osmocom-master
18
Version: 1.7.0.12.a26ab
19
Release:        0
20
Summary:        Osmocom Home Location Register for GSUP protocol towards OsmoSGSN and OsmoCSCN
21
License:        AGPL-3.0-or-later AND GPL-2.0-or-later
22
Group:          Productivity/Telephony/Servers
23
URL:            https://osmocom.org/projects/osmo-hlr
24
Source: osmo-hlr_1.7.0.12.a26ab.tar.xz
25
Source1: rpmlintrc
26
BuildRequires:  autoconf
27
BuildRequires:  automake
28
BuildRequires:  libtool
29
BuildRequires:  pkgconfig >= 0.20
30
BuildRequires:  python3
31
%if 0%{?suse_version}
32
BuildRequires:  systemd-rpm-macros
33
%endif
34
BuildRequires:  pkgconfig(libosmoabis) >= 1.5.0
35
BuildRequires:  pkgconfig(libosmocore) >= 1.9.0
36
BuildRequires:  pkgconfig(libosmoctrl) >= 1.9.0
37
BuildRequires:  pkgconfig(libosmogsm) >= 1.9.0
38
BuildRequires:  pkgconfig(libosmovty) >= 1.9.0
39
BuildRequires:  pkgconfig(sqlite3)
40
BuildRequires:  pkgconfig(talloc) >= 2.0.1
41
# only needed for populate_hlr_db.pl
42
Requires:       libdbi-drivers-dbd-sqlite3
43
%{?systemd_requires}
44
45
%description
46
The GSUP HLR is a stand-alone HLR (Home Location Register) for SIM
47
and USIM based subscribers which exposes the GSUP protocol towards
48
its users. OsmoSGSN supports this protocol.
49
50
osmo-gsup-hlr is still very simplistic. It is a single-threaded
51
architecture and uses only sqlite3 tables as back-end.  It is suitable
52
for installations of the scale that OsmoNITB was able to handle.  It
53
also lacks various features like fine-grained control of subscribed
54
services (like supplementary services).
55
56
%package -n libosmo-gsup-client0
57
Requires: osmocom-master
58
Summary:        Osmocom GSUP (General Subscriber Update Protocol) client library
59
License:        GPL-2.0-or-later
60
Group:          System/Libraries
61
62
%description -n libosmo-gsup-client0
63
This is a shared library that can be used to implement client programs for
64
the GSUP protocol. The typical GSUP server is OsmoHLR, with OsmoMSC, OsmoSGSN
65
and External USSD Entities (EUSEs) using this library to implement clients.
66
67
%package -n libosmo-gsup-client-devel
68
Requires: osmocom-master
69
Summary:        Development files for the Osmocom GSUP client library
70
License:        GPL-2.0-or-later
71
Group:          Development/Libraries/C and C++
72
Requires:       libosmo-gsup-client0 = %{version}
73
74
%description -n libosmo-gsup-client-devel
75
This is a shared library that can be used to implement client programs for
76
the GSUP protocol. The typical GSUP server is OsmoHLR, with OsmoMSC, OsmoSGSN
77
and External USSD Entities (EUSEs) using this library to implement clients.
78
79
This subpackage contains libraries and header files for developing
80
applications that want to make use of libosmo-gsup-client.
81
82
%package -n libosmo-mslookup1
83
Requires: osmocom-master
84
Summary:        Osmocom MS lookup library
85
License:        GPL-2.0-or-later
86
Group:          System/Libraries
87
88
%description -n libosmo-mslookup1
89
This shared library contains routines for looking up mobile subscribers.
90
91
%package -n libosmo-mslookup-devel
92
Requires: osmocom-master
93
Summary:        Development files for the Osmocom MS lookup library
94
License:        GPL-2.0-or-later
95
Group:          Development/Libraries/C and C++
96
Requires:       libosmo-mslookup1 = %{version}
97
98
%description -n libosmo-mslookup-devel
99
This shared library contains routines for looking up mobile subscribers.
100
101
This subpackage contains libraries and header files for developing
102
applications that want to make use of libosmo-mslookup.
103
104
105
%package -n osmo-mslookup-client
106
Requires: osmocom-master
107
Summary:        Standalone program using libosmo-mslookup
108
License:        GPL-2.0-or-later
109
Group:          Development/Libraries/C and C++
110
111
%description -n osmo-mslookup-client
112
Standalone program using libosmo-mslookup to easily integrate with programs
113
that want to connect services (SIP, SMS,...) to the current location of a
114
subscriber.
115
116
%prep
117
%setup -n osmo-hlr -q
118
119
%build
120
echo "%{version}" >.tarball-version
121
autoreconf -fi
122
%configure \
123
  --docdir="%{_docdir}/%{name}" \
124
  --with-systemdsystemunitdir=%{_unitdir} \
125
  --enable-shared \
126
  --disable-static
127
make V=1 %{?_smp_mflags}
128
129
%install
130
%make_install
131
install -d "%{buildroot}/%{_localstatedir}/lib/osmocom"
132
find %{buildroot} -type f -name "*.la" -delete -print
133
134
%check
135
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
136
137
%preun
138
%if 0%{?suse_version}
139
%service_del_preun %{name}.service
140
%endif
141
142
%postun
143
%if 0%{?suse_version}
144
%service_del_postun %{name}.service
145
%endif
146
147
%pre
148
getent group osmocom >/dev/null || groupadd --system osmocom
149
getent passwd osmocom >/dev/null || useradd --system --gid osmocom --home-dir /var/lib/osmocom \
150
                                            --shell /sbin/nologin --comment "Open Source Mobile Communications" osmocom
151
%if 0%{?suse_version}
152
%service_add_pre %{name}.service
153
%endif
154
exit 0
155
156
%post
157
%if 0%{?suse_version}
158
%service_add_post %{name}.service
159
%endif
160
/usr/share/osmocom/osmo-hlr-post-upgrade.sh
161
chown osmocom:osmocom /etc/osmocom/osmo-hlr.cfg
162
chmod 0660 /etc/osmocom/osmo-hlr.cfg
163
chown root:osmocom /etc/osmocom
164
chmod 2775 /etc/osmocom
165
166
%post   -n libosmo-gsup-client0 -p /sbin/ldconfig
167
%postun -n libosmo-gsup-client0 -p /sbin/ldconfig
168
%post   -n libosmo-mslookup1 -p /sbin/ldconfig
169
%postun -n libosmo-mslookup1 -p /sbin/ldconfig
170
171
%files
172
%license COPYING
173
%dir %{_docdir}/%{name}
174
%dir %{_docdir}/%{name}/examples
175
%{_docdir}/%{name}/examples/osmo-hlr.cfg
176
%{_docdir}/%{name}/examples/osmo-hlr-dgsm.cfg
177
%dir %{_docdir}/%{name}/sql
178
%{_docdir}/%{name}/sql/hlr.sql
179
%{_docdir}/%{name}/sql//hlr_data.sql
180
%dir %{_sysconfdir}/osmocom
181
%dir %{_localstatedir}/lib/osmocom
182
%{_bindir}/osmo-hlr
183
%{_bindir}/osmo-hlr-db-tool
184
%dir %{_sysconfdir}/osmocom
185
%config %{_sysconfdir}/osmocom/osmo-hlr.cfg
186
%{_unitdir}/osmo-hlr.service
187
%dir %{_datadir}/osmocom
188
%{_datadir}/osmocom/osmo-hlr-post-upgrade.sh
189
190
%files -n libosmo-gsup-client0
191
%{_libdir}/libosmo-gsup-client.so.0*
192
193
%files -n libosmo-gsup-client-devel
194
%{_bindir}/osmo-euse-demo
195
%dir %{_includedir}/osmocom
196
%dir %{_includedir}/osmocom/gsupclient
197
%{_includedir}/osmocom/gsupclient/*.h
198
%{_libdir}/libosmo-gsup-client.so
199
%{_libdir}/pkgconfig/libosmo-gsup-client.pc
200
201
%files -n libosmo-mslookup1
202
%{_libdir}/libosmo-mslookup.so.1*
203
204
%files -n libosmo-mslookup-devel
205
%dir %{_includedir}/osmocom
206
%dir %{_includedir}/osmocom/mslookup
207
%{_includedir}/osmocom/mslookup/*.h
208
%{_libdir}/libosmo-mslookup.so
209
%{_libdir}/pkgconfig/libosmo-mslookup.pc
210
211
%files -n osmo-mslookup-client
212
%{_bindir}/osmo-mslookup-client
213
214
%changelog
215