blob: 96e94810514a3883108a19cc9406c8b62e2c7bb2 [file] [log] [blame]
Oliver Smithd0156fd2020-05-14 11:50:38 +02001#
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 Smithd0156fd2020-05-14 11:50:38 +020015Name: osmo-pcu
Oliver Smithc10cb812020-05-14 11:51:10 +020016Version: @VERSION@
Oliver Smithd0156fd2020-05-14 11:50:38 +020017Release: 0
18Summary: Osmocom GPRS Packet Control Unit (PCU)
19License: GPL-2.0-only
20Group: Productivity/Telephony/Servers
Oliver Smithc10cb812020-05-14 11:51:10 +020021URL: https://osmocom.org/projects/osmopcu
Oliver Smithd0156fd2020-05-14 11:50:38 +020022Source: %{name}-%{version}.tar.xz
23BuildRequires: autoconf
24BuildRequires: automake
25BuildRequires: gcc-c++
26BuildRequires: libtool
27BuildRequires: pkgconfig >= 0.20
Oliver Smithc10cb812020-05-14 11:51:10 +020028%if 0%{?suse_version}
Oliver Smithd0156fd2020-05-14 11:50:38 +020029BuildRequires: systemd-rpm-macros
Oliver Smithc10cb812020-05-14 11:51:10 +020030%endif
Pau Espin Pedrol50aa4922021-02-23 14:41:01 +010031BuildRequires: pkgconfig(libosmocore) >= 1.5.0
32BuildRequires: pkgconfig(libosmogb) >= 1.5.0
33BuildRequires: pkgconfig(libosmogsm) >= 1.5.0
34BuildRequires: pkgconfig(libosmovty) >= 1.5.0
35BuildRequires: pkgconfig(libosmoctrl) >= 1.5.0
Oliver Smithd0156fd2020-05-14 11:50:38 +020036%{?systemd_requires}
37
38%description
39Osmocom PCU code (RLC/MAC/PCU) for OpenBTS and OsmoBTS.
40
41%prep
42%setup -q
43
44%build
45echo "%{version}" >.tarball-version
46autoreconf -fi
47%configure \
48 --enable-shared \
49 --disable-static \
50 --docdir=%{_docdir}/%{name} \
51 --with-systemdsystemunitdir=%{_unitdir}
52make %{?_smp_mflags}
53
54%install
55%make_install
56
Oliver Smithc10cb812020-05-14 11:51:10 +020057%if 0%{?suse_version}
Oliver Smithd0156fd2020-05-14 11:50:38 +020058%preun
59%service_del_preun %{name}.service
60
61%postun
62%service_del_postun %{name}.service
63
64%pre
65%service_add_pre %{name}.service
66
67%post
68%service_add_post %{name}.service
Oliver Smithc10cb812020-05-14 11:51:10 +020069%endif
Oliver Smithd0156fd2020-05-14 11:50:38 +020070
71%check
72make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
73
74%files
75%license COPYING
76%doc README.md
77%doc %{_docdir}/%{name}/examples
78%{_bindir}/osmo-pcu
79%dir %{_sysconfdir}/osmocom
80%config(noreplace) %{_sysconfdir}/osmocom/osmo-pcu.cfg
81%{_unitdir}/%{name}.service
82
83%changelog