- Add %_kf5_py2kf5dir and %_kf5_py3kf5dir, create __init__.py within

- Do not own %_kf5_sharedir (/usr/share) as it's part of filesystem
- Add %_kf5_pysipdir, but do not own it. Used for devel packages of
  python bindings
- Add %kf5_python_bindings_package to auto-generate Python binding
  subpackage descriptions (for both Python 2 and 3).

OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kf5-filesystem?expand=0&rev=57
This commit is contained in:
2017-04-07 09:16:52 +00:00
committed by Git OBS Bridge
parent 758d86c920
commit 748c53339e
3 changed files with 65 additions and 2 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Apr 5 19:25:58 UTC 2017 - fabian@ritter-vogt.de
- Add %_kf5_py2kf5dir and %_kf5_py3kf5dir, create __init__.py within
- Do not own %_kf5_sharedir (/usr/share) as it's part of filesystem
- Add %_kf5_pysipdir, but do not own it. Used for devel packages of
python bindings
- Add %kf5_python_bindings_package to auto-generate Python binding
subpackage descriptions (for both Python 2 and 3).
-------------------------------------------------------------------
Tue Mar 21 20:35:25 UTC 2017 - fabian@ritter-vogt.de

View File

@@ -16,14 +16,25 @@
#
%if 0%{?suse_version} >= 1330 || 0%{?sle_version} >= 120300
# Not set to 0 in the else branch, so it can be overwritten in the prjconf
%global with_python 1
%endif
Name: kf5-filesystem
Url: http://www.kde.org
Version: 20160807
Version: 20170405
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: KF5 Directory Layout
License: LGPL-2.1+
Group: System/Fhs
%if 0%{?with_python}
# Yes, we need this just to get the site-packages path...
BuildRequires: python-base
BuildRequires: python-rpm-macros
BuildRequires: python3-base
%endif
Source0: macros.kf5
Source1: COPYING
@@ -57,6 +68,9 @@ This package provides macros which are utilized with extra-cmake-modules' KDEIns
%define _kf5_servicetypesdir %{_kf5_sharedir}/kservicetypes5
%define _kf5_htmldir %{_kf5_sharedir}/doc/HTML
%define _kf5_kxmlguidir %{_kf5_sharedir}/kxmlgui5
%define _kf5_py2kf5dir %{python2_sitelib}/PyKF5
%define _kf5_py3kf5dir %{python3_sitelib}/PyKF5
%define _kf5_pysipdir %{_kf5_sharedir}/sip/PyKF5
%prep
@@ -110,6 +124,14 @@ done
mkdir -p %{buildroot}%{_kf5_sharedir}/icons/oxygen/scalable/apps/small/{16x16,32x32}
mkdir -p %{buildroot}%{_kf5_sharedir}/icons/oxygen/scalable/status/small/{16x16,22x22,48x48}
%if 0%{?with_python}
mkdir -p %{buildroot}%{_kf5_py2kf5dir}
mkdir -p %{buildroot}%{_kf5_py3kf5dir}
touch %{buildroot}%{_kf5_py2kf5dir}/__init__.py
touch %{buildroot}%{_kf5_py3kf5dir}/__init__.py
%endif
%files
%defattr(-,root,root)
%{_sysconfdir}/rpm/macros.kf5
@@ -136,7 +158,6 @@ mkdir -p %{buildroot}%{_kf5_sharedir}/icons/oxygen/scalable/status/small/{16x16,
%dir %{_kf5_dbusinterfacesdir}
%dir %{_kf5_servicesdir}
%dir %{_kf5_servicetypesdir}
%dir %{_kf5_sharedir}
%dir %{_kf5_configdir}
%dir %{_kf5_sharedir}/icons/*
%dir %{_kf5_sharedir}/icons/*/*
@@ -145,5 +166,9 @@ mkdir -p %{buildroot}%{_kf5_sharedir}/icons/oxygen/scalable/status/small/{16x16,
%dir %{_kf5_sharedir}/doc/HTML/en
%dir %{_kf5_kxmlguidir}
%dir %{_kf5_appstreamdir}
%if 0%{?with_python}
%{_kf5_py2kf5dir}/
%{_kf5_py3kf5dir}/
%endif
%changelog

View File

@@ -31,6 +31,9 @@
%_kf5_htmldir %{_kf5_sharedir}/doc/HTML
%_kf5_kxmlguidir %{_kf5_sharedir}/kxmlgui5
%_kf5_appstreamdir %{_kf5_sharedir}/metainfo
%_kf5_py2kf5dir %{python2_sitelib}/PyKF5
%_kf5_py3kf5dir %{python3_sitelib}/PyKF5
%_kf5_pysipdir %{_kf5_sharedir}/sip/PyKF5
%_kf5_build_type None
@@ -171,3 +174,28 @@ if ! grep -q / $MO_NAME_NEW; then \
fi \
sort -u $MO_NAME_NEW >> $MO_NAME \
rm -f $MO_NAME_NEW
%kf5_python_bindings_package \
%package -n python2-%{name} \
Summary: Python bindings for %{name} \
Group: Development/Libraries/KDE \
Requires: %{name} = %{version} \
%requires_python_sip_api \
%description -n python2-%{name} \
This package contains Python 2 bindings for %{name}. \
\
%package -n python3-%{name} \
Summary: Python 3 bindings for %{name} \
Group: Development/Libraries/KDE \
Requires: %{name} = %{version} \
%requires_python3_sip_api \
%description -n python3-%{name} \
This package contains Python 3 bindings for %{name}. \
\
%package -n python-%{name}-devel \
Provides: %{python_module %{name}-devel} = %{version} \
Requires: %{python_module %{name}-devel} = %{version} \
Summary: Development files for %{name} Python bindings \
Group: Development/Libraries/KDE \
%description -n python-%{name}-devel \
This package contains the SIP files used to generate the Python bindings for %{name}.