blob: c181d1f8b05eb54bdb1818059e7d5703ffd0ab4e [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
Pau Espin Pedrol6ccdaa22021-02-23 18:28:45 +010032BuildRequires: pkgconfig(libosmo-netif) >= 1.1.0
Pau Espin Pedrol58dc88b2021-11-16 16:59:21 +010033BuildRequires: pkgconfig(libosmocore) >= 1.6.0
34BuildRequires: pkgconfig(libosmoctrl) >= 1.6.0
35BuildRequires: pkgconfig(libosmogsm) >= 1.6.0
36BuildRequires: pkgconfig(libosmovty) >= 1.6.0
37BuildRequires: pkgconfig(libosmocoding) >= 1.6.0
38BuildRequires: pkgconfig(libosmoabis) >= 1.2.0
39BuildRequires: pkgconfig(libosmotrau) >= 1.2.0
Oliver Smithd6877eb2020-05-14 11:47:38 +020040%{?systemd_requires}
41
42%description
43OsmoMGW is Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks.
44
Pau Espin Pedrol58dc88b2021-11-16 16:59:21 +010045%package -n libosmo-mgcp-client9
Oliver Smithd6877eb2020-05-14 11:47:38 +020046Summary: Osmocom's Media Gateway Control Protocol client library
47Group: System/Libraries
48
Pau Espin Pedrol58dc88b2021-11-16 16:59:21 +010049%description -n libosmo-mgcp-client9
Oliver Smithd6877eb2020-05-14 11:47:38 +020050Osmocom's Media Gateway Control Protocol client library.
51
52%package -n libosmo-mgcp-client-devel
53Summary: Development files for Osmocom's Media Gateway Control Protocol client library
54Group: Development/Libraries/C and C++
Pau Espin Pedrol58dc88b2021-11-16 16:59:21 +010055Requires: libosmo-mgcp-client9 = %{version}
Oliver Smithd6877eb2020-05-14 11:47:38 +020056
57%description -n libosmo-mgcp-client-devel
58Osmocom's Media Gateway Control Protocol client librarary.
59
60This subpackage contains libraries and header files for developing
61applications that want to make use of libosmo-mgcp-client.
62
63%package -n libosmo-mgcp-devel
64Summary: Development files for Osmocom's Media Gateway server library
65Group: Development/Libraries/C and C++
66
67%description -n libosmo-mgcp-devel
68Osmocom's Media Gateway Control Protocol server library.
69
70This subpackage contains libraries and header files for developing
71applications that want to make use of libosmo-mgcp.
72
73%prep
74%setup -q
75
76%build
77echo "%{version}" >.tarball-version
78autoreconf -fi
79%configure \
80 --disable-static \
81 --docdir=%{_docdir}/%{name} \
82 --with-systemdsystemunitdir=%{_unitdir}
83
84make %{?_smp_mflags}
85
86%install
87%make_install
88find %{buildroot} -type f -name "*.la" -delete -print
89
90%check
91make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
92
Pau Espin Pedrol58dc88b2021-11-16 16:59:21 +010093%post -n libosmo-mgcp-client9 -p /sbin/ldconfig
94%postun -n libosmo-mgcp-client9 -p /sbin/ldconfig
Oliver Smith6500d722020-05-14 11:48:29 +020095
96%if 0%{?suse_version}
Oliver Smithd6877eb2020-05-14 11:47:38 +020097%preun
98%service_del_preun osmo-mgw.service
99
100%postun
101%service_del_postun osmo-mgw.service
102
103%pre
104%service_add_pre osmo-mgw.service
105
106%post
107%service_add_post osmo-mgw.service
Oliver Smith6500d722020-05-14 11:48:29 +0200108%endif
Oliver Smithd6877eb2020-05-14 11:47:38 +0200109
110%files
111%license COPYING
112%doc AUTHORS README
113%dir %{_docdir}/%{name}/examples
114%dir %{_docdir}/%{name}/examples/osmo-mgw
115%{_docdir}/%{name}/examples/osmo-mgw/osmo-mgw.cfg
Harald Welte9e494e62020-08-28 14:59:47 +0200116%{_docdir}/%{name}/examples/osmo-mgw/osmo-mgw-abis_e1.cfg
Oliver Smithd6877eb2020-05-14 11:47:38 +0200117%{_bindir}/osmo-mgw
118%{_unitdir}/osmo-mgw.service
119%dir %{_sysconfdir}/osmocom
Harald Welte41f77d82020-06-22 14:20:53 +0200120%config(noreplace) %{_sysconfdir}/osmocom/osmo-mgw.cfg
Oliver Smithd6877eb2020-05-14 11:47:38 +0200121
Pau Espin Pedrol58dc88b2021-11-16 16:59:21 +0100122%files -n libosmo-mgcp-client9
123%{_libdir}/libosmo-mgcp-client.so.9*
Oliver Smithd6877eb2020-05-14 11:47:38 +0200124
125%files -n libosmo-mgcp-client-devel
126%{_libdir}/libosmo-mgcp-client.so
127%{_libdir}/pkgconfig/libosmo-mgcp-client.pc
128%dir %{_includedir}/osmocom
129%dir %{_includedir}/osmocom/mgcp_client
130%{_includedir}/osmocom/mgcp_client/*.h
131
132%files -n libosmo-mgcp-devel
133%dir %{_includedir}/osmocom
134%dir %{_includedir}/osmocom/mgcp
135%{_includedir}/osmocom/mgcp/*.h
136
137%changelog