| 1 |
|
|---|
| 2 |
|
|---|
| 3 | Name: glib2
|
|---|
| 4 | %define _name glib
|
|---|
| 5 | Version: 2.25.15
|
|---|
| 6 | Release: 5%{?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 |
|
|---|
| 12 | %define svn_url http://svn.netlabs.org/repos/ports/glib/trunk
|
|---|
| 13 | %define svn_rev 508
|
|---|
| 14 |
|
|---|
| 15 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 16 |
|
|---|
| 17 | BuildRequires: 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
|
|---|
| 28 | BuildRequires: pkgconfig
|
|---|
| 29 | #BuildRequires: translation-update-upstream
|
|---|
| 30 | BuildRequires: zlib-devel
|
|---|
| 31 | BuildRequires: 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 | #
|
|---|
| 38 | Provides: glib2-doc = 2.19.6
|
|---|
| 39 | Obsoletes: glib2-doc < 2.19.6
|
|---|
| 40 | # YD this must be added to force dll install
|
|---|
| 41 | Requires: libglib-2_0-0 = %{version}
|
|---|
| 42 | Requires: libgmodule-2_0-0 = %{version}
|
|---|
| 43 | Requires: libgthread-2_0-0 = %{version}
|
|---|
| 44 | Requires: libgobject-2_0-0 = %{version}
|
|---|
| 45 |
|
|---|
| 46 | BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|---|
| 47 |
|
|---|
| 48 | %description
|
|---|
| 49 | This library provides convenient functions, such as lists and hashes,
|
|---|
| 50 | to 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 |
|
|---|
| 69 | This is a dumb package, which provides only upstream GNOME packages as
|
|---|
| 70 | preferred defaults. You most probably don't want this package. You
|
|---|
| 71 | probably want to install distribution default glib2-branding and prefer
|
|---|
| 72 | distribution wise GNOME defaults.
|
|---|
| 73 |
|
|---|
| 74 | %package devel
|
|---|
| 75 | #'
|
|---|
| 76 | License: GPLv2+
|
|---|
| 77 | Requires: %{name} = %{version} pkgconfig
|
|---|
| 78 | # glibc-devel
|
|---|
| 79 | # Now require the subpackages too
|
|---|
| 80 | Requires: libglib-2_0-0 = %{version}
|
|---|
| 81 | Requires: libgmodule-2_0-0 = %{version}
|
|---|
| 82 | #Requires: libgio-2_0-0 = %{version}
|
|---|
| 83 | Requires: libgthread-2_0-0 = %{version}
|
|---|
| 84 | Requires: libgobject-2_0-0 = %{version}
|
|---|
| 85 | Summary: Include files and libraries mandatory for development
|
|---|
| 86 | Group: Development/Libraries/C and C++
|
|---|
| 87 |
|
|---|
| 88 | %description devel
|
|---|
| 89 | This package contains all necessary include files, libraries,
|
|---|
| 90 | configuration files and development tools (with manual pages) needed to
|
|---|
| 91 | compile and link applications using the glib library.
|
|---|
| 92 |
|
|---|
| 93 | The glib library provides convenient functions, such as lists and
|
|---|
| 94 | hashes, to a C programmer and is used by Gtk+ and GNOME.
|
|---|
| 95 |
|
|---|
| 96 | %package -n libglib-2_0-0
|
|---|
| 97 | License: LGPLv2.1+
|
|---|
| 98 | Summary: A Library with Convenient Functions Written in C
|
|---|
| 99 | Group: Development/Libraries/C and C++
|
|---|
| 100 | #Recommends: %{name}-lang = %{version}
|
|---|
| 101 |
|
|---|
| 102 | %description -n libglib-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 libgmodule-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 | %description -n libgmodule-2_0-0
|
|---|
| 112 | This library provides convenient functions, such as lists and hashes,
|
|---|
| 113 | to 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
|
|---|
| 141 | License: LGPLv2.1+
|
|---|
| 142 | Summary: A Library with Convenient Functions Written in C
|
|---|
| 143 | Group: Development/Libraries/C and C++
|
|---|
| 144 | Requires: %{name} = %{version}
|
|---|
| 145 |
|
|---|
| 146 | %description -n libgthread-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 | %package -n libgobject-2_0-0
|
|---|
| 151 | License: LGPLv2.1+
|
|---|
| 152 | Summary: A Library with Convenient Functions Written in C
|
|---|
| 153 | Group: Development/Libraries/C and C++
|
|---|
| 154 |
|
|---|
| 155 | %description -n libgobject-2_0-0
|
|---|
| 156 | This library provides convenient functions, such as lists and hashes,
|
|---|
| 157 | to 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
|
|---|
| 167 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 168 | rm -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)
|
|---|
| 173 | svn export %{svn_url}/m4macros/glib-gettext.m4@892 m4macros/glib-gettext.m4 --force
|
|---|
| 174 | # fix emxexp exports (r904), also to be removed
|
|---|
| 175 | sed -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...
|
|---|
| 181 | autoconf
|
|---|
| 182 | ## Generate configure and friends
|
|---|
| 183 | #export NOCONFIGURE=1
|
|---|
| 184 | #autogen.sh
|
|---|
| 185 |
|
|---|
| 186 | %build
|
|---|
| 187 | export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
|
|---|
| 188 | export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 189 | export 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)
|
|---|
| 194 | sed -i "s/pass_all/pass_all\'\n_os2_dummy_var=\'/" config.status
|
|---|
| 195 | config.status
|
|---|
| 196 |
|
|---|
| 197 | make 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
|
|---|
| 208 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|---|
| 209 | cp AUTHORS $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|---|
| 210 | cp COPYING $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|---|
| 211 | cp README $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|---|
| 212 | cp NEWS $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|---|
| 213 | cp ChangeLog $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|---|
| 214 |
|
|---|
| 215 | cp glib/.libs/*.dll $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 216 | cp glib/.libs/*.lib $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 217 | cp gmodule/.libs/*.dll $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 218 | cp gmodule/.libs/*.lib $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 219 | cp gthread/.libs/*.dll $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 220 | cp gthread/.libs/*.lib $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 221 | cp gobject/.libs/*.dll $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 222 | cp gobject/.libs/*.lib $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 223 |
|
|---|
| 224 | rm $RPM_BUILD_ROOT%{_libdir}/charset.alias
|
|---|
| 225 | rm $RPM_BUILD_ROOT%{_mandir}/man1/gdbus.1
|
|---|
| 226 | rm $RPM_BUILD_ROOT%{_mandir}/man1/gio-querymodules.1
|
|---|
| 227 | rm $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
|
|---|
| 249 | rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
|---|
| 250 | #%endif
|
|---|
| 251 | %find_lang %{_name}20
|
|---|
| 252 | #%fdupes $RPM_BUILD_ROOT
|
|---|
| 253 |
|
|---|
| 254 |
|
|---|
| 255 | %clean
|
|---|
| 256 | rm -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.
|
|---|