blob: b0f0269cdceae3e2f6133bcc1d8a81baef46e2db [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 Pedrol3ef173b2023-09-12 16:00:25 +020031BuildRequires: pkgconfig(libosmocore) >= 1.9.0
32BuildRequires: pkgconfig(libosmogb) >= 1.9.0
33BuildRequires: pkgconfig(libosmogsm) >= 1.9.0
34BuildRequires: pkgconfig(libosmovty) >= 1.9.0
35BuildRequires: pkgconfig(libosmoctrl) >= 1.9.0
36BuildRequires: pkgconfig(libosmoabis) >= 1.5.0
37BuildRequires: pkgconfig(libosmotrau) >= 1.5.0
Oliver Smithd0156fd2020-05-14 11:50:38 +020038%{?systemd_requires}
39
40%description
41Osmocom PCU code (RLC/MAC/PCU) for OpenBTS and OsmoBTS.
42
43%prep
44%setup -q
45
46%build
47echo "%{version}" >.tarball-version
48autoreconf -fi
49%configure \
50 --enable-shared \
51 --disable-static \
52 --docdir=%{_docdir}/%{name} \
Philipp Maier4bac3982023-02-03 16:52:42 +010053 --with-systemdsystemunitdir=%{_unitdir} \
54 --enable-er-e1-ccu
Oliver Smithd0156fd2020-05-14 11:50:38 +020055make %{?_smp_mflags}
56
57%install
58%make_install
59
Oliver Smithc10cb812020-05-14 11:51:10 +020060%if 0%{?suse_version}
Oliver Smithd0156fd2020-05-14 11:50:38 +020061%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
Oliver Smithc10cb812020-05-14 11:51:10 +020072%endif
Oliver Smithd0156fd2020-05-14 11:50:38 +020073
74%check
75make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
76
77%files
78%license COPYING
79%doc README.md
80%doc %{_docdir}/%{name}/examples
81%{_bindir}/osmo-pcu
82%dir %{_sysconfdir}/osmocom
83%config(noreplace) %{_sysconfdir}/osmocom/osmo-pcu.cfg
84%{_unitdir}/%{name}.service
85
86%changelog