diff options
-rw-r--r-- | packaging/baselibs.conf | 22 | ||||
-rw-r--r-- | packaging/glib2-upstream-gnome_defaults.conf | 46 | ||||
-rw-r--r-- | packaging/glib2.csh | 468 | ||||
-rw-r--r-- | packaging/glib2.sh | 465 | ||||
-rw-r--r-- | packaging/glib2.spec | 422 | ||||
-rw-r--r-- | packaging/gtk-doc.m4 | 67 | ||||
-rw-r--r-- | packaging/macros.glib2 | 73 |
7 files changed, 1563 insertions, 0 deletions
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf new file mode 100644 index 0000000..f2977fd --- /dev/null +++ b/packaging/baselibs.conf @@ -0,0 +1,22 @@ +glib2-tools + +/usr/bin/gio-querymodules(-64)? +libglib + obsoletes "glib2-<targettype> <= <version>" + provides "glib2-<targettype> = <version>" +libgmodule +libgio +libgthread +libgobject +libgio-fam + requires "glib2-tools-<targettype>" + post "%if "%_lib" == "lib64"" + post "<prefix>%{_bindir}/gio-querymodules-64 <prefix>%{_libdir}/gio/modules" + post "%else" + post "<prefix>%{_bindir}/gio-querymodules <prefix>%{_libdir}/gio/modules" + post "%endif" + postun "%if "%_lib" == "lib64"" + postun "<prefix>%{_bindir}/gio-querymodules-64 <prefix>%{_libdir}/gio/modules" + postun "%else" + postun "<prefix>%{_bindir}/gio-querymodules <prefix>%{_libdir}/gio/modules" + postun "%endif" + diff --git a/packaging/glib2-upstream-gnome_defaults.conf b/packaging/glib2-upstream-gnome_defaults.conf new file mode 100644 index 0000000..599ee82 --- /dev/null +++ b/packaging/glib2-upstream-gnome_defaults.conf @@ -0,0 +1,46 @@ +# GNOME Default Applications Source +# /etc/gnome-defaults.conf +# +# WARNING: This is a dumb file, which provides only upstream GNOME +# packages as preferred defaults. You most probably don't want this +# package! +# You probably want to install distribution glib2-branding and prefer +# distribution wise GNOME defaults. +# +# After any change of this file run +# SuSEconfig --module glib2 +# +# This list is a source for defaults.list. +# +# If application in this list is installed, it is used as default in GNOME. +# It works in following way: +# 1. Read this file. +# 2. Collect all available desktop files. +# 3. Go through all declared MIME types and search for default application +# for defaults.list in following order: +# 3.1 Installed application listed here for certain MIME type. +# 3.2 Installed application listed here as preferred default. +# 3.3 Installed application listed here as default. +# 3.4 Installed application with GNOME in Categories. +# 3.5 Installed application with GTK in Categories. +# 3.6 Installed application. +# If there are more applications in the same order, it uses pseudo-randomly +# one of them (last in aplhabetical order). +# +# Syntax: +# Use xxx as default for all MIME types it declares (see 3.3): +# xxx.desktop +# Use xxx as preferred default for all MIME types it declares (see 3.2): +# !xxx.desktop +# Use xxx as default for mime/type (see 3.1): +# mime/type=xxx.desktop + +# Upstream GNOME default applications +eog.desktop +evince.desktop +gedit.desktop +file-roller.desktop +epiphany.desktop +nautilus-folder-handler.desktop +# evince supports multi-page tiff, but most people will prefer eog: +image/tiff=eog.desktop diff --git a/packaging/glib2.csh b/packaging/glib2.csh new file mode 100644 index 0000000..aac46f3 --- /dev/null +++ b/packaging/glib2.csh @@ -0,0 +1,468 @@ +# GLib filename encoding guesser. +# Author: Stanislav Brabec <sbrabec@suse.cz> +# Additions are welcome. +# This script must be executed after setting LANG variable. + +# Try filenames which are invalid in UTF-8 as locale specific. +# For selected locales, G_FILENAME_ENCODING takes precedence. +setenv G_BROKEN_FILENAMES 1 + +# In West Europe there was used both ISO-8859-15 and ISO-8859-1. +# There is no chance to recognize it, so we must guess. +#set west_europe_legacy_encoding=ISO-8859-1 +set west_europe_legacy_encoding=ISO-8859-15 + +# In Russia, "official" encoding is ISO-8859-5, but most GNOME users +# preferred KOI8-R. We must guess. +#set russian_legacy_encoding=ISO-8859-5 +set russian_legacy_encoding=KOI8-R + +# In former Yugoslavia sr_YU have covered two different alphabets - +# one Latin and on Cyrillic. No chance to guess. +set sr_YU_legacy_encoding=ISO-8859-2,CP1250 +#set sr_YU_legacy_encoding=ISO-8859-5 + +# Japanese uses two legacy encodings. Guess sometimes fails, sometimes not. +# Defining preferred encoding increases chance for success. +set japanese_legacy_encoding=EUC-JP +#set japanese_legacy_encoding=SHIFT_JIS + +if (! ${?LANG} ) goto skip + +switch ( $LANG ) + case aa_DJ*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case af_ZA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case an_ES*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-15,CP1252 + breaksw + case ar_AE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_BH*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_DZ*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_EG*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_IQ*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_JO*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_KW*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_LB*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_LY*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_MA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_OM*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_QA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_SA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_SD*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_SY*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_TN*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case ar_YE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-6 + breaksw + case be_BY*: + setenv G_FILENAME_ENCODING @locale,UTF-8,CP1251 + breaksw + case bg_BG*: + setenv G_FILENAME_ENCODING @locale,UTF-8,CP1251 + breaksw + case br_FR*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case bs_BA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-2,CP1250 + breaksw + case ca_ES*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case cs_CZ*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-2,CP1250 + breaksw + case cy_GB*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-14,CP1252 + breaksw + case da_DK*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case de_AT*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case de_BE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case de_DE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case de_CH*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case de_LU*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case el_GR*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-7 + breaksw + case en_AU*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case en_BE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case en_BW*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case en_CA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case en_DK*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case en_GB*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case en_HK*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case en_IE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case en_NZ*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case en_PH*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case en_SG*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case en_US*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case en_ZA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case en_ZW*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_AR*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_BO*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_CL*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_CO*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_CR*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_DO*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_EC*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_ES*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case es_GT*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_HN*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_MX*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_NI*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_PA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_PE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_PR*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_PY*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_SV*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_US*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_UY*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case es_VE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case et_EE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case eu_ES*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case fa_IR*: + setenv G_FILENAME_ENCODING @locale,UTF-8,CP1256 + breaksw + case fi_FI*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case fo_FO*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case fr_BE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case fr_CA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case fr_FR*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case fr_CH*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case fr_LU*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case ga_IE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case gd_GB*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-15,CP1252 + breaksw + case gl_ES*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case gv_GB*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case he_IL*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-8 + breaksw + case hr_HR*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-2,CP1250 + breaksw + case hu_HU*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-2,CP1250 + breaksw + case hy_AM*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ARMSCII-8 + breaksw + case id_ID*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case is_IS*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case it_CH*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case it_IT*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case iw_IL*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-8 + breaksw + case ja_JP*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$japanese_legacy_encoding,EUC-JP,SHIFT_JIS,ISO-8859-1 + breaksw + case ka_GE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,GEORGIAN-PS + breaksw + case kl_GL*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case km_KH*: + setenv G_FILENAME_ENCODING @locale,UTF-8,GB18030 + breaksw + case ko_KR*: + setenv G_FILENAME_ENCODING @locale,UTF-8,EUC-KR,ISO-8859-1 + breaksw + case kw_GB*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case lg_UG*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-10,CP1252 + breaksw + case lt_LT*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-13,CP1252 + breaksw + case lv_LV*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-13,CP1252 + breaksw + case mi_NZ*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-13,CP1252 + breaksw + case mk_MK*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-5,CP1251 + breaksw + case ms_MY*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case mt_MT*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-3 + breaksw + case nb_NO*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case nl_BE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case nl_NL*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case nn_NO*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case no_NO*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case oc_FR*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case om_KE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case pl_PL*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-2,CP1250 + breaksw + case pt_BR*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case pt_PT*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case ro_RO*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-2,CP1250 + breaksw + case ru_RU*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$russian_legacy_encoding,CP1251 + breaksw + case ru_UA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,KOI8-U + breaksw + case sh_YU*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-2,CP1250 + breaksw + case sk_SK*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-2,CP1250 + breaksw + case sl_SI*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-2,CP1250 + breaksw + case so_DJ*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case so_KE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case so_SO*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case sq_AL*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case sr_YU*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$sr_YU_legacy_encoding + breaksw + case st_ZA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case sv_FI*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case sv_SE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case tg_TJ*: + setenv G_FILENAME_ENCODING @locale,UTF-8,KOI8-T + breaksw + case th_TH*: + setenv G_FILENAME_ENCODING @locale,UTF-8,TIS-620,ISO-8859-1 + breaksw + case tl_PH*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case tr_TR*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-9 + breaksw + case uk_UA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,KOI8-U + breaksw + case uz_UZ*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case vi_VN*: + setenv G_FILENAME_ENCODING @locale,UTF-8,TCVN5712-1,ISO-8859-1 + breaksw + case wa_BE*: + setenv G_FILENAME_ENCODING @locale,UTF-8,$west_europe_legacy_encoding,CP1252 + breaksw + case xh_ZA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw + case yi_US*: + setenv G_FILENAME_ENCODING @locale,UTF-8,CP1255 + breaksw + case zh_CN*: + setenv G_FILENAME_ENCODING @locale,UTF-8,GB2312,GB18030,GBK,ISO-8859-1 + breaksw + case zh_HK*: + setenv G_FILENAME_ENCODING @locale,UTF-8,BIG5-HKSCS,ISO-8859-1 + breaksw + case zh_SG*: + setenv G_FILENAME_ENCODING @locale,UTF-8,GB2312,GB18030,GBK,ISO-8859-1 + breaksw + case zh_TW*: + setenv G_FILENAME_ENCODING @locale,UTF-8,BIG5,EUC-TW,ISO-8859-1 + breaksw + case zu_ZA*: + setenv G_FILENAME_ENCODING @locale,UTF-8,ISO-8859-1,CP1252 + breaksw +endsw + +skip: + +unset west_europe_legacy_encoding +unset russian_legacy_encoding +unset sr_YU_legacy_encoding diff --git a/packaging/glib2.sh b/packaging/glib2.sh new file mode 100644 index 0000000..b8f63c8 --- /dev/null +++ b/packaging/glib2.sh @@ -0,0 +1,465 @@ +# GLib filename encoding guesser. +# Author: Stanislav Brabec <sbrabec@suse.cz> +# Additions are welcome. +# This script must be executed after setting LANG variable. + +# Try filenames which are invalid in UTF-8 as locale specific. +# For selected locales, G_FILENAME_ENCODING takes precedence. +export G_BROKEN_FILENAMES=1 + +# In West Europe there was used both ISO-8859-15 and ISO-8859-1. +# There is no chance to recognize it, so we must guess. +#west_europe_legacy_encoding=ISO-8859-1 +west_europe_legacy_encoding=ISO-8859-15 + +# In Russia, "official" encoding is ISO-8859-5, but most GNOME users +# preferred KOI8-R. We must guess. +#russian_legacy_encoding=ISO-8859-5 +russian_legacy_encoding=KOI8-R + +# In former Yugoslavia sr_YU have covered two different alphabets - +# one Latin and on Cyrillic. No chance to guess. +sr_YU_legacy_encoding=ISO-8859-2,CP1250 +#sr_YU_legacy_encoding=ISO-8859-5 + +# Japanese uses two legacy encodings. Guess sometimes fails, sometimes not. +# Defining preferred encoding increases chance for success. +japanese_legacy_encoding=EUC-JP +#japanese_legacy_encoding=SHIFT_JIS + +case $LANG in + aa_DJ* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + af_ZA* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + an_ES* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-15,CP1252 + ;; + ar_AE* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_BH* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_DZ* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_EG* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_IQ* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_JO* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_KW* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_LB* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_LY* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_MA* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_OM* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_QA* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_SA* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_SD* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_SY* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_TN* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + ar_YE* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6 + ;; + be_BY* ) + G_FILENAME_ENCODING=@locale,UTF-8,CP1251 + ;; + bg_BG* ) + G_FILENAME_ENCODING=@locale,UTF-8,CP1251 + ;; + br_FR* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + bs_BA* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250 + ;; + ca_ES* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + cs_CZ* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250 + ;; + cy_GB* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-14,CP1252 + ;; + da_DK* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + de_AT* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + de_BE* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + de_DE* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + de_CH* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + de_LU* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + el_GR* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-7 + ;; + en_AU* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + en_BE* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + en_BW* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + en_CA* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + en_DK* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + en_GB* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + en_HK* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + en_IE* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + en_NZ* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + en_PH* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + en_SG* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + en_US* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + en_ZA* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + en_ZW* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_AR* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_BO* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_CL* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_CO* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_CR* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_DO* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_EC* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_ES* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + es_GT* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_HN* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_MX* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_NI* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_PA* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_PE* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_PR* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_PY* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_SV* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_US* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_UY* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + es_VE* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + et_EE* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + eu_ES* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + fa_IR* ) + G_FILENAME_ENCODING=@locale,UTF-8,CP1256 + ;; + fi_FI* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + fo_FO* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + fr_BE* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + fr_CA* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + fr_FR* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + fr_CH* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + fr_LU* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + ga_IE* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + gd_GB* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-15,CP1252 + ;; + gl_ES* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + gv_GB* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + he_IL* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-8 + ;; + hr_HR* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250 + ;; + hu_HU* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250 + ;; + hy_AM* ) + G_FILENAME_ENCODING=@locale,UTF-8,ARMSCII-8 + ;; + id_ID* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + is_IS* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + it_CH* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + it_IT* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + iw_IL* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-8 + ;; + ja_JP* ) + G_FILENAME_ENCODING=@locale,UTF-8,$japanese_legacy_encoding,EUC-JP,SHIFT_JIS,ISO-8859-1 + ;; + ka_GE* ) + G_FILENAME_ENCODING=@locale,UTF-8,GEORGIAN-PS + ;; + kl_GL* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + km_KH* ) + G_FILENAME_ENCODING=@locale,UTF-8,GB18030 + ;; + ko_KR* ) + G_FILENAME_ENCODING=@locale,UTF-8,EUC-KR,ISO-8859-1 + ;; + kw_GB* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + lg_UG* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-10,CP1252 + ;; + lt_LT* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-13,CP1252 + ;; + lv_LV* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-13,CP1252 + ;; + mi_NZ* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-13,CP1252 + ;; + mk_MK* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-5,CP1251 + ;; + ms_MY* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + mt_MT* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-3 + ;; + nb_NO* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + nl_BE* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + nl_NL* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + nn_NO* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + no_NO* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + oc_FR* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + om_KE* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + pl_PL* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250 + ;; + pt_BR* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + pt_PT* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + ro_RO* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250 + ;; + ru_RU* ) + G_FILENAME_ENCODING=@locale,UTF-8,$russian_legacy_encoding,CP1251 + ;; + ru_UA* ) + G_FILENAME_ENCODING=@locale,UTF-8,KOI8-U + ;; + sh_YU* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250 + ;; + sk_SK* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250 + ;; + sl_SI* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250 + ;; + so_DJ* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + so_KE* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + so_SO* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + sq_AL* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + sr_YU* ) + G_FILENAME_ENCODING=@locale,UTF-8,$sr_YU_legacy_encoding + ;; + st_ZA* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + sv_FI* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + sv_SE* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + tg_TJ* ) + G_FILENAME_ENCODING=@locale,UTF-8,KOI8-T + ;; + th_TH* ) + G_FILENAME_ENCODING=@locale,UTF-8,TIS-620,ISO-8859-1 + ;; + tl_PH* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + tr_TR* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-9 + ;; + uk_UA* ) + G_FILENAME_ENCODING=@locale,UTF-8,KOI8-U + ;; + uz_UZ* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + vi_VN* ) + G_FILENAME_ENCODING=@locale,UTF-8,TCVN5712-1,ISO-8859-1 + ;; + wa_BE* ) + G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252 + ;; + xh_ZA* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; + yi_US* ) + G_FILENAME_ENCODING=@locale,UTF-8,CP1255 + ;; + zh_CN* ) + G_FILENAME_ENCODING=@locale,UTF-8,GB2312,GB18030,GBK,ISO-8859-1 + ;; + zh_HK* ) + G_FILENAME_ENCODING=@locale,UTF-8,BIG5-HKSCS,ISO-8859-1 + ;; + zh_SG* ) + G_FILENAME_ENCODING=@locale,UTF-8,GB2312,GB18030,GBK,ISO-8859-1 + ;; + zh_TW* ) + G_FILENAME_ENCODING=@locale,UTF-8,BIG5,EUC-TW,ISO-8859-1 + ;; + zu_ZA* ) + G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252 + ;; +esac +export G_FILENAME_ENCODING + +unset west_europe_legacy_encoding +unset russian_legacy_encoding +unset sr_YU_legacy_encoding diff --git a/packaging/glib2.spec b/packaging/glib2.spec new file mode 100644 index 0000000..b7f9d83 --- /dev/null +++ b/packaging/glib2.spec @@ -0,0 +1,422 @@ +%define with_systemtap 0 +%define keepstatic 1 + +Name: glib2 +Version: 2.35.8 +Release: 2.2 +# FIXME: find out if tapsets should really be in devel package or in main package +Summary: General-Purpose Utility Library +License: LGPL-2.1+ +Group: System/Libraries +Url: http://www.gtk.org/ +Source: glib2-%{version}.tar.bz2 +Source1: glib2.sh +Source2: glib2.csh +# Not upstream file. Only proposes upstream packages: +Source4: glib2-upstream-gnome_defaults.conf +Source6: macros.glib2 +# Not depending on gtk-doc shortens bootstrap compilation path. +# Please update this file from the latest gtk-doc package: +Source7: gtk-doc.m4 +Source99: baselibs.conf +BuildRequires: glib2 +BuildRequires: autoconf +BuildRequires: libtool +BuildRequires: automake +BuildRequires: gcc-c++ +BuildRequires: gettext +%if 0%{?with_systemtap} +BuildRequires: systemtap-sdt-devel +%endif +# Needed for gresource +%if 0%{?fedora_version} || 0%{?centos_version} +BuildRequires: pkgconfig +BuildRequires: libffi-devel +BuildRequires: elfutils-libelf-devel +BuildRequires: glibc-devel +BuildRequires: zlib-devel +%else +BuildRequires: pkg-config +BuildRequires: pkgconfig(libelf) >= 0.8.12 +BuildRequires: pkgconfig(libffi) +BuildRequires: pkgconfig(libpcre) +BuildRequires: pkgconfig(zlib) +%endif +%if 0%{?fedora_version} || 0%{?centos_version} +BuildRequires: python-devel +BuildRequires: python-libs +%else +BuildRequires: python-base +BuildRequires: python-xml +%endif +%if 0%{?suse_version} +BuildRequires: fdupes +%endif + +%description +GLib is a general-purpose utility library, which provides many useful +data types, macros, type conversions, string utilities, file utilities, +a main loop abstraction, and so on. + +%package tools +Summary: General-Purpose Utility Library -- Tools +Group: Development/Libraries + +%description tools +GLib is a general-purpose utility library, which provides many useful +data types, macros, type conversions, string utilities, file utilities, +a main loop abstraction, and so on. + +%package -n gio-branding-upstream +Summary: Upstream definitions of default settings and applications +Group: System/Libraries +Requires: libgio = %{version} +Obsoletes: %{name}-branding < %{version} +Conflicts: otherproviders(gio-branding) +#Supplements: packageand(libgio:branding-upstream) +BuildArch: noarch +#BRAND: The /etc/gnome_defaults.conf allows to define arbitrary +#BRAND: applications as preferred defaults. +#BRAND: A /usr/share/glib-2.0/schemas/$NAME.gschema.override file can +#BRAND: be used to override the default value for GSettings keys. See +#BRAND: README.Gsettings-overrides for more details. The branding +#BRAND: package should then have proper Requires for features changed +#BRAND: with such an override file. +# NOTE: gnome_defaults is not an upstream feature, but a SuSE +# enhancement, but to conform branding conventions, the package is named +# as gio-branding-upstream. + +%description -n gio-branding-upstream +This package provides upstream defaults for settings stored with +GSettings and applications used by the MIME system. + +%package devel +#' +Requires: %{name} = %{version}-%{release} +Requires: glibc-devel +%if 0%{?fedora_version} || 0%{?centos_version} +Requires: pkgconfig +%else +Requires: pkg-config +%endif +# Now require the subpackages too +Requires: %{name}-tools = %{version}-%{release} +Requires: libgio = %{version}-%{release} +%if 0%{?suse_version} +Requires: libglib2 = %{version}-%{release} +%endif +Requires: libgmodule = %{version}-%{release} +Requires: libgobject = %{version}-%{release} +Requires: libgthread = %{version}-%{release} +# Required by gdbus-codegen +Requires: python-devel +Provides: glib2-doc = 2.19.6 +Obsoletes: glib2-doc < 2.19.6 +Summary: General-Purpose Utility Library -- Development Files +Group: Development/Libraries + +%description devel +GLib is a general-purpose utility library, which provides many useful +data types, macros, type conversions, string utilities, file utilities, +a main loop abstraction, and so on. + +This package contains the development files for GLib. + +%package -n glib2-static +Requires: %{name}-devel = %{version} +Summary: General-Purpose Utility Library -- Static Libraries +Group: Development/Libraries + +%description -n glib2-static +GLib is a general-purpose utility library, which provides many useful +data types, macros, type conversions, string utilities, file utilities, +a main loop abstraction, and so on. + +This package contains static versions of the GLib libraries. + +%if 0%{?suse_version} +%package -n libglib2 +Summary: General-Purpose Utility Library +Group: System/Libraries +Provides: %{name} = %{version} +Obsoletes: %{name} < %{version} + +%description -n libglib2 +GLib is a general-purpose utility library, which provides many useful +data types, macros, type conversions, string utilities, file utilities, +a main loop abstraction, and so on. +%endif + +%package -n libgmodule +Summary: General-Purpose Utility Library -- Library for Modules +Group: System/Libraries + +%description -n libgmodule +GLib is a general-purpose utility library, which provides many useful +data types, macros, type conversions, string utilities, file utilities, +a main loop abstraction, and so on. + +The libgmodule library provides a portable way to dynamically load +object files (commonly known as 'plug-ins'). + +%package -n libgio +Summary: General-Purpose Utility Library -- Library for VFS +Group: System/Libraries +Requires: gio-branding-upstream = %{version} +# bnc#555605: shared-mime-info is required by libgio to properly detect mime types. +#Requires: shared-mime-info +# bnc#678518: libgio interacts with others by means of dbus-launch +#Requires: dbus-1-x11 +Provides: gio = %{version} + +%description -n libgio +GLib is a general-purpose utility library, which provides many useful +data types, macros, type conversions, string utilities, file utilities, +a main loop abstraction, and so on. + +GIO provides a modern, easy-to-use VFS API. + + +%package -n libgthread +Summary: General-Purpose Utility Library -- Library for Threads +Group: System/Libraries + +%description -n libgthread +GLib is a general-purpose utility library, which provides many useful +data types, macros, type conversions, string utilities, file utilities, +a main loop abstraction, and so on. + +The libgthread library provides a portable way to write multi-threaded +software. + +%package -n libgobject +Summary: General-Purpose Utility Library -- Object-Oriented Framework for C +Group: System/Libraries + +%description -n libgobject +GLib is a general-purpose utility library, which provides many useful +data types, macros, type conversions, string utilities, file utilities, +a main loop abstraction, and so on. + +The GObject library provides an object-oriented framework for C. + +%prep +%setup -q -n glib2-%{version} +cp -a %{S:1} %{S:2} . +cp -a %{S:4} gnome_defaults.conf +if ! test -f %{_datadir}/aclocal/gtk-doc.m4 ; then + cp -a %{S:7} m4macros/ +fi + +%build +NOCONFIGURE=1 ./autogen.sh +%configure \ + --enable-static \ +%if 0%{?with_systemtap} + --enable-systemtap +%endif + +%{__make} %{?_smp_mflags} V=1 + + +%install +%make_install +%find_lang glib20 %{?no_lang_C} + +mkdir -p %{buildroot}%{_sysconfdir}/profile.d +install -D -m0644 glib2.sh %{buildroot}%{_sysconfdir}/profile.d/zzz-glib2.sh +install -D -m0644 glib2.csh %{buildroot}%{_sysconfdir}/profile.d/zzz-glib2.csh +install -D -m0644 gnome_defaults.conf %{buildroot}%{_sysconfdir}/gnome_defaults.conf +# default apps magic +mkdir -p %{buildroot}%{_localstatedir}/cache/gio-2.0 %{buildroot}%{_datadir}/applications +touch %{buildroot}%{_localstatedir}/cache/gio-2.0/gnome-defaults.list +touch %{buildroot}%{_localstatedir}/cache/gio-2.0/xfce-defaults.list +touch %{buildroot}%{_localstatedir}/cache/gio-2.0/lxde-defaults.list +ln -s %{_localstatedir}/cache/gio-2.0/gnome-defaults.list %{buildroot}%{_datadir}/applications/defaults.list +# gio-querymodules magic +%if "%{_lib}" == "lib64" +mv %{buildroot}%{_bindir}/gio-querymodules %{buildroot}%{_bindir}/gio-querymodules-64 +%endif +touch %{buildroot}%{_libdir}/gio/modules/giomodule.cache +# gsettings magic +touch %{buildroot}%{_datadir}/glib-2.0/schemas/gschemas.compiled +# remove files we don't care about +find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print +# remove python we don't care about +rm -f %{buildroot}%{_datadir}/glib-2.0/gdb/*.{pyc,pyo} +rm -f %{buildroot}%{_libdir}/gdbus-codegen/*.{pyc,pyo} +# Install rpm macros +mkdir -p %{buildroot}%{_sysconfdir}/rpm +cp %{S:6} %{buildroot}%{_sysconfdir}/rpm + +%if 0%{?suse_version} +%fdupes %{buildroot} +%endif + +%if 0%{?suse_version} +%post -n libglib2 -p /sbin/ldconfig +%endif + +%post -n libgobject -p /sbin/ldconfig + +%post -n libgthread -p /sbin/ldconfig + +%post -n libgio -p /sbin/ldconfig + +%post -n libgmodule -p /sbin/ldconfig + +%if 0%{?suse_version} +%postun -n libglib2 -p /sbin/ldconfig +%endif + +%postun -n libgobject -p /sbin/ldconfig + +%postun -n libgthread -p /sbin/ldconfig + +%postun -n libgio -p /sbin/ldconfig + +%postun -n libgmodule -p /sbin/ldconfig + + +%files -f glib20.lang +%defattr(-,root,root) +%doc AUTHORS COPYING NEWS README +%if 0%{?fedora_version} || 0%{?centos_version} +%{_libdir}/libglib-2.0.so.* +%{_libdir}/libgthread-2.0.so.* +%{_libdir}/libgmodule-2.0.so.* +%{_libdir}/libgobject-2.0.so.* +%{_libdir}/libgio-2.0.so.* +%{_datadir}/bash-completion/completions/* +%dir %{_datadir}/glib-2.0 +%dir %{_datadir}/glib-2.0/schemas +%dir %{_libdir}/gio +%dir %{_libdir}/gio/modules +%ghost %{_libdir}/gio/modules/giomodule.cache +#%{_libdir}/gio/modules/libgiofam.so +%{_bindir}/gio-querymodules* +%{_bindir}/glib-compile-schemas +%{_bindir}/gsettings +%{_bindir}/gdbus +#%doc %{_mandir}/man1/gio-querymodules.1.gz +#%doc %{_mandir}/man1/glib-compile-schemas.1.gz +#%doc %{_mandir}/man1/gsettings.1.gz +#%doc %{_mandir}/man1/gdbus.1 +%endif + +%files tools +%defattr(-,root,root) +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/gdbus +%{_datadir}/bash-completion/completions/gresource +%{_datadir}/bash-completion/completions/gsettings +%{_bindir}/gdbus +%{_bindir}/gio-querymodules* +%{_bindir}/glib-compile-schemas +%{_bindir}/gresource +%{_bindir}/gsettings +# We put those files here, but they don't really belong here. They just don't +# have a better home... The zzz-glib2 scripts could arguably be in +# libglib but that would break the shared library policy. +%{_sysconfdir}/profile.d/zzz-glib2.* + +%files -n gio-branding-upstream +%defattr(-,root,root) +%config (noreplace) %{_sysconfdir}/gnome_defaults.conf + +%if 0%{?suse_version} +%files -n libglib2 +%defattr(-, root, root) +%doc AUTHORS COPYING NEWS README +%{_libdir}/libglib*.so.* +%endif + +%files -n libgmodule +%defattr(-, root, root) +%{_libdir}/libgmodule*.so.* + +%files -n libgobject +%defattr(-, root, root) +%{_libdir}/libgobject*.so.* + +%files -n libgthread +%defattr(-, root, root) +%{_libdir}/libgthread*.so.* + +%files -n libgio +%defattr(-, root, root) +%{_libdir}/libgio*.so.* +%dir %{_libdir}/gio +%dir %{_libdir}/gio/modules +%ghost %{_libdir}/gio/modules/giomodule.cache +%dir %{_datadir}/glib-2.0/ +%dir %{_datadir}/glib-2.0/schemas/ +%ghost %{_datadir}/glib-2.0/schemas/gschemas.compiled +%{_datadir}/applications/defaults.list +%dir %{_localstatedir}/cache/gio-2.0 +%ghost %{_localstatedir}/cache/gio-2.0/gnome-defaults.list +%ghost %{_localstatedir}/cache/gio-2.0/xfce-defaults.list +%ghost %{_localstatedir}/cache/gio-2.0/lxde-defaults.list + +%files devel +%defattr(-,root,root) + +%{_bindir}/gdbus-codegen +%_datadir/glib-2.0/codegen + +%{_bindir}/glib-compile-resources +%{_bindir}/glib-genmarshal +%{_bindir}/glib-gettextize +%{_bindir}/glib-mkenums +%{_bindir}/gobject-query +%{_bindir}/gtester +%{_bindir}/gtester-report +%dir %{_datadir}/aclocal +%{_datadir}/aclocal/glib-2.0.m4 +%{_datadir}/aclocal/glib-gettext.m4 +%{_datadir}/aclocal/gsettings.m4 +%dir %{_datadir}/glib-2.0/ +%{_datadir}/glib-2.0/gdb/ +%{_datadir}/glib-2.0/gettext/ +%{_datadir}/glib-2.0/schemas/gschema.dtd +%{_includedir}/glib-2.0 +%{_includedir}/gio-unix-2.0 +%{_libdir}/lib*.so +%dir %{_libdir}/glib-2.0/ +%{_libdir}/glib-2.0/include/ +%{_libdir}/pkgconfig/*.pc +%{_datadir}/gdb/auto-load/%{_libdir}/*-gdb.py +%if 0%{?with_systemtap} +%{_datadir}/systemtap/tapset/*.stp +%endif +%{_sysconfdir}/rpm/macros.glib2 +# Own these directories to not depend on gdb +%dir %{_datadir}/gdb +%dir %{_datadir}/gdb/auto-load +%dir %{_datadir}/gdb/auto-load%{_prefix} +%dir %{_datadir}/gdb/auto-load%{_libdir} +%{_datadir}/gdb/auto-load%{_libdir}/* +#%{_datadir}/glib-2.0/gdb/*.pyo +#%{_datadir}/glib-2.0/gdb/*.pyc + +%files -n glib2-static +%defattr(-,root,root) +%{_libdir}/lib*.a + +%changelog +* Tue Mar 5 2013 Anas Nashif <anas.nashif@intel.com> 2.35.8@89b88e0 +- Remove previous crash fix (TZPC-453) +* Tue Feb 26 2013 Anas Nashif <anas.nashif@intel.com> 2.35.8@8aed25e +- Update to 2.35.8 +* Thu Feb 7 2013 Anas Nashif <anas.nashif@intel.com> 2.35.7@c7a2158 +- Update to 2.35.7 +* Thu Jan 31 2013 @88f28c3 +- Update to 2.35.4 +* Thu Jan 3 2013 @7fcf93d +- Avoiding SIGSEGV when running gio-querymodules +* Tue Dec 18 2012 Anas Nashif <anas.nashif@intel.com> 2.35.3@28d76f3 +- update to 2.35.3 +* Sun Dec 9 2012 @9a11327 +- package license file +- update to 2.35.2 diff --git a/packaging/gtk-doc.m4 b/packaging/gtk-doc.m4 new file mode 100644 index 0000000..0ada151 --- /dev/null +++ b/packaging/gtk-doc.m4 @@ -0,0 +1,67 @@ +dnl -*- mode: autoconf -*- + +# serial 1 + +dnl Usage: +dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) +AC_DEFUN([GTK_DOC_CHECK], +[ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first + AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + + dnl check for tools we added during development + AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) + AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) + AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) + + dnl for overriding the documentation installation directory + AC_ARG_WITH([html-dir], + AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, + [with_html_dir='${datadir}/gtk-doc/html']) + HTML_DIR="$with_html_dir" + AC_SUBST([HTML_DIR]) + + dnl enable/disable documentation building + AC_ARG_ENABLE([gtk-doc], + AS_HELP_STRING([--enable-gtk-doc], + [use gtk-doc to build documentation [[default=no]]]),, + [enable_gtk_doc=no]) + + if test x$enable_gtk_doc = xyes; then + ifelse([$1],[], + [PKG_CHECK_EXISTS([gtk-doc],, + AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], + [PKG_CHECK_EXISTS([gtk-doc >= $1],, + AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) + dnl don't check for glib if we build glib + if test "x$PACKAGE_NAME" != "xglib"; then + dnl don't fail if someone does not have glib + PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,) + fi + fi + + AC_MSG_CHECKING([whether to build gtk-doc documentation]) + AC_MSG_RESULT($enable_gtk_doc) + + dnl enable/disable output formats + AC_ARG_ENABLE([gtk-doc-html], + AS_HELP_STRING([--enable-gtk-doc-html], + [build documentation in html format [[default=yes]]]),, + [enable_gtk_doc_html=yes]) + AC_ARG_ENABLE([gtk-doc-pdf], + AS_HELP_STRING([--enable-gtk-doc-pdf], + [build documentation in pdf format [[default=no]]]),, + [enable_gtk_doc_pdf=no]) + + if test -z "$GTKDOC_MKPDF"; then + enable_gtk_doc_pdf=no + fi + + + AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) + AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) + AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) +]) diff --git a/packaging/macros.glib2 b/packaging/macros.glib2 new file mode 100644 index 0000000..f682995 --- /dev/null +++ b/packaging/macros.glib2 @@ -0,0 +1,73 @@ +# RPM macros for packages installing a GSettings schema or GIO module +# +### +# +# When a package installs a GSettings schemas, it should use all +# three macros: +# +# - %glib2_gsettings_schema_requires in the preamble +# - %glib2_gsettings_schema_post in %post +# - %glib2_gsettings_schema_postun in %postun +# +### +# +# When a package installs a GIO module, it should use all +# three macros: +# +# - %glib2_gio_module_requires in the preamble +# - %glib2_gio_module_post in %post +# - %glib2_gio_module_postun in %postun +# +# Note that %glib2_gio_module_post and %glib2_gio_module_postun can +# optionally take the path to the directory where modules live. This +# is useful for applications using the GIO module system on their own, +# since they will install modules in their own directory. If no +# argument is passed, the path for the modules for GIO itself is used. +# +### + +%glib2_gsettings_schema_requires \ +Requires(post): glib2-tools \ +Requires(postun): glib2-tools + +%glib2_gsettings_schema_post \ +%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : + +# Note: we ignore upgrades (already handled in %post of the new package). +%glib2_gsettings_schema_postun \ +if [ $1 -eq 0 ]; then \ + %{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : \ +fi + +%glib2_gio_module_requires \ +Requires(post): glib2-tools \ +Requires(postun): glib2-tools + +# On install, update the cache +%glib2_gio_module_post() \ +%if "x%1" != "x%%1" \ + GIO_MODULES_DIR="%1" \ +%else \ + GIO_MODULES_DIR="%{_libdir}/gio/modules" \ +%endif \ +%if "%{_lib}" == "lib64" \ + %{_bindir}/gio-querymodules-64 "${GIO_MODULES_DIR}" \ +%else \ + %{_bindir}/gio-querymodules "${GIO_MODULES_DIR}" \ +%endif + +# On uninstall, update the cache. Note: we ignore upgrades (already +# handled in %post of the new package). +%glib2_gio_module_postun() \ +if [ $1 -eq 0 ]; then \ + %if "x%1" != "x%%1" \ + GIO_MODULES_DIR="%1" \ + %else \ + GIO_MODULES_DIR="%{_libdir}/gio/modules" \ + %endif \ + %if "%_lib" == "lib64" \ + %{_bindir}/gio-querymodules-64 "${GIO_MODULES_DIR}" \ + %else \ + %{_bindir}/gio-querymodules "${GIO_MODULES_DIR}" \ + %endif \ +fi |