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

Last change on this file since 770 was 645, checked in by dmik, 10 years ago

spec: glib2: Release 2.25.15-5.

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