Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1574777
 поиск   регистрация   авторизация 
 
Группа :: Графические оболочки/Прочее
Пакет: shared-mime-info

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Name: shared-mime-info
Version: 0.16
Release: alt0.M24.1

Summary: Shared MIME-Info Specification
Group: Graphical desktop/Other
License: GPL
Url: http://www.freedesktop.org/software/%name

Source: http://www.freedesktop.org/standards/%name/%name-%version.tar.gz
Source1: %name-0.15.ru.po.bz2
Patch: %name-0.13-alt-cachedir.patch

# Automatically added by buildreq on Fri Mar 05 2004

BuildRequires: glib2-devel intltool libxml2-devel perl-XML-Parser pkgconfig zlib-devel

%description
This is the freedesktop.org shared MIME info database.

Many programs and desktops use the MIME system to represent the types of
files. Frequently, it is necessary to work out the correct MIME type for
a file. This is generally done by examining the file's name or contents,
and looking up the correct MIME type in a database.

For interoperability, it is useful for different programs to use the
same database so that different programs agree on the type of a file,
and new rules for determining the type apply to all programs.

This specification attempts to unify the type-guessing systems currently
in use by GNOME, KDE and ROX. Only the name-to-type and contents-to-type
mappings are covered by this spec; other MIME type information, such as
the default handler for a particular type, or the icon to use to display
it in a file manager, are not covered since these are a matter of style.

In addition, freedesktop.org provides a shared database in this format
to avoid inconsistencies between desktops. This database has been
created by converting the existing KDE and GNOME databases to the new
format and merging them together.

%define mimedir %_datadir/mime
%define mimecachedir %_cachedir/mime

%prep
%setup -q
%patch -p1

# better use our russian translation

bzcat %SOURCE1 >po/ru.po

%build
#autoreconf -ifsv
%configure --disable-update-mimedb
%make_build

%install
%makeinstall

%__cat <<__SH__ >%name.sh
export XDG_DATA_DIRS="%_datadir:%_cachedir"
__SH__

%__cat <<__CSH__ >%name.csh
setenv XDG_DATA_DIRS "%_datadir:%_cachedir"
__CSH__

# {update,clean}_mimedb rpm macros

%__mkdir_p %buildroot%_sysconfdir/rpm/macros.d
%__cat <<__MACRO__ >%buildroot%_sysconfdir/rpm/macros.d/%name
%%_update_mimedb_bin %%_bindir/update-mime-database
%%update_mimedb() \\
export XDG_DATA_DIRS="%_datadir:%_cachedir" \\
[ -x %%_update_mimedb_bin ] && %%_update_mimedb_bin %mimedir %mimecachedir ||: \\
%%nil
%%clean_mimedb() \\
export XDG_DATA_DIRS="%_datadir:%_cachedir" \\
[ "\$1" = 0 -a -x %%_update_mimedb_bin ] && %%_update_mimedb_bin %mimedir %mimecachedir ||: \\
%%nil
__MACRO__

%__install -pD -m755 %name.sh %buildroot%_sysconfdir/profile.d/%name.sh
%__install -pD -m755 %name.csh %buildroot%_sysconfdir/profile.d/%name.csh

%__mkdir_p %buildroot%mimecachedir

%find_lang %name

%post
export XDG_DATA_DIRS="%_datadir:%_cachedir"
%_bindir/update-mime-database %mimedir %mimecachedir

%triggerpostun -- %name < 0.13-alt2
%__rm -rf %mimedir/{application,audio,globs,image,inode,magic,message,model,\
multipart,text,video,XMLnamespaces}

%files -f %name.lang
%_bindir/update-mime-database
%dir %mimedir/packages
%mimedir/packages/freedesktop.org.xml
%_man1dir/*
%_libdir/pkgconfig/*
%_sysconfdir/rpm/macros.d/*
%config(noreplace) %_sysconfdir/profile.d/*
%dir %mimecachedir
%doc README shared-mime-info-spec.xml

%changelog

Полный changelog можно просмотреть здесь

 
design & coding: Vladimir Lettiev aka crux © 2004-2005