Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 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 | |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 16 | Name: osmo-hlr |
Oliver Smith | 102e362 | 2020-05-14 11:46:08 +0200 | [diff] [blame] | 17 | Version: @VERSION@ |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 18 | Release: 0 |
| 19 | Summary: Osmocom Home Location Register for GSUP protocol towards OsmoSGSN and OsmoCSCN |
| 20 | License: AGPL-3.0-or-later AND GPL-2.0-or-later |
| 21 | Group: Productivity/Telephony/Servers |
Oliver Smith | 102e362 | 2020-05-14 11:46:08 +0200 | [diff] [blame] | 22 | URL: https://osmocom.org/projects/osmo-hlr |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 23 | Source: %{name}-%{version}.tar.xz |
| 24 | BuildRequires: autoconf |
| 25 | BuildRequires: automake |
| 26 | BuildRequires: libtool |
| 27 | BuildRequires: pkgconfig >= 0.20 |
Oliver Smith | 102e362 | 2020-05-14 11:46:08 +0200 | [diff] [blame] | 28 | BuildRequires: python3 |
| 29 | %if 0%{?suse_version} |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 30 | BuildRequires: systemd-rpm-macros |
Oliver Smith | 102e362 | 2020-05-14 11:46:08 +0200 | [diff] [blame] | 31 | %endif |
Pau Espin Pedrol | ed93915 | 2023-02-07 16:49:14 +0100 | [diff] [blame] | 32 | BuildRequires: pkgconfig(libosmoabis) >= 1.4.0 |
| 33 | BuildRequires: pkgconfig(libosmocore) >= 1.8.0 |
| 34 | BuildRequires: pkgconfig(libosmoctrl) >= 1.8.0 |
| 35 | BuildRequires: pkgconfig(libosmogsm) >= 1.8.0 |
| 36 | BuildRequires: pkgconfig(libosmovty) >= 1.8.0 |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 37 | BuildRequires: pkgconfig(sqlite3) |
| 38 | BuildRequires: pkgconfig(talloc) >= 2.0.1 |
| 39 | # only needed for populate_hlr_db.pl |
| 40 | Requires: libdbi-drivers-dbd-sqlite3 |
Oliver Smith | 102e362 | 2020-05-14 11:46:08 +0200 | [diff] [blame] | 41 | %{?systemd_requires} |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 42 | |
| 43 | %description |
| 44 | The GSUP HLR is a stand-alone HLR (Home Location Register) for SIM |
| 45 | and USIM based subscribers which exposes the GSUP protocol towards |
| 46 | its users. OsmoSGSN supports this protocol. |
| 47 | |
| 48 | osmo-gsup-hlr is still very simplistic. It is a single-threaded |
| 49 | architecture and uses only sqlite3 tables as back-end. It is suitable |
| 50 | for installations of the scale that OsmoNITB was able to handle. It |
| 51 | also lacks various features like fine-grained control of subscribed |
| 52 | services (like supplementary services). |
| 53 | |
| 54 | %package -n libosmo-gsup-client0 |
| 55 | Summary: Osmocom GSUP (General Subscriber Update Protocol) client library |
| 56 | License: GPL-2.0-or-later |
| 57 | Group: System/Libraries |
| 58 | |
| 59 | %description -n libosmo-gsup-client0 |
| 60 | This is a shared library that can be used to implement client programs for |
| 61 | the GSUP protocol. The typical GSUP server is OsmoHLR, with OsmoMSC, OsmoSGSN |
| 62 | and External USSD Entities (EUSEs) using this library to implement clients. |
| 63 | |
| 64 | %package -n libosmo-gsup-client-devel |
| 65 | Summary: Development files for the Osmocom GSUP client library |
| 66 | License: GPL-2.0-or-later |
| 67 | Group: Development/Libraries/C and C++ |
| 68 | Requires: libosmo-gsup-client0 = %{version} |
| 69 | |
| 70 | %description -n libosmo-gsup-client-devel |
| 71 | This is a shared library that can be used to implement client programs for |
| 72 | the GSUP protocol. The typical GSUP server is OsmoHLR, with OsmoMSC, OsmoSGSN |
| 73 | and External USSD Entities (EUSEs) using this library to implement clients. |
| 74 | |
| 75 | This subpackage contains libraries and header files for developing |
| 76 | applications that want to make use of libosmo-gsup-client. |
| 77 | |
Pau Espin Pedrol | ed93915 | 2023-02-07 16:49:14 +0100 | [diff] [blame] | 78 | %package -n libosmo-mslookup1 |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 79 | Summary: Osmocom MS lookup library |
| 80 | License: GPL-2.0-or-later |
| 81 | Group: System/Libraries |
| 82 | |
Pau Espin Pedrol | ed93915 | 2023-02-07 16:49:14 +0100 | [diff] [blame] | 83 | %description -n libosmo-mslookup1 |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 84 | This shared library contains routines for looking up mobile subscribers. |
| 85 | |
| 86 | %package -n libosmo-mslookup-devel |
| 87 | Summary: Development files for the Osmocom MS lookup library |
| 88 | License: GPL-2.0-or-later |
| 89 | Group: Development/Libraries/C and C++ |
Pau Espin Pedrol | ed93915 | 2023-02-07 16:49:14 +0100 | [diff] [blame] | 90 | Requires: libosmo-mslookup1 = %{version} |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 91 | |
| 92 | %description -n libosmo-mslookup-devel |
| 93 | This shared library contains routines for looking up mobile subscribers. |
| 94 | |
| 95 | This subpackage contains libraries and header files for developing |
| 96 | applications that want to make use of libosmo-mslookup. |
| 97 | |
| 98 | |
| 99 | %package -n osmo-mslookup-client |
| 100 | Summary: Standalone program using libosmo-mslookup |
| 101 | License: GPL-2.0-or-later |
| 102 | Group: Development/Libraries/C and C++ |
| 103 | |
| 104 | %description -n osmo-mslookup-client |
| 105 | Standalone program using libosmo-mslookup to easily integrate with programs |
| 106 | that want to connect services (SIP, SMS,...) to the current location of a |
| 107 | subscriber. |
| 108 | |
| 109 | %prep |
| 110 | %setup -q |
| 111 | |
| 112 | %build |
| 113 | echo "%{version}" >.tarball-version |
| 114 | autoreconf -fi |
| 115 | %configure \ |
| 116 | --docdir="%{_docdir}/%{name}" \ |
| 117 | --with-systemdsystemunitdir=%{_unitdir} \ |
| 118 | --enable-shared \ |
| 119 | --disable-static |
| 120 | make V=1 %{?_smp_mflags} |
| 121 | |
| 122 | %install |
| 123 | %make_install |
| 124 | install -d "%{buildroot}/%{_localstatedir}/lib/osmocom" |
| 125 | find %{buildroot} -type f -name "*.la" -delete -print |
| 126 | |
| 127 | %check |
| 128 | make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) |
| 129 | |
Oliver Smith | 102e362 | 2020-05-14 11:46:08 +0200 | [diff] [blame] | 130 | %if 0%{?suse_version} |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 131 | %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 Smith | 60673e7 | 2021-05-31 09:45:07 +0200 | [diff] [blame] | 139 | %endif |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 140 | |
| 141 | %post |
Oliver Smith | 60673e7 | 2021-05-31 09:45:07 +0200 | [diff] [blame] | 142 | %if 0%{?suse_version} |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 143 | %service_add_post %{name}.service |
Oliver Smith | 102e362 | 2020-05-14 11:46:08 +0200 | [diff] [blame] | 144 | %endif |
Oliver Smith | 60673e7 | 2021-05-31 09:45:07 +0200 | [diff] [blame] | 145 | /usr/share/osmocom/osmo-hlr-post-upgrade.sh |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 146 | |
| 147 | %post -n libosmo-gsup-client0 -p /sbin/ldconfig |
| 148 | %postun -n libosmo-gsup-client0 -p /sbin/ldconfig |
Pau Espin Pedrol | ed93915 | 2023-02-07 16:49:14 +0100 | [diff] [blame] | 149 | %post -n libosmo-mslookup1 -p /sbin/ldconfig |
| 150 | %postun -n libosmo-mslookup1 -p /sbin/ldconfig |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 151 | |
| 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 Smith | 60673e7 | 2021-05-31 09:45:07 +0200 | [diff] [blame] | 168 | %dir %{_datadir}/osmocom |
| 169 | %{_datadir}/osmocom/osmo-hlr-post-upgrade.sh |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 170 | |
| 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 Pedrol | ed93915 | 2023-02-07 16:49:14 +0100 | [diff] [blame] | 182 | %files -n libosmo-mslookup1 |
| 183 | %{_libdir}/libosmo-mslookup.so.1* |
Oliver Smith | 2f7fb2e | 2020-05-14 11:45:19 +0200 | [diff] [blame] | 184 | |
| 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 |