Harald Welte | b53e2bf | 2020-08-21 16:33:42 +0200 | [diff] [blame^] | 1 | # |
| 2 | # spec file for package osmo-smlc |
| 3 | # |
| 4 | # Copyright (c) 2017, Martin Hauke <mardnh@gmx.de> |
| 5 | # |
| 6 | # All modifications and additions to the file contributed by third parties |
| 7 | # remain the property of their copyright owners, unless otherwise agreed |
| 8 | # upon. The license for this file, and modifications and additions to the |
| 9 | # file, is the same license as for the pristine package itself (unless the |
| 10 | # license for the pristine package is not an Open Source License, in which |
| 11 | # case the license is the MIT License). An "Open Source License" is a |
| 12 | # license that conforms to the Open Source Definition (Version 1.9) |
| 13 | # published by the Open Source Initiative. |
| 14 | |
| 15 | ## Disable LTO for now since it breaks compilation of the tests |
| 16 | ## https://osmocom.org/issues/4113 |
| 17 | %define _lto_cflags %{nil} |
| 18 | |
| 19 | Name: osmo-smlc |
| 20 | Version: @VERSION@ |
| 21 | Release: 0 |
| 22 | Summary: OsmoSMLC: Osmocom's Location Service Center |
| 23 | License: AGPL-3.0-or-later |
| 24 | Group: Hardware/Mobile |
| 25 | URL: https://osmocom.org/projects/osmo-smlc |
| 26 | Source: %{name}-%{version}.tar.xz |
| 27 | BuildRequires: automake >= 1.9 |
| 28 | BuildRequires: libtool >= 2 |
| 29 | BuildRequires: pkgconfig >= 0.20 |
| 30 | %if 0%{?suse_version} |
| 31 | BuildRequires: systemd-rpm-macros |
| 32 | %endif |
| 33 | BuildRequires: pkgconfig(libosmo-netif) >= 0.6.0 |
| 34 | BuildRequires: pkgconfig(libosmo-sccp) >= 0.10.0 |
| 35 | BuildRequires: pkgconfig(libosmo-sigtran) >= 0.10.0 |
| 36 | BuildRequires: pkgconfig(libosmocore) >= 1.2.0 |
| 37 | BuildRequires: pkgconfig(libosmoctrl) >= 1.2.0 |
| 38 | BuildRequires: pkgconfig(libosmogsm) >= 1.2.0 |
| 39 | BuildRequires: pkgconfig(libosmovty) >= 1.2.0 |
| 40 | BuildRequires: pkgconfig(talloc) |
| 41 | %{?systemd_requires} |
| 42 | |
| 43 | %description |
| 44 | OsmoBSC: Osmocom's Base Station Controller for 2G circuit-switched mobile networks. |
| 45 | |
| 46 | %prep |
| 47 | %setup -q |
| 48 | |
| 49 | %build |
| 50 | echo "%{version}" >.tarball-version |
| 51 | autoreconf -fi |
| 52 | %configure \ |
| 53 | --docdir=%{_docdir}/%{name} \ |
| 54 | --with-systemdsystemunitdir=%{_unitdir} |
| 55 | make %{?_smp_mflags} |
| 56 | |
| 57 | %install |
| 58 | %make_install |
| 59 | |
| 60 | %if 0%{?suse_version} |
| 61 | %preun |
| 62 | %service_del_preun %{name}.service |
| 63 | |
| 64 | %postun |
| 65 | %service_del_postun %{name}.service |
| 66 | |
| 67 | %pre |
| 68 | %service_add_pre %{name}.service |
| 69 | |
| 70 | %post |
| 71 | %service_add_post %{name}.service |
| 72 | %endif |
| 73 | |
| 74 | %check |
| 75 | make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) |
| 76 | |
| 77 | %files |
| 78 | %license COPYING |
| 79 | %doc AUTHORS README |
| 80 | %{_bindir}/osmo-smlc |
| 81 | %dir %{_docdir}/%{name}/examples |
| 82 | %dir %{_docdir}/%{name}/examples/osmo-smlc |
| 83 | %{_docdir}/%{name}/examples/osmo-smlc/osmo-smlc.cfg |
| 84 | %dir %{_sysconfdir}/osmocom |
| 85 | %config(noreplace) %{_sysconfdir}/osmocom/osmo-smlc.cfg |
| 86 | %{_unitdir}/%{name}.service |
| 87 | |
| 88 | %changelog |