Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37651231
en ru br
Репозитории ALT
S:2.2-alt1
5.1: 0.60-alt5
4.1: 0.51-alt1.M41.3
4.0: 0.19-alt1
3.0: 0.16-alt1
www.altlinux.org/Changes

Группа :: Графические оболочки/Прочее
Пакет: shared-mime-info

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

%def_enable updatedb

Name: shared-mime-info
Version: 0.60
Release: alt5

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

Source: http://www.freedesktop.org/~hadess/%name-%version.tar.bz2
Source1: %name.rpmmacros
Source2: %name.filetrigger
Patch: %name-0.19-alt-cachedir-param.patch

Requires: rpm-build-xdg

BuildPreReq: rpm-build-licenses rpm-build-xdg
BuildPreReq: intltool xml-utils
# for build test programs
BuildPreReq: libgio-devel

# Automatically added by buildreq on Sun Jun 08 2008

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

%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.

#include %SOURCE1


%prep
%setup -q
%patch

# better use our russian translation

#bzcat %SOURCE1 >po/ru.po

rm -f freedesktop.org.xml

%build
%configure %{?_disable_updatedb:--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

#mkdir -p %buildroot%_sysconfdir/rpm/macros.d

install -pD -m 644 %SOURCE1 %buildroot%_sysconfdir/rpm/macros.d/%name

# posttrans filetrigger

install -pD -m 755 %SOURCE2 %buildroot%_rpmlibdir/mime-database.filetrigger

# do empty db files and create file list

find %buildroot%_xdgmimedir -type f |fgrep -v "/packages/" > db.files
cat db.files| while read f; do echo -n > $f; done
find %buildroot%_xdgmimedir -mindepth 1 -type d |sed -e "s,^,%%dir ," >> db.files
subst 's,%buildroot,,' db.files

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

%files -f db.files
%_bindir/update-mime-database
%_xdgmimedir/packages/freedesktop.org.xml
%_man1dir/*
%_datadir/pkgconfig/*
%_sysconfdir/rpm/macros.d/*
%config(noreplace) %_sysconfdir/profile.d/*
# filetrigger
%_rpmlibdir/mime-database.filetrigger
%doc README shared-mime-info-spec.xml

%exclude %_datadir/locale

%changelog

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

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin