Branch and push for 2.0
[profile/ivi/pygobject2.git] / packaging / pygobject.spec
1 # Last updated for version 2.21.0
2 %define glib2_version                  2.22.4
3 %define python_version                2.3.5
4
5 ### Abstract ###
6
7 Name: pygobject
8 Version: 2.28.6
9 Release: 3%{?dist}
10 License: LGPLv2+
11 Group: Development/Languages
12 Summary: Python 2 bindings for GObject 
13 URL: http://www.pygtk.org/
14 Source: pygobject-%{version}.tar.bz2
15
16 ### Patches ###
17
18 ### Build Dependencies ###
19
20 BuildRequires: glib2-devel >= %{glib2_version}
21 BuildRequires: python-devel >= %{python_version}
22
23 # Bootstrap requirements
24 BuildRequires: automake autoconf libtool
25
26 %description
27 The %{name} package provides a convenient wrapper for the GObject library
28 for use in Python programs.
29
30 %package codegen
31 Summary: The code generation program for PyGObject
32 Group: Development/Languages
33
34 %description codegen
35 The package contains the C code generation program for PyGObject.
36
37 %package devel
38 Summary: Development files for building add-on libraries
39 Group: Development/Languages
40 Requires: %{name} = %{version}-%{release}
41 Requires: %{name}-codegen = %{version}-%{release}
42 Requires: %{name}-doc = %{version}-%{release}
43 Requires: glib2-devel
44 Requires: pkgconfig
45
46 %description devel
47 This package contains files required to build wrappers for %{name}-based
48 libraries such as pygtk2.
49
50 %package doc
51 Summary: Documentation files for %{name}
52 Group: Development/Languages
53
54 %description doc
55 This package contains documentation files for %{name}.
56
57 %prep
58 %setup -q -n pygobject-%{version}
59
60 find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
61
62 %build
63 PYTHON=%{__python} 
64 export PYTHON
65 %configure --disable-introspection
66 make %{?_smp_mflags}
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70
71 make DESTDIR=$RPM_BUILD_ROOT install
72 find $RPM_BUILD_ROOT -name '*.la' -delete
73 find $RPM_BUILD_ROOT -name '*.a' -delete
74
75 rm examples/Makefile*
76
77 %files
78 %defattr(644, root, root, 755)
79 %doc AUTHORS NEWS README
80 %doc examples
81
82 %{_libdir}/libpyglib-2.0-python.so*
83 %dir %{python_sitearch}/gtk-2.0
84 %dir %{python_sitearch}/gobject
85 %dir %{python_sitearch}/glib
86
87 %{python_sitearch}/gtk-2.0/*
88 %{python_sitearch}/pygtk.*
89 %{python_sitearch}/gobject/*
90 %{python_sitearch}/glib/*
91
92 %files codegen
93 %defattr(755, root, root, 755)
94 %{_bindir}/pygobject-codegen-2.0
95 %defattr(644, root, root, 755)
96 %dir %{_datadir}/pygobject/2.0
97 %{_datadir}/pygobject/2.0/codegen
98
99 %files devel
100 %defattr(644, root, root, 755)
101 %dir %{_datadir}/pygobject
102 %dir %{_includedir}/pygtk-2.0
103 %{_datadir}/pygobject/2.0/defs
104 %{_includedir}/pygtk-2.0/pyglib.h
105 %{_includedir}/pygtk-2.0/pygobject.h
106 %{_libdir}/pkgconfig/pygobject-2.0.pc
107
108 %files doc
109 %defattr(644, root, root, 755)
110 %{_datadir}/gtk-doc/html/pygobject
111 %{_datadir}/pygobject/xsl