]> git.pld-linux.org Git - packages/python-pygtk.git/blob - python-pygtk.spec
caf5fcb389614270da8ef45a5b1623f77fb69f6d
[packages/python-pygtk.git] / python-pygtk.spec
1 #
2 # Conditional build:
3 %bcond_without  numpy   # without numpy features
4 #
5 # todo: extensions?
6
7 %define         module  pygtk
8
9 Summary:        Python bindings for GTK+ 2.x libraries
10 Summary(pl.UTF-8):      Wiązania Pythona do bibliotek GTK+ 2.x
11 Name:           python-%{module}
12 Version:        2.24.0
13 Release:        1
14 Epoch:          2
15 License:        LGPL v2.1+
16 Group:          Libraries/Python
17 Source0:        http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/%{module}-%{version}.tar.bz2
18 # Source0-md5:  a1051d5794fd7696d3c1af6422d17a49
19 Source1:        %{name}-python.m4
20 Source2:        %{name}-jhflags.m4
21 Patch0:         %{name}-pyc.patch
22 Patch1:         %{name}-python27.patch
23 URL:            http://www.pygtk.org/
24 BuildRequires:  atk-devel >= 1:1.12.0
25 BuildRequires:  autoconf >= 2.52
26 BuildRequires:  automake >= 1:1.7
27 BuildRequires:  glib2-devel >= 1:2.8.0
28 BuildRequires:  gtk+2-devel >= 2:2.24.0
29 BuildRequires:  libglade2-devel >= 1:2.6.2
30 BuildRequires:  libtool
31 BuildRequires:  pango-devel >= 1:1.16.0
32 BuildRequires:  pkgconfig
33 BuildRequires:  python-devel >= 1:2.3.5
34 %{?with_numpy:BuildRequires:    python-numpy-devel >= 1:1.0}
35 BuildRequires:  python-pycairo-devel >= 1.2.6
36 BuildRequires:  python-pygobject-devel >= 2.22.0
37 # needs /usr/share/doc/gtk-doc/html/pygobject/style.css
38 BuildRequires:  python-pygobject-apidocs
39 BuildRequires:  rpm-pythonprov
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 Python bindings for GTK+ 2.x libraries. This package contains
44 documentation and examples.
45
46 %description -l pl.UTF-8
47 Wiązania Pythona do bibliotek GTK+ 2.x. Pakiet zawiera dokumentację
48 oraz przykłady.
49
50 %package devel
51 Summary:        Python bindings for GTK+ 2.x libraries - development files
52 Summary(pl.UTF-8):      Wiązania Pythona do bibliotek GTK+ 2.x - część rozwojowa
53 Group:          Development/Languages/Python
54 Requires:       %{name}-atk = %{epoch}:%{version}-%{release}
55 Requires:       %{name}-glade = %{epoch}:%{version}-%{release}
56 Requires:       %{name}-gtk = %{epoch}:%{version}-%{release}
57 Requires:       %{name}-pango = %{epoch}:%{version}-%{release}
58 Requires:       gtk+2-devel >= 2:2.24.0
59 Requires:       python-devel >= 1:2.3.5
60 Requires:       python-pygobject-devel >= 2.22.0
61 Obsoletes:      python-pygtk < 2:2.12.1-2
62
63 %description devel
64 This package contains files required to build wrappers for GTK+ addon
65 libraries so that they interoperate with Python bindings.
66
67 %description devel -l pl.UTF-8
68 Pakiet zawiera pliki wymagane do zbudowania funkcji do bibliotek GTK+,
69 tak by mogły te biblioteki kooperować z wiązaniami Pythona.
70
71 %package examples
72 Summary:        Example programs for pygtk
73 Summary(pl.UTF-8):      Programy przykładowe do pygtk
74 Group:          Development/Languages/Python
75 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
76
77 %description examples
78 This package contains example programs for pygtk.
79
80 %description examples -l pl.UTF-8
81 Ten pakiet zawiera przykładowe programy dla pygtk.
82
83 %package gtk
84 Summary:        Python bindings for GTK+ library
85 Summary(pl.UTF-8):      Wiązania Pythona do biblioteki GTK+
86 Group:          Libraries/Python
87 Requires:       %{name}-atk = %{epoch}:%{version}-%{release}
88 Requires:       %{name}-pango = %{epoch}:%{version}-%{release}
89 Requires:       gtk+2 >= 2:2.24.0
90 Requires:       python-pycairo >= 1.2.6
91 Obsoletes:      python-pygtk-glarea
92 Conflicts:      python-pygtk < 1:1.0
93
94 %description gtk
95 Python bindings for GTK+ library.
96
97 %description gtk -l pl.UTF-8
98 Wiązania Pythona do biblioteki GTK+.
99
100 %package atk
101 Summary:        Python bindings for ATK library
102 Summary(pl.UTF-8):      Wiązania Pythona do biblioteki ATK
103 Group:          Libraries/Python
104 Requires:       atk >= 1:1.12.0
105 Requires:       python-pygobject >= 2.22.0
106
107 %description atk
108 Python bindings for ATK library.
109
110 %description atk -l pl.UTF-8
111 Wiązania Pythona do biblioteki ATK.
112
113 %package pango
114 Summary:        Python bindings for Pango library
115 Summary(pl.UTF-8):      Wiązania Pythona do biblioteki Pango
116 Group:          Libraries/Python
117 Requires:       pango >= 1:1.16.0
118 Requires:       python-pycairo >= 1.2.6
119 Requires:       python-pygobject >= 2.22.0
120
121 %description pango
122 Python bindings for Pango library.
123
124 %description pango -l pl.UTF-8
125 Wiązania Pythona do biblioteki Pango.
126
127 %package glade
128 Summary:        Python bindings for Glade library
129 Summary(pl.UTF-8):      Wiązania Pythona do biblioteki Glade
130 Group:          Libraries/Python
131 Requires:       %{name}-gtk = %{epoch}:%{version}-%{release}
132 Requires:       libglade2 >= 1:2.6.2
133 Obsoletes:      python-pygtk-libglade < 1:1.0
134
135 %description glade
136 Python bindings for Glade library.
137
138 %description glade -l pl.UTF-8
139 Wiązania Pythona do biblioteki Glade.
140
141 %package apidocs
142 Summary:        pygtk API documentation
143 Summary(pl.UTF-8):      Dokumentacja API pygtk
144 Group:          Documentation
145 Requires:       gtk-doc-common
146
147 %description apidocs
148 pygtk API documentation.
149
150 %description apidocs -l pl.UTF-8
151 Dokumentacja API pygtk.
152
153 %prep
154 %setup -q -n %{module}-%{version}
155 %patch0 -p1
156 %patch1 -p1
157
158 # don't remove it
159 #mkdir m4
160 #cp %{SOURCE1} m4/python.m4
161 #cp %{SOURCE2} m4/jhflags.m4
162
163 %build
164 %{__libtoolize}
165 %{__aclocal} -I m4
166 %{__autoconf}
167 %{__autoheader}
168 %{__automake}
169 %configure \
170         --enable-thread \
171         %{!?with_numpy:--disable-numpy}
172 %{__make}
173
174 %install
175 rm -rf $RPM_BUILD_ROOT
176 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
177
178 %{__make} install \
179         DESTDIR=$RPM_BUILD_ROOT \
180         TARGET_DIR='%{_gtkdocdir}/%{name}'
181
182 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
183
184 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gtk-2.0/{*.la,*/*.la}
185 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gtk-2.0/gtk/*.py
186 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/pygtk/2.0/{demos,pygtk-demo*}
187
188 %clean
189 rm -rf $RPM_BUILD_ROOT
190
191 %files devel
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{_bindir}/pygtk-codegen-2.0
194 %attr(755,root,root) %{_bindir}/pygtk-demo
195 %dir %{_datadir}/pygtk
196 %dir %{_datadir}/pygtk/2.0
197 %dir %{_datadir}/pygtk/2.0/defs
198 %{_datadir}/pygtk/2.0/defs/*.defs
199 %{_datadir}/pygtk/2.0/defs/*.override
200 %{_includedir}/pygtk-2.0
201 %{_pkgconfigdir}/pygtk-2.0.pc
202
203 %files examples
204 %defattr(644,root,root,755)
205 %{_examplesdir}/%{name}-%{version}
206
207 %files gtk
208 %defattr(644,root,root,755)
209 %dir %{py_sitedir}/gtk-2.0/gtk
210 %attr(755,root,root) %{py_sitedir}/gtk-2.0/gtk/_gtk.so
211 %attr(755,root,root) %{py_sitedir}/gtk-2.0/gtkunixprint.so
212 %{py_sitedir}/gtk-2.0/gtk/*.py[co]
213
214 %files atk
215 %defattr(644,root,root,755)
216 %attr(755,root,root) %{py_sitedir}/gtk-2.0/atk.so
217
218 %files pango
219 %defattr(644,root,root,755)
220 %attr(755,root,root) %{py_sitedir}/gtk-2.0/pango.so
221 %attr(755,root,root) %{py_sitedir}/gtk-2.0/pangocairo.so
222
223 %files glade
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{py_sitedir}/gtk-2.0/gtk/glade.so
226
227 %files apidocs
228 %defattr(644,root,root,755)
229 %{_gtkdocdir}/%{name}
This page took 0.07924 seconds and 2 git commands to generate.