1 | %define pykde4_akonadi 1 |
---|
2 | %define pyqt4_version_min 4.8.2 |
---|
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.7.4 |
---|
12 | Release: 2%{?_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/unstable/%{version}/src/pykde4-%{version}.tar.bz2 |
---|
20 | |
---|
21 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
22 | BuildRequires: akonadi-devel |
---|
23 | BuildRequires: kdebase-workspace-devel >= %{version} |
---|
24 | BuildRequires: okular-devel >= %{version} |
---|
25 | BuildRequires: kdelibs4-devel >= %{version} |
---|
26 | BuildRequires: kdepimlibs-devel >= %{version} |
---|
27 | BuildRequires: kate-devel >= %{version} |
---|
28 | BuildRequires: python-devel |
---|
29 | BuildRequires: PyQt4-devel >= %{pyqt4_version_min} |
---|
30 | BuildRequires: sip-devel >= %{sip_version_min} |
---|
31 | BuildRequires: qscintilla-devel >= 2.4 |
---|
32 | BuildRequires: qimageblitz-devel |
---|
33 | BuildRequires: shared-desktop-ontologies-devel |
---|
34 | BuildRequires: soprano-devel |
---|
35 | |
---|
36 | Requires: kdelibs4 >= %{version} |
---|
37 | Requires: PyQt4 >= %{pyqt4_version} |
---|
38 | |
---|
39 | %description |
---|
40 | %{summary}. |
---|
41 | |
---|
42 | %package akonadi |
---|
43 | Summary: Akonadi runtime support for PyKDE4 |
---|
44 | Summary: PyKDE4 の Akonadi ランタイムサポート |
---|
45 | Group: Development/Languages |
---|
46 | Requires: %{name} = %{version}-%{release} |
---|
47 | Requires: kdepimlibs-akonadi >= %{version} |
---|
48 | |
---|
49 | %description akonadi |
---|
50 | %{summary}. |
---|
51 | |
---|
52 | %package devel |
---|
53 | Summary: Files needed to build PyKDE4-based applications |
---|
54 | Summary(ja): PyKDE4 ベースのアプリケーション開発に必要なファイル |
---|
55 | Group: Development/Libraries |
---|
56 | Requires: PyQt4-devel |
---|
57 | Requires: %{name} = %{version}-%{release} |
---|
58 | Requires: %{name}-akonadi = %{version}-%{release} |
---|
59 | |
---|
60 | %description devel |
---|
61 | %{summary}. |
---|
62 | |
---|
63 | |
---|
64 | %prep |
---|
65 | %setup -q -n pykde4-%{version} |
---|
66 | |
---|
67 | %build |
---|
68 | mkdir -p %{_target_platform} |
---|
69 | pushd %{_target_platform} |
---|
70 | #unset QTDIR || : ; . /etc/profile.d/qt4.sh |
---|
71 | %cmake \ |
---|
72 | -DCMAKE_BUILD_TYPE=release \ |
---|
73 | -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ |
---|
74 | -DDATA_INSTALL_DIR:PATH=%{_datadir}/kde4/apps \ |
---|
75 | -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/kde4 \ |
---|
76 | -DLIB_INSTALL_DIR:PATH=%{_libdir} \ |
---|
77 | -DLIBEXEC_INSTALL_DIR:PATH=%{_libexecdir}/kde4 \ |
---|
78 | -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \ |
---|
79 | -DPYTHON_LIBRARY=%{_libdir}/libpython%{python_ver}.so.1.0 \ |
---|
80 | -DPYTHON_LIBRARIES=%{_libdir}/libpython%{python_ver}.so.1.0 \ |
---|
81 | -DPYTHON_INCLUDE_PATH=%{_includedir}/python%{python_ver} \ |
---|
82 | .. |
---|
83 | popd |
---|
84 | |
---|
85 | make %{?_smp_mflags} -C %{_target_platform} |
---|
86 | |
---|
87 | |
---|
88 | %install |
---|
89 | rm -rf $RPM_BUILD_ROOT |
---|
90 | |
---|
91 | make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform} |
---|
92 | |
---|
93 | # HACK: fix multilib conflict, similar to PyQt4's http://bugzilla.redhat.com/509415 |
---|
94 | rm -fv $RPM_BUILD_ROOT%{_bindir}/pykdeuic4 |
---|
95 | mv $RPM_BUILD_ROOT%{python_sitearch}/PyQt4/uic/pykdeuic4.py \ |
---|
96 | $RPM_BUILD_ROOT%{_bindir}/pykdeuic4 |
---|
97 | ln -s %{_bindir}/pykdeuic4 \ |
---|
98 | $RPM_BUILD_ROOT%{python_sitearch}/PyQt4/uic/pykdeuic4.py |
---|
99 | |
---|
100 | # install pykde4 examples under correct dir |
---|
101 | mkdir -p $RPM_BUILD_ROOT%{_docdir} |
---|
102 | rm -fv $RPM_BUILD_ROOT%{_datadir}/kde4/apps/pykde4/examples/*.py? |
---|
103 | mv $RPM_BUILD_ROOT%{_datadir}/kde4/apps/pykde4 $RPM_BUILD_ROOT%{_docdir}/ |
---|
104 | |
---|
105 | |
---|
106 | %clean |
---|
107 | rm -rf $RPM_BUILD_ROOT |
---|
108 | |
---|
109 | |
---|
110 | %files |
---|
111 | %defattr(-,root,root,-) |
---|
112 | %{python_sitearch}/PyKDE4/ |
---|
113 | %exclude %{python_sitearch}/PyKDE4/akonadi.so |
---|
114 | %{python_sitearch}/PyQt4/uic/widget-plugins/kde4.py* |
---|
115 | %dir %{_docdir}/pykde4 |
---|
116 | %{_libdir}/kde4/kpythonpluginfactory.so |
---|
117 | |
---|
118 | %files akonadi |
---|
119 | %defattr(-,root,root,-) |
---|
120 | %{python_sitearch}/PyKDE4/akonadi.so |
---|
121 | |
---|
122 | %files devel |
---|
123 | %defattr(-,root,root,-) |
---|
124 | %{_bindir}/pykdeuic4 |
---|
125 | %{python_sitearch}/PyQt4/uic/pykdeuic4.py* |
---|
126 | %{_datadir}/sip/PyKDE4/ |
---|
127 | %{_docdir}/pykde4/examples/ |
---|
128 | |
---|
129 | %changelog |
---|
130 | * Sun Feb 26 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.7.4-2 |
---|
131 | - rebuild with python-2.7.2 |
---|
132 | |
---|
133 | * Sat Dec 24 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.7.4-1 |
---|
134 | - new upstream release |
---|
135 | |
---|
136 | * Sat Oct 29 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.7.2-1 |
---|
137 | - new upstream release |
---|
138 | |
---|
139 | * Tue Aug 2 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.7.0-2 |
---|
140 | - Initial build for Vine Linux |
---|
141 | |
---|
142 | * Tue Jul 26 2011 Jaroslav Reznik <jreznik@redhat.com> 4.7.0-1 |
---|
143 | - 4.7.0 |
---|
144 | |
---|
145 | * Fri Jul 08 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.95-1 |
---|
146 | - 4.6.95 |
---|
147 | |
---|
148 | * Thu Jul 07 2011 Rex Dieter <rdieter@fedoraproject.org> 4.6.90-1 |
---|
149 | - first try |
---|
150 | |
---|