]> git.pld-linux.org Git - packages/python-pygtk.git/blob - python-pygtk.spec
fix shebangs
[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 Summary:        Python bindings for GTK+ 2.x libraries
9 Summary(pl.UTF-8):      Wiązania Pythona do bibliotek GTK+ 2.x
10 Name:           python-%{module}
11 Version:        2.24.0
12 Release:        4
13 Epoch:          2
14 License:        LGPL v2.1+
15 Group:          Libraries/Python
16 Source0:        http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/%{module}-%{version}.tar.bz2
17 # Source0-md5:  a1051d5794fd7696d3c1af6422d17a49
18 Source1:        %{name}-python.m4
19 Source2:        %{name}-jhflags.m4
20 Patch0:         %{name}-pyc.patch
21 Patch1:         %{name}-python27.patch
22 Patch2:         drop-pangofont.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 %if "%{_rpmversion}" >= "5"
147 BuildArch:      noarch
148 %endif
149
150 %description apidocs
151 pygtk API documentation.
152
153 %description apidocs -l pl.UTF-8
154 Dokumentacja API pygtk.
155
156 %prep
157 %setup -q -n %{module}-%{version}
158 %patch0 -p1
159 %patch1 -p1
160 %patch2 -p1
161
162 grep -r '#!.*env python' -l examples | xargs %{__sed} -i -e '1s,#!.*env python.*,#!%{__python},'
163
164 # don't remove it
165 #mkdir m4
166 #cp %{SOURCE1} m4/python.m4
167 #cp %{SOURCE2} m4/jhflags.m4
168
169 %build
170 %{__libtoolize}
171 %{__aclocal} -I m4
172 %{__autoconf}
173 %{__autoheader}
174 %{__automake}
175 %configure \
176         PYTHON=%{__python} \
177         --enable-thread \
178         %{!?with_numpy:--disable-numpy}
179 %{__make}
180
181 %install
182 rm -rf $RPM_BUILD_ROOT
183 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
184
185 %{__make} install \
186         DESTDIR=$RPM_BUILD_ROOT \
187         TARGET_DIR='%{_gtkdocdir}/%{name}'
188
189 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
190
191 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gtk-2.0/{*.la,*/*.la}
192 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gtk-2.0/gtk/*.py
193 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/pygtk/2.0/{demos,pygtk-demo*}
194
195 %clean
196 rm -rf $RPM_BUILD_ROOT
197
198 %files devel
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_bindir}/pygtk-codegen-2.0
201 %attr(755,root,root) %{_bindir}/pygtk-demo
202 %dir %{_datadir}/pygtk
203 %dir %{_datadir}/pygtk/2.0
204 %dir %{_datadir}/pygtk/2.0/defs
205 %{_datadir}/pygtk/2.0/defs/*.defs
206 %{_datadir}/pygtk/2.0/defs/*.override
207 %{_includedir}/pygtk-2.0
208 %{_pkgconfigdir}/pygtk-2.0.pc
209
210 %files examples
211 %defattr(644,root,root,755)
212 %{_examplesdir}/%{name}-%{version}
213
214 %files gtk
215 %defattr(644,root,root,755)
216 %dir %{py_sitedir}/gtk-2.0/gtk
217 %attr(755,root,root) %{py_sitedir}/gtk-2.0/gtk/_gtk.so
218 %attr(755,root,root) %{py_sitedir}/gtk-2.0/gtkunixprint.so
219 %{py_sitedir}/gtk-2.0/gtk/*.py[co]
220
221 %files atk
222 %defattr(644,root,root,755)
223 %attr(755,root,root) %{py_sitedir}/gtk-2.0/atk.so
224
225 %files pango
226 %defattr(644,root,root,755)
227 %attr(755,root,root) %{py_sitedir}/gtk-2.0/pango.so
228 %attr(755,root,root) %{py_sitedir}/gtk-2.0/pangocairo.so
229
230 %files glade
231 %defattr(644,root,root,755)
232 %attr(755,root,root) %{py_sitedir}/gtk-2.0/gtk/glade.so
233
234 %files apidocs
235 %defattr(644,root,root,755)
236 %{_gtkdocdir}/%{name}
This page took 0.114992 seconds and 3 git commands to generate.