| 1 |
|
|---|
| 2 |
|
|---|
| 3 | Name: glib2
|
|---|
| 4 | %define _name glib
|
|---|
| 5 | Version: 2.25.15
|
|---|
| 6 | Release: 4%{?dist}
|
|---|
| 7 | License: LGPLv2.1+
|
|---|
| 8 | Summary: A Library with Convenient Functions Written in C
|
|---|
| 9 | Url: http://www.gtk.org/
|
|---|
| 10 | Group: Development/Libraries/C and C++
|
|---|
| 11 | Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/2.14/%{_name}-%{version}.tar.gz
|
|---|
| 12 | Source1: glib-gspawn-os2.c
|
|---|
| 13 |
|
|---|
| 14 | Patch0: %{_name}-%{version}-os2.diff
|
|---|
| 15 |
|
|---|
| 16 | #BuildRequires: fam-devel
|
|---|
| 17 | #BuildRequires: fdupes
|
|---|
| 18 | #BuildRequires: gcc-c++
|
|---|
| 19 | #BuildRequires: pcre-devel
|
|---|
| 20 | BuildRequires: pkgconfig
|
|---|
| 21 | #BuildRequires: translation-update-upstream
|
|---|
| 22 | BuildRequires: 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 | #
|
|---|
| 29 | Provides: glib2-doc = 2.19.6
|
|---|
| 30 | Obsoletes: glib2-doc < 2.19.6
|
|---|
| 31 | # YD this must be added to force dll install
|
|---|
| 32 | Requires: libglib-2_0-0 = %{version}
|
|---|
| 33 | Requires: libgmodule-2_0-0 = %{version}
|
|---|
| 34 | Requires: libgthread-2_0-0 = %{version}
|
|---|
| 35 | Requires: libgobject-2_0-0 = %{version}
|
|---|
| 36 |
|
|---|
| 37 | BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|---|
| 38 |
|
|---|
| 39 | %description
|
|---|
| 40 | This library provides convenient functions, such as lists and hashes,
|
|---|
| 41 | to 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 |
|
|---|
| 60 | This is a dumb package, which provides only upstream GNOME packages as
|
|---|
| 61 | preferred defaults. You most probably don't want this package. You
|
|---|
| 62 | probably want to install distribution default glib2-branding and prefer
|
|---|
| 63 | distribution wise GNOME defaults.
|
|---|
| 64 |
|
|---|
| 65 | %package devel
|
|---|
| 66 | #'
|
|---|
| 67 | License: GPLv2+
|
|---|
| 68 | Requires: %{name} = %{version} pkgconfig
|
|---|
| 69 | # glibc-devel
|
|---|
| 70 | # Now require the subpackages too
|
|---|
| 71 | Requires: libglib-2_0-0 = %{version}
|
|---|
| 72 | Requires: libgmodule-2_0-0 = %{version}
|
|---|
| 73 | #Requires: libgio-2_0-0 = %{version}
|
|---|
| 74 | Requires: libgthread-2_0-0 = %{version}
|
|---|
| 75 | Requires: libgobject-2_0-0 = %{version}
|
|---|
| 76 | Summary: Include files and libraries mandatory for development
|
|---|
| 77 | Group: Development/Libraries/C and C++
|
|---|
| 78 |
|
|---|
| 79 | %description devel
|
|---|
| 80 | This package contains all necessary include files, libraries,
|
|---|
| 81 | configuration files and development tools (with manual pages) needed to
|
|---|
| 82 | compile and link applications using the glib library.
|
|---|
| 83 |
|
|---|
| 84 | The glib library provides convenient functions, such as lists and
|
|---|
| 85 | hashes, to a C programmer and is used by Gtk+ and GNOME.
|
|---|
| 86 |
|
|---|
| 87 | %package -n libglib-2_0-0
|
|---|
| 88 | License: LGPLv2.1+
|
|---|
| 89 | Summary: A Library with Convenient Functions Written in C
|
|---|
| 90 | Group: Development/Libraries/C and C++
|
|---|
| 91 | #Recommends: %{name}-lang = %{version}
|
|---|
| 92 |
|
|---|
| 93 | %description -n libglib-2_0-0
|
|---|
| 94 | This library provides convenient functions, such as lists and hashes,
|
|---|
| 95 | to a C programmer and is used by Gtk+ and GNOME.
|
|---|
| 96 |
|
|---|
| 97 | %package -n libgmodule-2_0-0
|
|---|
| 98 | License: LGPLv2.1+
|
|---|
| 99 | Summary: A Library with Convenient Functions Written in C
|
|---|
| 100 | Group: Development/Libraries/C and C++
|
|---|
| 101 |
|
|---|
| 102 | %description -n libgmodule-2_0-0
|
|---|
| 103 | This library provides convenient functions, such as lists and hashes,
|
|---|
| 104 | to 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
|
|---|
| 132 | License: LGPLv2.1+
|
|---|
| 133 | Summary: A Library with Convenient Functions Written in C
|
|---|
| 134 | Group: Development/Libraries/C and C++
|
|---|
| 135 | Requires: %{name} = %{version}
|
|---|
| 136 |
|
|---|
| 137 | %description -n libgthread-2_0-0
|
|---|
| 138 | This library provides convenient functions, such as lists and hashes,
|
|---|
| 139 | to a C programmer and is used by Gtk+ and GNOME.
|
|---|
| 140 |
|
|---|
| 141 | %package -n libgobject-2_0-0
|
|---|
| 142 | License: LGPLv2.1+
|
|---|
| 143 | Summary: A Library with Convenient Functions Written in C
|
|---|
| 144 | Group: Development/Libraries/C and C++
|
|---|
| 145 |
|
|---|
| 146 | %description -n libgobject-2_0-0
|
|---|
| 147 | This library provides convenient functions, such as lists and hashes,
|
|---|
| 148 | to 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
|
|---|
| 156 | cp %{SOURCE1} glib/gspawn-os2.c
|
|---|
| 157 |
|
|---|
| 158 | %build
|
|---|
| 159 | export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
|
|---|
| 160 | export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 161 | export 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)
|
|---|
| 167 | sed -i "s/pass_all/pass_all\'\n_os2_dummy_var=\'/" config.status
|
|---|
| 168 | config.status
|
|---|
| 169 |
|
|---|
| 170 | make 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
|
|---|
| 181 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|---|
| 182 | cp AUTHORS $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|---|
| 183 | cp COPYING $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|---|
| 184 | cp README $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|---|
| 185 | cp NEWS $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|---|
| 186 | cp ChangeLog $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|---|
| 187 |
|
|---|
| 188 | cp glib/.libs/*.dll $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 189 | cp glib/.libs/*.lib $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 190 | cp gmodule/.libs/*.dll $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 191 | cp gmodule/.libs/*.lib $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 192 | cp gthread/.libs/*.dll $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 193 | cp gthread/.libs/*.lib $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 194 | cp gobject/.libs/*.dll $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 195 | cp gobject/.libs/*.lib $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 196 |
|
|---|
| 197 | rm $RPM_BUILD_ROOT%{_libdir}/charset.alias
|
|---|
| 198 | rm $RPM_BUILD_ROOT%{_mandir}/man1/gdbus.1
|
|---|
| 199 | rm $RPM_BUILD_ROOT%{_mandir}/man1/gio-querymodules.1
|
|---|
| 200 | rm $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
|
|---|
| 229 | rm -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.
|
|---|