blob: d24417e72e23c834794870960e98931fe6f937f3 [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
38%{?systemd_requires}
39
40%description
41OsmoMGW is Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks.
42
43%package -n libosmo-mgcp-client6
44Summary: Osmocom's Media Gateway Control Protocol client library
45Group: System/Libraries
46
47%description -n libosmo-mgcp-client6
48Osmocom's Media Gateway Control Protocol client library.
49
50%package -n libosmo-mgcp-client-devel
51Summary: Development files for Osmocom's Media Gateway Control Protocol client library
52Group: Development/Libraries/C and C++
53Requires: libosmo-mgcp-client6 = %{version}
54
55%description -n libosmo-mgcp-client-devel
56Osmocom's Media Gateway Control Protocol client librarary.
57
58This subpackage contains libraries and header files for developing
59applications that want to make use of libosmo-mgcp-client.
60
61%package -n libosmo-mgcp-devel
62Summary: Development files for Osmocom's Media Gateway server library
63Group: Development/Libraries/C and C++
64
65%description -n libosmo-mgcp-devel
66Osmocom's Media Gateway Control Protocol server library.
67
68This subpackage contains libraries and header files for developing
69applications that want to make use of libosmo-mgcp.
70
71%prep
72%setup -q
73
74%build
75echo "%{version}" >.tarball-version
76autoreconf -fi
77%configure \
78 --disable-static \
79 --docdir=%{_docdir}/%{name} \
80 --with-systemdsystemunitdir=%{_unitdir}
81
82make %{?_smp_mflags}
83
84%install
85%make_install
86find %{buildroot} -type f -name "*.la" -delete -print
87
88%check
89make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
90
91%post -n libosmo-mgcp-client6 -p /sbin/ldconfig
92%postun -n libosmo-mgcp-client6 -p /sbin/ldconfig
Oliver Smith6500d722020-05-14 11:48:29 +020093
94%if 0%{?suse_version}
Oliver Smithd6877eb2020-05-14 11:47:38 +020095%preun
96%service_del_preun osmo-mgw.service
97
98%postun
99%service_del_postun osmo-mgw.service
100
101%pre
102%service_add_pre osmo-mgw.service
103
104%post
105%service_add_post osmo-mgw.service
Oliver Smith6500d722020-05-14 11:48:29 +0200106%endif
Oliver Smithd6877eb2020-05-14 11:47:38 +0200107
108%files
109%license COPYING
110%doc AUTHORS README
111%dir %{_docdir}/%{name}/examples
112%dir %{_docdir}/%{name}/examples/osmo-mgw
113%{_docdir}/%{name}/examples/osmo-mgw/osmo-mgw.cfg
114%{_bindir}/osmo-mgw
115%{_unitdir}/osmo-mgw.service
116%dir %{_sysconfdir}/osmocom
Harald Welte41f77d82020-06-22 14:20:53 +0200117%config(noreplace) %{_sysconfdir}/osmocom/osmo-mgw.cfg
Oliver Smithd6877eb2020-05-14 11:47:38 +0200118
119%files -n libosmo-mgcp-client6
120%{_libdir}/libosmo-mgcp-client.so.6*
121
122%files -n libosmo-mgcp-client-devel
123%{_libdir}/libosmo-mgcp-client.so
124%{_libdir}/pkgconfig/libosmo-mgcp-client.pc
125%dir %{_includedir}/osmocom
126%dir %{_includedir}/osmocom/mgcp_client
127%{_includedir}/osmocom/mgcp_client/*.h
128
129%files -n libosmo-mgcp-devel
130%dir %{_includedir}/osmocom
131%dir %{_includedir}/osmocom/mgcp
132%{_includedir}/osmocom/mgcp/*.h
133
134%changelog