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 |
Harald Welte | fb2abb8 | 2020-10-21 20:58:02 +0200 | [diff] [blame] | 27 | BuildRequires: autoconf |
Harald Welte | dbf98d5 | 2020-10-22 08:05:51 +0200 | [diff] [blame] | 28 | BuildRequires: autoconf-archive |
Harald Welte | b53e2bf | 2020-08-21 16:33:42 +0200 | [diff] [blame] | 29 | BuildRequires: automake >= 1.9 |
| 30 | BuildRequires: libtool >= 2 |
| 31 | BuildRequires: pkgconfig >= 0.20 |
| 32 | %if 0%{?suse_version} |
| 33 | BuildRequires: systemd-rpm-macros |
| 34 | %endif |
| 35 | BuildRequires: pkgconfig(libosmo-netif) >= 0.6.0 |
| 36 | BuildRequires: pkgconfig(libosmo-sccp) >= 0.10.0 |
| 37 | BuildRequires: pkgconfig(libosmo-sigtran) >= 0.10.0 |
| 38 | BuildRequires: pkgconfig(libosmocore) >= 1.2.0 |
| 39 | BuildRequires: pkgconfig(libosmoctrl) >= 1.2.0 |
| 40 | BuildRequires: pkgconfig(libosmogsm) >= 1.2.0 |
| 41 | BuildRequires: pkgconfig(libosmovty) >= 1.2.0 |
| 42 | BuildRequires: pkgconfig(talloc) |
| 43 | %{?systemd_requires} |
| 44 | |
| 45 | %description |
| 46 | OsmoBSC: Osmocom's Base Station Controller for 2G circuit-switched mobile networks. |
| 47 | |
| 48 | %prep |
| 49 | %setup -q |
| 50 | |
| 51 | %build |
| 52 | echo "%{version}" >.tarball-version |
| 53 | autoreconf -fi |
| 54 | %configure \ |
| 55 | --docdir=%{_docdir}/%{name} \ |
| 56 | --with-systemdsystemunitdir=%{_unitdir} |
| 57 | make %{?_smp_mflags} |
| 58 | |
| 59 | %install |
| 60 | %make_install |
| 61 | |
| 62 | %if 0%{?suse_version} |
| 63 | %preun |
| 64 | %service_del_preun %{name}.service |
| 65 | |
| 66 | %postun |
| 67 | %service_del_postun %{name}.service |
| 68 | |
| 69 | %pre |
| 70 | %service_add_pre %{name}.service |
| 71 | |
| 72 | %post |
| 73 | %service_add_post %{name}.service |
| 74 | %endif |
| 75 | |
| 76 | %check |
| 77 | make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) |
| 78 | |
| 79 | %files |
| 80 | %license COPYING |
| 81 | %doc AUTHORS README |
| 82 | %{_bindir}/osmo-smlc |
| 83 | %dir %{_docdir}/%{name}/examples |
| 84 | %dir %{_docdir}/%{name}/examples/osmo-smlc |
| 85 | %{_docdir}/%{name}/examples/osmo-smlc/osmo-smlc.cfg |
| 86 | %dir %{_sysconfdir}/osmocom |
| 87 | %config(noreplace) %{_sysconfdir}/osmocom/osmo-smlc.cfg |
| 88 | %{_unitdir}/%{name}.service |
| 89 | |
| 90 | %changelog |