diff --git a/xapps.spec b/xapps.spec index 58bd3f5..bd33355 100644 --- a/xapps.spec +++ b/xapps.spec @@ -1,15 +1,15 @@ # this is only turned on during transitional periods -%{?python3_next_pkgversion: %global with_python3_next 1} - Name: xapps Version: 1.2.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Common files for XApp desktop apps License: LGPLv2+ URL: https://github.com/linuxmint/%{name} Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz -Source1: http://packages.linuxmint.com/pool/main/f/flags/flags_1.0.2.tar.xz +Source1: http://packages.linuxmint.com/pool/main/f/flags/flags_1.0.2.tar.xz +# Patch drops python2 support +Patch0: py3.patch BuildRequires: glib2-devel BuildRequires: gobject-introspection-devel @@ -24,11 +24,7 @@ BuildRequires: vala Requires: fpaste Requires: inxi -%if 0%{?fedora} || 0%{?rhel} >= 8 Requires: python3-xapps-overrides%{?_isa} = %{version}-%{release} -%else -Requires: python2-xapps-overrides%{?_isa} = %{version}-%{release} -%endif Requires: xdg-utils %description @@ -44,76 +40,26 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Development libraries and header files for developing XApp apps. -%package -n python2-xapps-overrides -Summary: Python2 files for %{name} - -%if 0%{?fedora} >=27 || 0%{?rhel} >= 8 -Requires: python2-gobject-base%{?_isa} -%else -Requires: python-gobject-base%{?_isa} -%endif -Requires: %{name}%{?_isa} = %{version}-%{release} - -BuildRequires: python2-devel - -%description -n python2-xapps-overrides -Python2 files for XApp apps. - - -%package -n python%{python3_pkgversion}-xapps-overrides +%package -n python3-xapps-overrides Summary: Python%{python3_version} files for %{name} -Requires: python%{python3_pkgversion}-gobject-base%{?_isa} +Requires: python3-gobject-base%{?_isa} Requires: %{name}%{?_isa} = %{version}-%{release} -BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-gobject +BuildRequires: python3-devel +BuildRequires: python3-gobject -%if ("python%{python3_pkgversion}-xapps-overrides" != "python3-xapps-overrides") && !0%{?with_python3_next} Provides: python3-xapps-overrides = %{version}-%{release} Provides: python3-xapps-overrides%{?_isa} = %{version}-%{release} -%endif -%description -n python%{python3_pkgversion}-xapps-overrides +%description -n python3-xapps-overrides Python%{python3_version} files for XApp apps. - -%if 0%{?with_python3_next} -%package -n python%{python3_next_pkgversion}-xapps-overrides -Summary: Python%{python3_next_version} files for %{name} - -Requires: python%{python3_next_pkgversion}-gobject-base%{?_isa} -Requires: %{name}%{?_isa} = %{version}-%{release} - -BuildRequires: python%{python3_next_pkgversion}-devel -BuildRequires: python%{python3_next_pkgversion}-gobject - -%if ("python%{python3_next_pkgversion}-xapps-overrides" != "python3-xapps-overrides") && 0%{?with_python3_next} -Provides: python3-xapps-overrides = %{version}-%{release} -Provides: python3-xapps-overrides%{?_isa} = %{version}-%{release} -%endif - -%description -n python%{python3_next_pkgversion}-xapps-overrides -Python%{python3_next_version} files for XApp apps. -%endif - - %prep %autosetup -p1 tar -xf %{SOURCE1} -C files/usr/share --strip 3 rm files/usr/share/format -%if (0%{?rhel} && 0%{?rhel} <= 7) -for f in $(%{__grep} -Rl '#!.*python3') ; do - %{__sed} -e 's~#!.*python3~#!/usr/bin/python2~g' < ${f} > ${f}.new - /bin/touch -r ${f}.new ${f} - mode="$(%{_bindir}/stat -c '%a' ${f})" - %{__mv} -f ${f}.new ${f} - %{__chmod} -c ${mode} ${f} -done -%endif # (0%%{?rhel} && 0%%{?rhel} >= 7) - - %build %meson -D deprecated_warnings=false %meson_build @@ -121,26 +67,10 @@ done %install %meson_install -find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' - - -%if 0%{?rhel} && 0%{?rhel} <= 7 -%post -/sbin/ldconfig -/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +find %buildroot -name '*.la' -exec rm -f {} ';' -%postun -/sbin/ldconfig -if [ $1 -eq 0 ] ; then - /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null - /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi -%posttrans -/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -%else %ldconfig_scriptlets -%endif %files @@ -166,23 +96,15 @@ fi %{_datadir}/vala/vapi/xapp.deps -%files -n python2-xapps-overrides -%{python2_sitearch}/gi/overrides/XApp.py* - - -%files -n python%{python3_pkgversion}-xapps-overrides +%files -n python3-xapps-overrides %{python3_sitearch}/gi/overrides/XApp.py %{python3_sitearch}/gi/overrides/__pycache__/XApp.cpython-%{python3_version_nodots}*.py* - -%if 0%{?with_python3_next} -%files -n python%{python3_next_pkgversion}-xapps-overrides -%{python3_next_sitearch}/gi/overrides/XApp.py -%{python3_next_sitearch}/gi/overrides/__pycache__/XApp.cpython-%{python3_next_version_nodots}*.py* -%endif - - %changelog +* Sun Oct 07 2018 Leigh Scott - 1.2.2-2 +- Drop EPEL/RHEL support +- Drop python2 support + * Wed Aug 15 2018 Leigh Scott - 1.2.2-1 - Update to 1.2.2 release