Oliver Smith | d0156fd | 2020-05-14 11:50:38 +0200 | [diff] [blame] | 1 | # |
| 2 | # spec file for package osmo-pcu |
| 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 | |
Oliver Smith | d0156fd | 2020-05-14 11:50:38 +0200 | [diff] [blame] | 15 | Name: osmo-pcu |
Oliver Smith | c10cb81 | 2020-05-14 11:51:10 +0200 | [diff] [blame] | 16 | Version: @VERSION@ |
Oliver Smith | d0156fd | 2020-05-14 11:50:38 +0200 | [diff] [blame] | 17 | Release: 0 |
| 18 | Summary: Osmocom GPRS Packet Control Unit (PCU) |
| 19 | License: GPL-2.0-only |
| 20 | Group: Productivity/Telephony/Servers |
Oliver Smith | c10cb81 | 2020-05-14 11:51:10 +0200 | [diff] [blame] | 21 | URL: https://osmocom.org/projects/osmopcu |
Oliver Smith | d0156fd | 2020-05-14 11:50:38 +0200 | [diff] [blame] | 22 | Source: %{name}-%{version}.tar.xz |
| 23 | BuildRequires: autoconf |
| 24 | BuildRequires: automake |
| 25 | BuildRequires: gcc-c++ |
| 26 | BuildRequires: libtool |
| 27 | BuildRequires: pkgconfig >= 0.20 |
Oliver Smith | c10cb81 | 2020-05-14 11:51:10 +0200 | [diff] [blame] | 28 | %if 0%{?suse_version} |
Oliver Smith | d0156fd | 2020-05-14 11:50:38 +0200 | [diff] [blame] | 29 | BuildRequires: systemd-rpm-macros |
Oliver Smith | c10cb81 | 2020-05-14 11:51:10 +0200 | [diff] [blame] | 30 | %endif |
Oliver Smith | d0156fd | 2020-05-14 11:50:38 +0200 | [diff] [blame] | 31 | BuildRequires: pkgconfig(libosmocore) >= 1.1.0 |
| 32 | BuildRequires: pkgconfig(libosmogb) >= 1.1.0 |
| 33 | BuildRequires: pkgconfig(libosmogsm) >= 1.1.0 |
| 34 | BuildRequires: pkgconfig(libosmovty) >= 1.1.0 |
| 35 | %{?systemd_requires} |
| 36 | |
| 37 | %description |
| 38 | Osmocom PCU code (RLC/MAC/PCU) for OpenBTS and OsmoBTS. |
| 39 | |
| 40 | %prep |
| 41 | %setup -q |
| 42 | |
| 43 | %build |
| 44 | echo "%{version}" >.tarball-version |
| 45 | autoreconf -fi |
| 46 | %configure \ |
| 47 | --enable-shared \ |
| 48 | --disable-static \ |
| 49 | --docdir=%{_docdir}/%{name} \ |
| 50 | --with-systemdsystemunitdir=%{_unitdir} |
| 51 | make %{?_smp_mflags} |
| 52 | |
| 53 | %install |
| 54 | %make_install |
| 55 | |
Oliver Smith | c10cb81 | 2020-05-14 11:51:10 +0200 | [diff] [blame] | 56 | %if 0%{?suse_version} |
Oliver Smith | d0156fd | 2020-05-14 11:50:38 +0200 | [diff] [blame] | 57 | %preun |
| 58 | %service_del_preun %{name}.service |
| 59 | |
| 60 | %postun |
| 61 | %service_del_postun %{name}.service |
| 62 | |
| 63 | %pre |
| 64 | %service_add_pre %{name}.service |
| 65 | |
| 66 | %post |
| 67 | %service_add_post %{name}.service |
Oliver Smith | c10cb81 | 2020-05-14 11:51:10 +0200 | [diff] [blame] | 68 | %endif |
Oliver Smith | d0156fd | 2020-05-14 11:50:38 +0200 | [diff] [blame] | 69 | |
| 70 | %check |
| 71 | make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) |
| 72 | |
| 73 | %files |
| 74 | %license COPYING |
| 75 | %doc README.md |
| 76 | %doc %{_docdir}/%{name}/examples |
| 77 | %{_bindir}/osmo-pcu |
| 78 | %dir %{_sysconfdir}/osmocom |
| 79 | %config(noreplace) %{_sysconfdir}/osmocom/osmo-pcu.cfg |
| 80 | %{_unitdir}/%{name}.service |
| 81 | |
| 82 | %changelog |