PyKDE4-vl.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. %define pykde4_akonadi 1
  2. %define pyqt4_version_min 4.8.2
  3. %define sip_version_min 4.12
  4. %global python_ver %(%{__python} -c "import sys ; print sys.version[:3]")
  5. %global pyqt4_version %(%{__python} -c 'import PyQt4.pyqtconfig; print(PyQt4.pyqtconfig._pkg_config["pyqt_version_str"])' 2> /dev/null || echo %{pyqt4_version_min})
  6. Name: PyKDE4
  7. Summary: Python bindings for KDE4
  8. Summary(ja): KDE4 の Python バインディング
  9. Version: 4.7.4
  10. Release: 1%{?_dist_release}
  11. # http://techbase.kde.org/Policies/Licensing_Policy
  12. License: LGPLv2+
  13. Group: Development/Languages
  14. URL: http://developer.kde.org/language-bindings/
  15. Source0: ftp://ftp.kde.org/pub/kde/unstable/%{version}/src/pykde4-%{version}.tar.bz2
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  17. BuildRequires: akonadi-devel
  18. BuildRequires: kdebase-workspace-devel >= %{version}
  19. BuildRequires: okular-devel >= %{version}
  20. BuildRequires: kdelibs4-devel >= %{version}
  21. BuildRequires: kdepimlibs-devel >= %{version}
  22. BuildRequires: kate-devel >= %{version}
  23. BuildRequires: python-devel
  24. BuildRequires: PyQt4-devel >= %{pyqt4_version_min}
  25. BuildRequires: sip-devel >= %{sip_version_min}
  26. BuildRequires: qscintilla-devel >= 2.4
  27. BuildRequires: qimageblitz-devel
  28. BuildRequires: shared-desktop-ontologies-devel
  29. BuildRequires: soprano-devel
  30. Requires: kdelibs4 >= %{version}
  31. Requires: PyQt4 >= %{pyqt4_version}
  32. %description
  33. %{summary}.
  34. %package akonadi
  35. Summary: Akonadi runtime support for PyKDE4
  36. Summary: PyKDE4 の Akonadi ランタイムサポート
  37. Group: Development/Languages
  38. Requires: %{name} = %{version}-%{release}
  39. Requires: kdepimlibs-akonadi >= %{version}
  40. %description akonadi
  41. %{summary}.
  42. %package devel
  43. Summary: Files needed to build PyKDE4-based applications
  44. Summary(ja): PyKDE4 ベースのアプリケーション開発に必要なファイル
  45. Group: Development/Libraries
  46. Requires: PyQt4-devel
  47. Requires: %{name} = %{version}-%{release}
  48. Requires: %{name}-akonadi = %{version}-%{release}
  49. %description devel
  50. %{summary}.
  51. %prep
  52. %setup -q -n pykde4-%{version}
  53. %build
  54. mkdir -p %{_target_platform}
  55. pushd %{_target_platform}
  56. unset QTDIR || : ; . /etc/profile.d/qt4.sh
  57. %cmake \
  58. -DCMAKE_BUILD_TYPE=release \
  59. -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
  60. -DDATA_INSTALL_DIR:PATH=%{_datadir}/kde4/apps \
  61. -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/kde4 \
  62. -DLIB_INSTALL_DIR:PATH=%{_libdir} \
  63. -DLIBEXEC_INSTALL_DIR:PATH=%{_libexecdir}/kde4 \
  64. -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \
  65. -DPYTHON_LIBRARY=%{_libdir}/libpython%{python_ver}.so.1.0 \
  66. -DPYTHON_LIBRARIES=%{_libdir}/libpython%{python_ver}.so.1.0 \
  67. -DPYTHON_INCLUDE_PATH=%{_includedir}/python%{python_ver} \
  68. ..
  69. popd
  70. make %{?_smp_mflags} -C %{_target_platform}
  71. %install
  72. rm -rf $RPM_BUILD_ROOT
  73. make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}
  74. # HACK: fix multilib conflict, similar to PyQt4's http://bugzilla.redhat.com/509415
  75. rm -fv $RPM_BUILD_ROOT%{_bindir}/pykdeuic4
  76. mv $RPM_BUILD_ROOT%{python_sitearch}/PyQt4/uic/pykdeuic4.py \
  77. $RPM_BUILD_ROOT%{_bindir}/pykdeuic4
  78. ln -s %{_bindir}/pykdeuic4 \
  79. $RPM_BUILD_ROOT%{python_sitearch}/PyQt4/uic/pykdeuic4.py
  80. # install pykde4 examples under correct dir
  81. mkdir -p $RPM_BUILD_ROOT%{_docdir}
  82. rm -fv $RPM_BUILD_ROOT%{_datadir}/kde4/apps/pykde4/examples/*.py?
  83. mv $RPM_BUILD_ROOT%{_datadir}/kde4/apps/pykde4 $RPM_BUILD_ROOT%{_docdir}/
  84. %clean
  85. rm -rf $RPM_BUILD_ROOT
  86. %files
  87. %defattr(-,root,root,-)
  88. %{python_sitearch}/PyKDE4/
  89. %exclude %{python_sitearch}/PyKDE4/akonadi.so
  90. %{python_sitearch}/PyQt4/uic/widget-plugins/kde4.py*
  91. %dir %{_docdir}/pykde4
  92. %{_libdir}/kde4/kpythonpluginfactory.so
  93. %files akonadi
  94. %defattr(-,root,root,-)
  95. %{python_sitearch}/PyKDE4/akonadi.so
  96. %files devel
  97. %defattr(-,root,root,-)
  98. %{_bindir}/pykdeuic4
  99. %{python_sitearch}/PyQt4/uic/pykdeuic4.py*
  100. %{_datadir}/sip/PyKDE4/
  101. %{_docdir}/pykde4/examples/
  102. %changelog
  103. * Sat Dec 24 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.7.4-1
  104. - new upstream release
  105. * Sat Oct 29 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.7.2-1
  106. - new upstream release
  107. * Tue Aug 2 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.7.0-2
  108. - Initial build for Vine Linux
  109. * Tue Jul 26 2011 Jaroslav Reznik <jreznik@redhat.com> 4.7.0-1
  110. - 4.7.0
  111. * Fri Jul 08 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.95-1
  112. - 4.6.95
  113. * Thu Jul 07 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.90-1
  114. - first try