source: spec/trunk/SPECS/glib2.spec@ 360

Last change on this file since 360 was 309, checked in by Yuri Dario, 13 years ago

spec: glib2 include Dmitry's changes for OpenJDK build.

  • Property svn:eol-style set to native
File size: 10.0 KB
Line 
1
2
3Name: glib2
4%define _name glib
5Version: 2.25.15
6Release: 4%{?dist}
7License: LGPLv2.1+
8Summary: A Library with Convenient Functions Written in C
9Url: http://www.gtk.org/
10Group: Development/Libraries/C and C++
11Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/2.14/%{_name}-%{version}.tar.gz
12Source1: glib-gspawn-os2.c
13
14Patch0: %{_name}-%{version}-os2.diff
15
16#BuildRequires: fam-devel
17#BuildRequires: fdupes
18#BuildRequires: gcc-c++
19#BuildRequires: pcre-devel
20BuildRequires: pkgconfig
21#BuildRequires: translation-update-upstream
22BuildRequires: zlib-devel
23# For temporary %%posttrans script only.
24#PreReq: coreutils
25#PreReq: /bin/sed
26#Requires: %{name}-branding
27#Requires: %{name}-lang = %{version}
28#
29Provides: glib2-doc = 2.19.6
30Obsoletes: glib2-doc < 2.19.6
31# YD this must be added to force dll install
32Requires: libglib-2_0-0 = %{version}
33Requires: libgmodule-2_0-0 = %{version}
34Requires: libgthread-2_0-0 = %{version}
35Requires: libgobject-2_0-0 = %{version}
36
37BuildRoot: %{_tmppath}/%{name}-%{version}-build
38
39%description
40This library provides convenient functions, such as lists and hashes,
41to a C programmer and is used by Gtk+ and GNOME.
42
43#%package branding-upstream
44#License: LGPLv2.1+
45#Summary: Definition of GNOME Default Applications
46#Group: Development/Libraries/C and C++
47#Provides: %{name}-branding = %{version}
48#Conflicts: otherproviders(%{name}-branding)
49#Supplements: packageand(%{name}:branding-upstream)
50#BRAND: The /etc/gnome_defaults.conf allows to define arbitrary
51#BRAND: applications as preferred defaults.
52# NOTE: gnome_defaults is not an upstream feature, but a SuSE
53# enhancement, but to conform branding conventions, the package is named
54# as glib2-branding-upstream.
55
56#%description branding-upstream
57#This branding-style package sets default applications in GNOME in
58#openSUSE.
59
60This is a dumb package, which provides only upstream GNOME packages as
61preferred defaults. You most probably don't want this package. You
62probably want to install distribution default glib2-branding and prefer
63distribution wise GNOME defaults.
64
65%package devel
66#'
67License: GPLv2+
68Requires: %{name} = %{version} pkgconfig
69# glibc-devel
70# Now require the subpackages too
71Requires: libglib-2_0-0 = %{version}
72Requires: libgmodule-2_0-0 = %{version}
73#Requires: libgio-2_0-0 = %{version}
74Requires: libgthread-2_0-0 = %{version}
75Requires: libgobject-2_0-0 = %{version}
76Summary: Include files and libraries mandatory for development
77Group: Development/Libraries/C and C++
78
79%description devel
80This package contains all necessary include files, libraries,
81configuration files and development tools (with manual pages) needed to
82compile and link applications using the glib library.
83
84The glib library provides convenient functions, such as lists and
85hashes, to a C programmer and is used by Gtk+ and GNOME.
86
87%package -n libglib-2_0-0
88License: LGPLv2.1+
89Summary: A Library with Convenient Functions Written in C
90Group: Development/Libraries/C and C++
91#Recommends: %{name}-lang = %{version}
92
93%description -n libglib-2_0-0
94This library provides convenient functions, such as lists and hashes,
95to a C programmer and is used by Gtk+ and GNOME.
96
97%package -n libgmodule-2_0-0
98License: LGPLv2.1+
99Summary: A Library with Convenient Functions Written in C
100Group: Development/Libraries/C and C++
101
102%description -n libgmodule-2_0-0
103This library provides convenient functions, such as lists and hashes,
104to a C programmer and is used by Gtk+ and GNOME.
105
106#%package -n libgio-2_0-0
107#License: LGPLv2.1+
108#Summary: A Library with Convenient Functions Written in C
109#Group: Development/Libraries/C and C++
110#
111# Temporarily disable this, pending further discussion
112# Recommends: gvfs
113
114#%description -n libgio-2_0-0
115#This library provides convenient functions, such as lists and hashes,
116#to a C programmer and is used by Gtk+ and GNOME.
117
118#%package -n libgio-fam
119#License: LGPLv2.1+
120#Summary: A Library with Convenient Functions Written in C
121#Group: Development/Libraries/C and C++
122# we need gio-querymodules in %post/%postun
123#Requires(post): %{name}
124#Requires(postun): %{name}
125#Supplements: packageand(libgio-2_0-0:fam)
126
127#%description -n libgio-fam
128#This library provides convenient functions, such as lists and hashes,
129#to a C programmer and is used by Gtk+ and GNOME.
130
131%package -n libgthread-2_0-0
132License: LGPLv2.1+
133Summary: A Library with Convenient Functions Written in C
134Group: Development/Libraries/C and C++
135Requires: %{name} = %{version}
136
137%description -n libgthread-2_0-0
138This library provides convenient functions, such as lists and hashes,
139to a C programmer and is used by Gtk+ and GNOME.
140
141%package -n libgobject-2_0-0
142License: LGPLv2.1+
143Summary: A Library with Convenient Functions Written in C
144Group: Development/Libraries/C and C++
145
146%description -n libgobject-2_0-0
147This library provides convenient functions, such as lists and hashes,
148to a C programmer and is used by Gtk+ and GNOME.
149
150%lang_package
151
152%prep
153%setup -q -n %{_name}-%{version}
154#translation-update-upstream
155%patch0 -p1
156cp %{SOURCE1} glib/gspawn-os2.c
157
158%build
159export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
160export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
161export LIBS="-lurpo -lmmap -lpthread"
162%configure \
163 --enable-shared --disable-static \
164 "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
165
166# YD fix extra CRLF after pass_all and execute it again (libtool hack breaks sed substitutions)
167sed -i "s/pass_all/pass_all\'\n_os2_dummy_var=\'/" config.status
168config.status
169
170make OPT="$CFLAGS" %{?_smp_mflags}
171
172%check
173# make check does not work on x86_64. See http://bugzilla.gnome.org/show_bug.cgi?id=554969
174# %{__make} %{?jobs:-j%jobs} check
175
176%install
177%makeinstall
178#%if 0%{?suse_version} <= 1120
179#%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
180#%endif
181mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
182cp AUTHORS $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
183cp COPYING $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
184cp README $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
185cp NEWS $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
186cp ChangeLog $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
187
188cp glib/.libs/*.dll $RPM_BUILD_ROOT%{_libdir}
189cp glib/.libs/*.lib $RPM_BUILD_ROOT%{_libdir}
190cp gmodule/.libs/*.dll $RPM_BUILD_ROOT%{_libdir}
191cp gmodule/.libs/*.lib $RPM_BUILD_ROOT%{_libdir}
192cp gthread/.libs/*.dll $RPM_BUILD_ROOT%{_libdir}
193cp gthread/.libs/*.lib $RPM_BUILD_ROOT%{_libdir}
194cp gobject/.libs/*.dll $RPM_BUILD_ROOT%{_libdir}
195cp gobject/.libs/*.lib $RPM_BUILD_ROOT%{_libdir}
196
197rm $RPM_BUILD_ROOT%{_libdir}/charset.alias
198rm $RPM_BUILD_ROOT%{_mandir}/man1/gdbus.1
199rm $RPM_BUILD_ROOT%{_mandir}/man1/gio-querymodules.1
200rm $RPM_BUILD_ROOT%{_mandir}/man1/gsettings.1
201
202#install -D -m0644 glib2.sh $RPM_BUILD_ROOT/etc/profile.d/zzz-glib2.sh
203#install -D -m0644 glib2.csh $RPM_BUILD_ROOT/etc/profile.d/zzz-glib2.csh
204#install -D -m0755 SuSEconfig.glib2 $RPM_BUILD_ROOT/sbin/conf.d/SuSEconfig.glib2
205#install -D -m0644 gnome_defaults.conf $RPM_BUILD_ROOT%{_sysconfdir}/gnome_defaults.conf
206# default apps magic
207#mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/gio-2.0 $RPM_BUILD_ROOT%{_datadir}/applications
208#touch $RPM_BUILD_ROOT%{_localstatedir}/cache/gio-2.0/defaults.list
209#ln -s %{_localstatedir}/cache/gio-2.0/defaults.list $RPM_BUILD_ROOT%{_datadir}/applications/defaults.list
210# fix some permission issue, but only if needed
211#test ! -x $RPM_BUILD_ROOT/%{_bindir}/gtester-report
212#chmod +x $RPM_BUILD_ROOT/%{_bindir}/gtester-report
213# gio-querymodules magic
214#%if "%{_lib}" == "lib64"
215#mv $RPM_BUILD_ROOT%{_bindir}/gio-querymodules $RPM_BUILD_ROOT%{_bindir}/gio-querymodules-64
216#%endif
217#touch $RPM_BUILD_ROOT%{_libdir}/gio/modules/giomodule.cache
218# remove files we don't care about
219#rm $RPM_BUILD_ROOT%{_libdir}/gio/modules/libgiofam.*a
220# We do not need the la files for 11.1 and newer
221#%if %suse_version > 1100
222#rm $RPM_BUILD_ROOT%{_libdir}/*.la
223#%endif
224#%find_lang %{_name}20
225#%fdupes $RPM_BUILD_ROOT
226
227
228%clean
229rm -rf $RPM_BUILD_ROOT
230
231
232%files
233%defattr(-,root,root)
234%doc AUTHORS COPYING README NEWS ChangeLog
235#/etc/profile.d/zzz-glib2.*
236#/sbin/conf.d/SuSEconfig.glib2
237#%{_bindir}/gio-querymodules*
238
239#%files branding-upstream
240#%defattr(-,root,root)
241#%config (noreplace) %{_sysconfdir}/gnome_defaults.conf
242
243%files -n libglib-2_0-0
244%defattr(-, root, root)
245%{_libdir}/glib*.dll
246
247%files -n libgmodule-2_0-0
248%defattr(-, root, root)
249%{_libdir}/gmod*.dll
250
251%files -n libgobject-2_0-0
252%defattr(-, root, root)
253%{_libdir}/gobj*.dll
254
255%files -n libgthread-2_0-0
256%defattr(-, root, root)
257%{_libdir}/gthr*.dll
258
259#%files -n libgio-2_0-0
260#%defattr(-, root, root)
261#%{_libdir}/libgio*.so.*
262#%dir %{_libdir}/gio
263#%dir %{_libdir}/gio/modules
264#%ghost %{_libdir}/gio/modules/giomodule.cache
265##%{_datadir}/applications/defaults.list
266#%dir %{_localstatedir}/cache/gio-2.0
267#%ghost %{_localstatedir}/cache/gio-2.0/defaults.list
268
269#%files -n libgio-fam
270#%defattr(-,root,root)
271#%{_libdir}/gio/modules/libgiofam.so
272
273#%files lang -f %{_name}20.lang
274
275%files devel
276%defattr(-,root,root)
277%{_bindir}/glib-*
278%{_bindir}/gobject-*
279%{_bindir}/gtester*
280%doc %{_mandir}/man?/glib-*.*
281%doc %{_mandir}/man?/gobject-*.*
282%doc %{_mandir}/man?/gtester*.*
283%{_datadir}/aclocal/*.m4
284%{_datadir}/glib-2.0
285%{_includedir}/glib-2.0
286#%{_includedir}/gio-unix-2.0
287#%{_libdir}/*.dll
288%{_libdir}/*.*a
289%{_libdir}/*.lib
290%{_libdir}/glib-2.0
291%{_libdir}/pkgconfig/*.pc
292%{_datadir}/gtk-doc/html/gio
293%{_datadir}/gtk-doc/html/glib
294%{_datadir}/gtk-doc/html/gobject
295#%{_datadir}/gdb/auto-load/%{_libdir}/*-gdb.py
296%{_datadir}/gdb/auto-load/*
297# Own these directories to not depend on gtk-doc while building:
298%dir %{_datadir}/gtk-doc
299%dir %{_datadir}/gtk-doc/html
300# Own these directories to not depend on gdb
301%dir %{_datadir}/gdb
302%dir %{_datadir}/gdb/auto-load
303#%dir %{_datadir}/gdb/auto-load/%{_prefix}
304#%dir %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}
305
306%changelog
307* Wed Jul 18 2012 yd
308- include Dmitry's changes for OpenJDK build.
Note: See TracBrowser for help on using the repository browser.