| 1 | %define pykde4_akonadi 1 |
|---|
| 2 | %define pyqt4_version_min 4.8.5 |
|---|
| 3 | %define sip_version_min 4.12 |
|---|
| 4 | |
|---|
| 5 | %global python_ver %(%{__python} -c "import sys ; print sys.version[:3]") |
|---|
| 6 | %global pyqt4_version %(%{__python} -c 'import PyQt4.pyqtconfig; print(PyQt4.pyqtconfig._pkg_config["pyqt_version_str"])' 2> /dev/null || echo %{pyqt4_version_min}) |
|---|
| 7 | |
|---|
| 8 | Name: PyKDE4 |
|---|
| 9 | Summary: Python bindings for KDE4 |
|---|
| 10 | Summary(ja): KDE4 の Python バインディング |
|---|
| 11 | Version: 4.12.5 |
|---|
| 12 | Release: 1%{?_dist_release} |
|---|
| 13 | |
|---|
| 14 | # http://techbase.kde.org/Policies/Licensing_Policy |
|---|
| 15 | License: LGPLv2+ |
|---|
| 16 | Group: Development/Languages |
|---|
| 17 | URL: http://developer.kde.org/language-bindings/ |
|---|
| 18 | |
|---|
| 19 | Source0: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/pykde4-%{version}.tar.xz |
|---|
| 20 | |
|---|
| 21 | Patch0: pykde4-4.12.3-sip_4_15_5.patch |
|---|
| 22 | |
|---|
| 23 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
|---|
| 24 | BuildRequires: akonadi-devel |
|---|
| 25 | BuildRequires: kdebase-workspace-devel >= 4.11.6 |
|---|
| 26 | BuildRequires: kdelibs-devel >= %{version} |
|---|
| 27 | BuildRequires: kdepimlibs-devel >= %{version} |
|---|
| 28 | BuildRequires: python-devel |
|---|
| 29 | BuildRequires: PyQt4-devel >= %{pyqt4_version_min} |
|---|
| 30 | #BuildRequires: sip-devel >= %{sip_version_min} |
|---|
| 31 | BuildRequires: sip-devel |
|---|
| 32 | BuildRequires: qscintilla-devel >= 2.4 |
|---|
| 33 | BuildRequires: qimageblitz-devel |
|---|
| 34 | BuildRequires: shared-desktop-ontologies-devel |
|---|
| 35 | BuildRequires: soprano-devel |
|---|
| 36 | |
|---|
| 37 | Requires: kdelibs >= %{version} |
|---|
| 38 | Requires: PyQt4 >= %{pyqt4_version} |
|---|
| 39 | |
|---|
| 40 | Vendor: Project Vine |
|---|
| 41 | Distribution: Vine Linux |
|---|
| 42 | |
|---|
| 43 | %description |
|---|
| 44 | %{summary}. |
|---|
| 45 | |
|---|
| 46 | %package akonadi |
|---|
| 47 | Summary: Akonadi runtime support for PyKDE4 |
|---|
| 48 | Summary: PyKDE4 の Akonadi ランタイムサポート |
|---|
| 49 | Group: Development/Languages |
|---|
| 50 | Requires: %{name} = %{version}-%{release} |
|---|
| 51 | Requires: kdepimlibs-akonadi >= %{version} |
|---|
| 52 | |
|---|
| 53 | %description akonadi |
|---|
| 54 | %{summary}. |
|---|
| 55 | |
|---|
| 56 | %package devel |
|---|
| 57 | Summary: Files needed to build PyKDE4-based applications |
|---|
| 58 | Summary(ja): PyKDE4 ベースのアプリケーション開発に必要なファイル |
|---|
| 59 | Group: Development/Libraries |
|---|
| 60 | Requires: PyQt4-devel |
|---|
| 61 | Requires: %{name} = %{version}-%{release} |
|---|
| 62 | Requires: %{name}-akonadi = %{version}-%{release} |
|---|
| 63 | |
|---|
| 64 | %description devel |
|---|
| 65 | %{summary}. |
|---|
| 66 | |
|---|
| 67 | |
|---|
| 68 | %prep |
|---|
| 69 | %setup -q -n pykde4-%{version} |
|---|
| 70 | %patch0 -p1 -b .sip |
|---|
| 71 | |
|---|
| 72 | %build |
|---|
| 73 | mkdir -p %{_target_platform} |
|---|
| 74 | pushd %{_target_platform} |
|---|
| 75 | %cmake \ |
|---|
| 76 | -DCMAKE_BUILD_TYPE=release \ |
|---|
| 77 | -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ |
|---|
| 78 | -DDATA_INSTALL_DIR:PATH=%{_datadir}/kde4/apps \ |
|---|
| 79 | -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/kde4 \ |
|---|
| 80 | -DLIB_INSTALL_DIR:PATH=%{_libdir} \ |
|---|
| 81 | -DLIBEXEC_INSTALL_DIR:PATH=%{_libexecdir}/kde4 \ |
|---|
| 82 | -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \ |
|---|
| 83 | -DPYTHON_LIBRARY=%{_libdir}/libpython%{python_ver}.so.1.0 \ |
|---|
| 84 | -DPYTHON_LIBRARIES=%{_libdir}/libpython%{python_ver}.so.1.0 \ |
|---|
| 85 | -DPYTHON_INCLUDE_PATH=%{_includedir}/python%{python_ver} \ |
|---|
| 86 | .. |
|---|
| 87 | popd |
|---|
| 88 | |
|---|
| 89 | make %{?_smp_mflags} -C %{_target_platform} |
|---|
| 90 | |
|---|
| 91 | |
|---|
| 92 | %install |
|---|
| 93 | rm -rf $RPM_BUILD_ROOT |
|---|
| 94 | |
|---|
| 95 | make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform} |
|---|
| 96 | |
|---|
| 97 | # HACK: fix multilib conflict, similar to PyQt4's http://bugzilla.redhat.com/509415 |
|---|
| 98 | rm -fv $RPM_BUILD_ROOT%{_bindir}/pykdeuic4 |
|---|
| 99 | mv $RPM_BUILD_ROOT%{python_sitearch}/PyQt4/uic/pykdeuic4.py \ |
|---|
| 100 | $RPM_BUILD_ROOT%{_bindir}/pykdeuic4 |
|---|
| 101 | ln -s %{_bindir}/pykdeuic4 \ |
|---|
| 102 | $RPM_BUILD_ROOT%{python_sitearch}/PyQt4/uic/pykdeuic4.py |
|---|
| 103 | |
|---|
| 104 | # install pykde4 examples under correct dir |
|---|
| 105 | mkdir -p $RPM_BUILD_ROOT%{_docdir} |
|---|
| 106 | rm -fv $RPM_BUILD_ROOT%{_datadir}/kde4/apps/pykde4/examples/*.py? |
|---|
| 107 | mv $RPM_BUILD_ROOT%{_datadir}/kde4/apps/pykde4 $RPM_BUILD_ROOT%{_docdir}/ |
|---|
| 108 | |
|---|
| 109 | |
|---|
| 110 | %clean |
|---|
| 111 | rm -rf $RPM_BUILD_ROOT |
|---|
| 112 | |
|---|
| 113 | |
|---|
| 114 | %files |
|---|
| 115 | %defattr(-,root,root,-) |
|---|
| 116 | %{_bindir}/pykdeuic4-2.7 |
|---|
| 117 | %{python_sitearch}/PyKDE4/ |
|---|
| 118 | %exclude %{python_sitearch}/PyKDE4/akonadi.so |
|---|
| 119 | %{python_sitearch}/PyQt4/uic/widget-plugins/kde4.py* |
|---|
| 120 | %dir %{_docdir}/pykde4 |
|---|
| 121 | %{_libdir}/kde4/kpythonpluginfactory.so |
|---|
| 122 | |
|---|
| 123 | %files akonadi |
|---|
| 124 | %defattr(-,root,root,-) |
|---|
| 125 | %{python_sitearch}/PyKDE4/akonadi.so |
|---|
| 126 | |
|---|
| 127 | %files devel |
|---|
| 128 | %defattr(-,root,root,-) |
|---|
| 129 | %{_bindir}/pykdeuic4 |
|---|
| 130 | %{python_sitearch}/PyQt4/uic/pykdeuic4.py* |
|---|
| 131 | %{_datadir}/sip/PyKDE4/ |
|---|
| 132 | %{_docdir}/pykde4/examples/ |
|---|
| 133 | |
|---|
| 134 | %changelog |
|---|
| 135 | * Tue May 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.12.5-1 |
|---|
| 136 | - new upstream release |
|---|
| 137 | - add Patch0 (pykde4-4.12.3-sip_4_15_5.patch) |
|---|
| 138 | |
|---|
| 139 | * Sun Feb 09 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.12.2-1 |
|---|
| 140 | - new upstream release |
|---|
| 141 | |
|---|
| 142 | * Sun Dec 15 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.11.4-1 |
|---|
| 143 | - new upstream release |
|---|
| 144 | |
|---|
| 145 | * Sun Sep 08 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.11.1-1 |
|---|
| 146 | - new upstream release |
|---|
| 147 | |
|---|
| 148 | * Sat Jul 06 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.10.5-1 |
|---|
| 149 | - new upstream release |
|---|
| 150 | - remove BuildRequires: okular-devel, kate-devel |
|---|
| 151 | |
|---|
| 152 | * Fri Jan 04 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.5-1 |
|---|
| 153 | - new upstream release |
|---|
| 154 | |
|---|
| 155 | * Sat Nov 10 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.3-1 |
|---|
| 156 | - new upstream release |
|---|
| 157 | |
|---|
| 158 | * Sun Oct 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.2-1 |
|---|
| 159 | - new upstream release |
|---|
| 160 | |
|---|
| 161 | * Thu Sep 06 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.1-1 |
|---|
| 162 | - new upstream release |
|---|
| 163 | |
|---|
| 164 | * Sun Aug 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.0-1 |
|---|
| 165 | - new upstream release |
|---|
| 166 | |
|---|
| 167 | * Sun Feb 26 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.7.4-2 |
|---|
| 168 | - rebuild with python-2.7.2 |
|---|
| 169 | |
|---|
| 170 | * Sat Dec 24 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.7.4-1 |
|---|
| 171 | - new upstream release |
|---|
| 172 | |
|---|
| 173 | * Sat Oct 29 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.7.2-1 |
|---|
| 174 | - new upstream release |
|---|
| 175 | |
|---|
| 176 | * Tue Aug 2 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.7.0-2 |
|---|
| 177 | - Initial build for Vine Linux |
|---|
| 178 | |
|---|
| 179 | * Tue Jul 26 2011 Jaroslav Reznik <jreznik@redhat.com> 4.7.0-1 |
|---|
| 180 | - 4.7.0 |
|---|
| 181 | |
|---|
| 182 | * Fri Jul 08 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.95-1 |
|---|
| 183 | - 4.6.95 |
|---|
| 184 | |
|---|
| 185 | * Thu Jul 07 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.90-1 |
|---|
| 186 | - first try |
|---|
| 187 | |
|---|