Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37564418
en ru br
ALT Linux repos
S:2.2-alt1
5.0: 0.60-alt3
4.1: 0.51-alt1.M41.3
4.0: 0.19-alt1
3.0: 0.16-alt1

Group :: Graphical desktop/Other
RPM: shared-mime-info

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: shared-mime-info
Version: 0.19
Release: alt1

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.bz2
Source1: %name.macros
Patch: %name-0.19-alt-cachedir-param.patch

# Automatically added by buildreq on Sun Sep 10 2006

BuildRequires: glib2-devel libxml2-devel perl-XML-Parser

%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

%prep
%setup -q
%patch

# 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__

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

%__install -pD -m644 %SOURCE1 %buildroot%_sysconfdir/rpm/macros.d/%name

%find_lang %name

%post
export XDG_DATA_DIRS="%_datadir"
%_bindir/update-mime-database %mimedir > /dev/null ||:

%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/*
%doc README shared-mime-info-spec.xml

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin