1 |
%define bootstrap 0 |
2 |
%{?_without_bootstrap: %global bootstrap 0} |
3 |
%{?_with_bootstrap: %global bootstrap 1} |
4 |
|
5 |
%define name gobject-introspection |
6 |
%define version 1.29.0 |
7 |
%define git 0 |
8 |
%define rel 4 |
9 |
|
10 |
%if %git |
11 |
%define release %mkrel -c %{git} %{rel} |
12 |
%else |
13 |
%define release %mkrel %{rel} |
14 |
%endif |
15 |
|
16 |
%define api 1.0 |
17 |
%define major 1 |
18 |
%define libname %mklibname girepository %{api} %{major} |
19 |
%define develname %mklibname -d girepository |
20 |
|
21 |
%define url_ver %(echo %{version} | cut -d. -f1,2) |
22 |
|
23 |
%define _requires_exceptions typelib(GOBJ) |
24 |
|
25 |
Summary: GObject Introspection |
26 |
Name: %{name} |
27 |
Version: %{version} |
28 |
Release: %{release} |
29 |
|
30 |
%if %{git} |
31 |
Source0: %{name}-%{git}.tar.xz |
32 |
%else |
33 |
Source0: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/%{url_ver}/%{name}-%{version}.tar.xz |
34 |
%endif |
35 |
|
36 |
Source1: glib-2.0.c |
37 |
Patch0: gobject-introspection-fix-link.patch |
38 |
License: GPLv2+ and LGPLv2+ |
39 |
Group: Development/C |
40 |
Url: http://www.gnome.org |
41 |
BuildRequires: glib2-devel >= 2.25.8 |
42 |
BuildRequires: ffi5-devel |
43 |
BuildRequires: python-devel |
44 |
BuildRequires: freetype2-devel |
45 |
BuildRequires: cairo-devel |
46 |
BuildRequires: fontconfig-devel |
47 |
BuildRequires: GL-devel |
48 |
BuildRequires: libxft-devel |
49 |
BuildRequires: flex |
50 |
BuildRequires: bison |
51 |
BuildRequires: gnome-common |
52 |
BuildRequires: libtool |
53 |
%if !%{bootstrap} |
54 |
BuildRequires: gtk-doc |
55 |
%endif |
56 |
Conflicts: %{mklibname girepository 1.0 0} < 0.6.10-5mdv |
57 |
Conflicts: gir-repository < 0.6.5-12.20100622.3mdv |
58 |
|
59 |
%description |
60 |
The goal of the project is to describe the APIs and collect them in |
61 |
a uniform, machine readable format. |
62 |
|
63 |
%package -n %{libname} |
64 |
Group: System/Libraries |
65 |
Summary: GObject Introspection shared library |
66 |
Conflicts: %{name} < 0.6.8-2mdv |
67 |
Requires: %{name} >= %{version} |
68 |
|
69 |
%description -n %{libname} |
70 |
The goal of the project is to describe the APIs and collect them in |
71 |
a uniform, machine readable format. |
72 |
|
73 |
|
74 |
%package -n %{develname} |
75 |
Group: Development/C |
76 |
Summary: GObject Introspection development libraries |
77 |
Requires: %{libname} = %{version}-%{release} |
78 |
Provides: libgirepository-devel = %{version}-%{release} |
79 |
Provides: %{name}-devel = %{version}-%{release} |
80 |
#gw /usr/bin/libtool is called in giscanner |
81 |
Requires: libtool |
82 |
|
83 |
%description -n %{develname} |
84 |
The goal of the project is to describe the APIs and collect them in |
85 |
a uniform, machine readable format. |
86 |
|
87 |
%prep |
88 |
%if %{git} |
89 |
%setup -q -n %{name} |
90 |
%else |
91 |
%setup -q |
92 |
%endif |
93 |
|
94 |
%apply_patches |
95 |
|
96 |
# From Ubuntu: |
97 |
# Roll back to gir/glib-2.0 as of before upstream commit 6d30588c1. |
98 |
# Later commits have a GVariant which current pygobject does not |
99 |
# deal with. This is fixed in the invoke-rewrite branch of |
100 |
# pygobject, so until this lands we need the older annotations. |
101 |
pushd gir |
102 |
rm -rf glib-2.0.c |
103 |
cp %{SOURCE1} . |
104 |
popd |
105 |
|
106 |
%build |
107 |
|
108 |
%if %{git} |
109 |
./autogen.sh -V |
110 |
%else |
111 |
autoreconf -fi |
112 |
%endif |
113 |
|
114 |
%configure2_5x \ |
115 |
%if !%{bootstrap} |
116 |
--enable-gtk-doc \ |
117 |
%endif |
118 |
--disable-static |
119 |
|
120 |
%make |
121 |
|
122 |
%install |
123 |
rm -rf %{buildroot} |
124 |
%makeinstall_std |
125 |
|
126 |
# don't ship .la |
127 |
#find %{buildroot} -name '*.la' -exec rm -f {} \; |
128 |
|
129 |
%check |
130 |
make check |
131 |
|
132 |
%clean |
133 |
rm -rf %{buildroot} |
134 |
|
135 |
%files |
136 |
%defattr(-,root,root) |
137 |
%doc README NEWS TODO AUTHORS |
138 |
%dir %{_libdir}/girepository-%{api} |
139 |
%{_libdir}/girepository-%{api}/DBus-1.0.typelib |
140 |
%{_libdir}/girepository-%{api}/DBusGLib-1.0.typelib |
141 |
%{_libdir}/girepository-%{api}/GIRepository-2.0.typelib |
142 |
%{_libdir}/girepository-%{api}/GL-1.0.typelib |
143 |
%{_libdir}/girepository-%{api}/GLib-2.0.typelib |
144 |
%{_libdir}/girepository-%{api}/GModule-2.0.typelib |
145 |
%{_libdir}/girepository-%{api}/GObject-2.0.typelib |
146 |
%{_libdir}/girepository-%{api}/Gio-2.0.typelib |
147 |
%{_libdir}/girepository-%{api}/cairo-1.0.typelib |
148 |
%{_libdir}/girepository-%{api}/fontconfig-2.0.typelib |
149 |
%{_libdir}/girepository-%{api}/freetype2-2.0.typelib |
150 |
%{_libdir}/girepository-%{api}/libxml2-2.0.typelib |
151 |
%{_libdir}/girepository-%{api}/xfixes-4.0.typelib |
152 |
%{_libdir}/girepository-%{api}/xft-2.0.typelib |
153 |
%{_libdir}/girepository-%{api}/xlib-2.0.typelib |
154 |
%{_libdir}/girepository-%{api}/xrandr-1.3.typelib |
155 |
|
156 |
%files -n %{libname} |
157 |
%defattr(-,root,root) |
158 |
%{_libdir}/libgirepository-%{api}.so.%{major}* |
159 |
|
160 |
%files -n %{develname} |
161 |
%defattr(-,root,root) |
162 |
%doc ChangeLog |
163 |
%{_libdir}/libgirepository-%{api}.so |
164 |
%{_libdir}/pkgconfig/gobject-introspection-%{api}.pc |
165 |
%{_libdir}/pkgconfig/gobject-introspection-no-export-%{api}.pc |
166 |
%{_includedir}/%{name}-%{api} |
167 |
%{_datadir}/aclocal/*.m4 |
168 |
%{_datadir}/%{name}-%{api} |
169 |
%{_bindir}/g-ir-* |
170 |
%{_libdir}/%{name} |
171 |
%{_datadir}/gtk-doc/html/gi |
172 |
%dir %{_datadir}/gir-%{api} |
173 |
%{_datadir}/gir-%{api}/DBus-1.0.gir |
174 |
%{_datadir}/gir-%{api}/DBusGLib-1.0.gir |
175 |
%{_datadir}/gir-%{api}/GIRepository-2.0.gir |
176 |
%{_datadir}/gir-%{api}/GL-1.0.gir |
177 |
%{_datadir}/gir-%{api}/GLib-2.0.gir |
178 |
%{_datadir}/gir-%{api}/GModule-2.0.gir |
179 |
%{_datadir}/gir-%{api}/GObject-2.0.gir |
180 |
%{_datadir}/gir-%{api}/Gio-2.0.gir |
181 |
%{_datadir}/gir-%{api}/cairo-1.0.gir |
182 |
%{_datadir}/gir-%{api}/fontconfig-2.0.gir |
183 |
%{_datadir}/gir-%{api}/freetype2-2.0.gir |
184 |
%{_datadir}/gir-%{api}/libxml2-2.0.gir |
185 |
%{_datadir}/gir-%{api}/xfixes-4.0.gir |
186 |
%{_datadir}/gir-%{api}/xft-2.0.gir |
187 |
%{_datadir}/gir-%{api}/xlib-2.0.gir |
188 |
%{_datadir}/gir-%{api}/xrandr-1.3.gir |
189 |
%{_mandir}/man1/* |
190 |
%{_libdir}/*.la |