Blame libnma.spec

c65a095
%global gtk3_version          %(pkg-config --modversion gtk+-3.0 2>/dev/null || echo bad)
c65a095
%global gtk4_version          %(pkg-config --modversion gtk4 2>/dev/null || echo bad)
c65a095
%global glib2_version         %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad)
c65a095
%global nm_version            1:1.8.0
c65a095
%global mbp_version           0.20090602
c65a095
%global old_libnma_version    1.8.27
c65a095
0c6082f
%global rpm_version 1.8.30
0c6082f
%global real_version 1.8.30
c65a095
%global release_version 1
c65a095
c65a095
%global real_version_major %(printf '%s' '%{real_version}' | sed -n 's/^\\([1-9][0-9]*\\.[1-9][0-9]*\\)\\.[1-9][0-9]*$/\\1/p')
c65a095
377e18c
%bcond_with libnma_gtk4
098e5d2
098e5d2
Name:           libnma
098e5d2
Summary:        NetworkManager GUI library
c65a095
Version:        %{rpm_version}
1827763
Release:        %{release_version}%{?dist}.1
0ba0f56
# The entire source code is GPLv2+ except some files in shared/ which are LGPLv2+
0ba0f56
License:        GPLv2+ and LGPLv2+
098e5d2
URL:            https://gitlab.gnome.org/GNOME/libnma/
c65a095
Source0:        https://download.gnome.org/sources/libnma/%{real_version_major}/%{name}-%{real_version}.tar.xz
c65a095
c65a095
Patch1:         0001-nm-applet-no-notifications.patch
098e5d2
0ba0f56
Requires:       mobile-broadband-provider-info >= %{mbp_version}
0ba0f56
c65a095
Conflicts:      libnma < %{old_libnma_version}
c65a095
377e18c
BuildRequires:  gcc
098e5d2
BuildRequires:  NetworkManager-libnm-devel >= %{nm_version}
098e5d2
BuildRequires:  ModemManager-glib-devel >= 1.0
098e5d2
BuildRequires:  glib2-devel >= 2.32
098e5d2
BuildRequires:  gtk3-devel >= 3.10
098e5d2
%if %{with libnma_gtk4}
098e5d2
BuildRequires:  gtk4-devel >= 3.96
098e5d2
%endif
098e5d2
BuildRequires:  gobject-introspection-devel >= 0.10.3
098e5d2
BuildRequires:  gettext-devel
098e5d2
BuildRequires:  pkgconfig
098e5d2
BuildRequires:  meson
098e5d2
BuildRequires:  gtk-doc
098e5d2
BuildRequires:  iso-codes-devel
098e5d2
BuildRequires:  gcr-devel
0ba0f56
BuildRequires:  mobile-broadband-provider-info-devel >= %{mbp_version}
098e5d2
098e5d2
%description
098e5d2
This package contains the library used for integrating GUI tools with
098e5d2
NetworkManager.
098e5d2
098e5d2
098e5d2
%package devel
098e5d2
Summary:        Header files for NetworkManager GUI library
098e5d2
Requires:       NetworkManager-libnm-devel >= %{nm_version}
098e5d2
Obsoletes:      NetworkManager-gtk-devel < 1:0.9.7
377e18c
Requires:       libnma%{?_isa} = %{version}-%{release}
377e18c
Requires:       gtk3-devel%{?_isa}
098e5d2
Requires:       pkgconfig
c65a095
Conflicts:      libnma < %{old_libnma_version}
098e5d2
098e5d2
%description devel
098e5d2
This package contains header and pkg-config files to be used for integrating
098e5d2
GUI tools with NetworkManager.
098e5d2
098e5d2
098e5d2
%package gtk4
098e5d2
Summary:        Experimental GTK 4 version of NetworkManager GUI library
377e18c
Requires:       gtk4%{?_isa} >= %{gtk4_version}
0ba0f56
Requires:       mobile-broadband-provider-info >= %{mbp_version}
c65a095
Conflicts:      libnma < %{old_libnma_version}
098e5d2
098e5d2
%description gtk4
098e5d2
This package contains the experimental GTK4 version of library used for
098e5d2
integrating GUI tools with NetworkManager.
098e5d2
098e5d2
098e5d2
%package gtk4-devel
0ba0f56
Summary:        Header files for experimental GTK4 version of NetworkManager GUI library
098e5d2
Requires:       NetworkManager-libnm-devel >= %{nm_version}
377e18c
Requires:       libnma-gtk4%{?_isa} = %{version}-%{release}
377e18c
Requires:       gtk4-devel%{?_isa}
098e5d2
Requires:       pkgconfig
c65a095
Conflicts:      libnma < %{old_libnma_version}
098e5d2
098e5d2
%description gtk4-devel
098e5d2
This package contains the experimental GTK4 version of header and pkg-config
098e5d2
files to be used for integrating GUI tools with NetworkManager.
098e5d2
098e5d2
098e5d2
%prep
c65a095
%autosetup -p1 -n "%{name}-%{real_version}"
098e5d2
098e5d2
098e5d2
%build
098e5d2
%meson \
098e5d2
        -Dgcr=true \
098e5d2
        -Ddisable-static=true \
c65a095
        -Dvapi=false \
098e5d2
%if %{with libnma_gtk4}
098e5d2
        -Dlibnma_gtk4=true
098e5d2
%else
098e5d2
        -Dlibnma_gtk4=false
098e5d2
%endif
098e5d2
%meson_build
098e5d2
098e5d2
098e5d2
%install
098e5d2
%meson_install
098e5d2
%find_lang %{name}
098e5d2
098e5d2
098e5d2
%check
098e5d2
%meson_test
098e5d2
098e5d2
098e5d2
%files -f %{name}.lang
098e5d2
%{_libdir}/libnma.so.*
098e5d2
%{_libdir}/girepository-1.0/NMA-1.0.typelib
c65a095
%{_datadir}/glib-2.0/schemas/org.gnome.nm-applet.gschema.xml
098e5d2
%doc NEWS CONTRIBUTING
098e5d2
%license COPYING
098e5d2
098e5d2
098e5d2
%files devel
098e5d2
%{_includedir}/libnma
098e5d2
%{_libdir}/pkgconfig/libnma.pc
098e5d2
%{_libdir}/libnma.so
098e5d2
%{_datadir}/gir-1.0/NMA-1.0.gir
098e5d2
%{_datadir}/gtk-doc
098e5d2
098e5d2
098e5d2
%if %{with libnma_gtk4}
098e5d2
%files gtk4
098e5d2
%{_libdir}/libnma-gtk4.so.*
098e5d2
%{_libdir}/girepository-1.0/NMA4-1.0.typelib
377e18c
%license COPYING
098e5d2
098e5d2
098e5d2
%files gtk4-devel
098e5d2
%{_includedir}/libnma
098e5d2
%{_libdir}/pkgconfig/libnma-gtk4.pc
098e5d2
%{_libdir}/libnma-gtk4.so
098e5d2
%{_datadir}/gir-1.0/NMA4-1.0.gir
098e5d2
%endif
098e5d2
098e5d2
098e5d2
%changelog
1827763
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.30-1.1
1827763
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
1827763
0c6082f
* Thu Jul  9 2020 Jérôme Parmentier <jerome@prmntr.me> - 1.8.30-1
0c6082f
- Update to 1.8.30 release
0c6082f
c65a095
* Fri Mar  6 2020 Thomas Haller <thaller@redhat.com> - 1.8.28-1
c65a095
- Update to 1.8.28 release
c65a095
- move org.gnome.nm-applet.gschema.xml from network-manager-applet to here.
c65a095
- introduce wireless security dialogs
c65a095
42f0ffc
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.26-4
42f0ffc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
42f0ffc
0ba0f56
* Thu Nov 14 2019 Lubomir Rintel <lkundrak@v3.sk> - 1.8.26-3
0ba0f56
- Clarify licensing
0ba0f56
- Add a missing mobile-broadband-provider-info provide
0ba0f56
377e18c
* Fri Nov 08 2019 Lubomir Rintel <lkundrak@v3.sk> - 1.8.26-2
377e18c
- Fixes suggested in review by Matthew Krupcale (#1763285):
377e18c
- Add gcc BR
377e18c
- Fixed the libnma-gtk4 conditional
377e18c
- Made dependencies arch-specific where relevant
377e18c
- Dropped obsolete macros
377e18c
- Install license file with libnma-gtk4
377e18c
098e5d2
* Fri Oct 18 2019 Lubomir Rintel <lkundrak@v3.sk> - 1.8.26-1
098e5d2
- Initial package split from nm-connection-editor