blob: 0f96ed08f6a0f3b2c99d7332b5b4bc631efc14ac [file] [log] [blame]
Oliver Smithd6877eb2020-05-14 11:47:38 +02001#
2# spec file for package osmo-mgw
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# Please submit bugfixes or comments via http://bugs.opensuse.org/
16#
17
18Name: osmo-mgw
Oliver Smith6500d722020-05-14 11:48:29 +020019Version: @VERSION@
Oliver Smithd6877eb2020-05-14 11:47:38 +020020Release: 0
21Summary: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks
22License: AGPL-3.0-or-later AND GPL-2.0-or-later
23Group: Hardware/Mobile
24URL: https://osmocom.org/projects/osmo-mgw
25Source: %{name}-%{version}.tar.xz
26BuildRequires: automake >= 1.9
27BuildRequires: libtool >= 2
28BuildRequires: pkgconfig >= 0.20
Oliver Smith6500d722020-05-14 11:48:29 +020029%if 0%{?suse_version}
Oliver Smithd6877eb2020-05-14 11:47:38 +020030BuildRequires: systemd-rpm-macros
Oliver Smith6500d722020-05-14 11:48:29 +020031%endif
Oliver Smithd6877eb2020-05-14 11:47:38 +020032BuildRequires: pkgconfig(libosmo-netif) >= 0.6.0
33BuildRequires: pkgconfig(libosmocore) >= 1.0.0
34BuildRequires: pkgconfig(libosmoctrl) >= 1.1.0
35BuildRequires: pkgconfig(libosmogsm) >= 1.0.0
36BuildRequires: pkgconfig(libosmovty) >= 1.0.0
37BuildRequires: pkgconfig(libosmocoding) >= 1.0.0
Harald Welte6af3ccf2020-08-13 09:34:24 +020038BuildRequires: pkgconfig(libosmoabis)
Oliver Smithd6877eb2020-05-14 11:47:38 +020039%{?systemd_requires}
40
41%description
42OsmoMGW is Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks.
43
44%package -n libosmo-mgcp-client6
45Summary: Osmocom's Media Gateway Control Protocol client library
46Group: System/Libraries
47
48%description -n libosmo-mgcp-client6
49Osmocom's Media Gateway Control Protocol client library.
50
51%package -n libosmo-mgcp-client-devel
52Summary: Development files for Osmocom's Media Gateway Control Protocol client library
53Group: Development/Libraries/C and C++
54Requires: libosmo-mgcp-client6 = %{version}
55
56%description -n libosmo-mgcp-client-devel
57Osmocom's Media Gateway Control Protocol client librarary.
58
59This subpackage contains libraries and header files for developing
60applications that want to make use of libosmo-mgcp-client.
61
62%package -n libosmo-mgcp-devel
63Summary: Development files for Osmocom's Media Gateway server library
64Group: Development/Libraries/C and C++
65
66%description -n libosmo-mgcp-devel
67Osmocom's Media Gateway Control Protocol server library.
68
69This subpackage contains libraries and header files for developing
70applications that want to make use of libosmo-mgcp.
71
72%prep
73%setup -q
74
75%build
76echo "%{version}" >.tarball-version
77autoreconf -fi
78%configure \
79 --disable-static \
80 --docdir=%{_docdir}/%{name} \
81 --with-systemdsystemunitdir=%{_unitdir}
82
83make %{?_smp_mflags}
84
85%install
86%make_install
87find %{buildroot} -type f -name "*.la" -delete -print
88
89%check
90make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
91
92%post -n libosmo-mgcp-client6 -p /sbin/ldconfig
93%postun -n libosmo-mgcp-client6 -p /sbin/ldconfig
Oliver Smith6500d722020-05-14 11:48:29 +020094
95%if 0%{?suse_version}
Oliver Smithd6877eb2020-05-14 11:47:38 +020096%preun
97%service_del_preun osmo-mgw.service
98
99%postun
100%service_del_postun osmo-mgw.service
101
102%pre
103%service_add_pre osmo-mgw.service
104
105%post
106%service_add_post osmo-mgw.service
Oliver Smith6500d722020-05-14 11:48:29 +0200107%endif
Oliver Smithd6877eb2020-05-14 11:47:38 +0200108
109%files
110%license COPYING
111%doc AUTHORS README
112%dir %{_docdir}/%{name}/examples
113%dir %{_docdir}/%{name}/examples/osmo-mgw
114%{_docdir}/%{name}/examples/osmo-mgw/osmo-mgw.cfg
115%{_bindir}/osmo-mgw
116%{_unitdir}/osmo-mgw.service
117%dir %{_sysconfdir}/osmocom
Harald Welte41f77d82020-06-22 14:20:53 +0200118%config(noreplace) %{_sysconfdir}/osmocom/osmo-mgw.cfg
Oliver Smithd6877eb2020-05-14 11:47:38 +0200119
120%files -n libosmo-mgcp-client6
121%{_libdir}/libosmo-mgcp-client.so.6*
122
123%files -n libosmo-mgcp-client-devel
124%{_libdir}/libosmo-mgcp-client.so
125%{_libdir}/pkgconfig/libosmo-mgcp-client.pc
126%dir %{_includedir}/osmocom
127%dir %{_includedir}/osmocom/mgcp_client
128%{_includedir}/osmocom/mgcp_client/*.h
129
130%files -n libosmo-mgcp-devel
131%dir %{_includedir}/osmocom
132%dir %{_includedir}/osmocom/mgcp
133%{_includedir}/osmocom/mgcp/*.h
134
135%changelog