blob: e197cb7ac82745cacf062c0a3674ebe5f7ad5800 [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
Oliver Smithd0156fd2020-05-14 11:50:38 +020031BuildRequires: pkgconfig(libosmocore) >= 1.1.0
32BuildRequires: pkgconfig(libosmogb) >= 1.1.0
33BuildRequires: pkgconfig(libosmogsm) >= 1.1.0
34BuildRequires: pkgconfig(libosmovty) >= 1.1.0
35%{?systemd_requires}
36
37%description
38Osmocom PCU code (RLC/MAC/PCU) for OpenBTS and OsmoBTS.
39
40%prep
41%setup -q
42
43%build
44echo "%{version}" >.tarball-version
45autoreconf -fi
46%configure \
47 --enable-shared \
48 --disable-static \
49 --docdir=%{_docdir}/%{name} \
50 --with-systemdsystemunitdir=%{_unitdir}
51make %{?_smp_mflags}
52
53%install
54%make_install
55
Oliver Smithc10cb812020-05-14 11:51:10 +020056%if 0%{?suse_version}
Oliver Smithd0156fd2020-05-14 11:50:38 +020057%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 Smithc10cb812020-05-14 11:51:10 +020068%endif
Oliver Smithd0156fd2020-05-14 11:50:38 +020069
70%check
71make %{?_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