]> git.pld-linux.org Git - packages/shared-mime-info.git/blame - shared-mime-info.spec
dunno, docs build fine on builders, not on carme
[packages/shared-mime-info.git] / shared-mime-info.spec
CommitLineData
88832bb0 1# TODO
79bc8705
ER
2# - *.pc file to -devel, however harmless due it's not pulling any extra deps
3# - try to move generated files in /usr/share/mime to /var/cache/mime for FHS.
add02d74
ER
4#
5# Conditional build:
6%bcond_without tests # build without tests
3d1f8587 7%bcond_without doc # build documentation
add02d74 8
9759e33b 9Summary: Shared MIME-info specification
40138a8d 10Summary(pl.UTF-8): Wspólna specyfikacja MIME-info
50ff68c4 11Name: shared-mime-info
add02d74 12Version: 1.1
2adcb0f9 13Release: 1
941139bc 14Epoch: 1
e9a24eb2 15License: GPL
add02d74 16Group: Applications/Databases
77ea9487 17Source0: http://people.freedesktop.org/~hadess/%{name}-%{version}.tar.xz
add02d74 18# Source0-md5: 12ba00bf1cb2e69bfba73127e708e833
20294ab5 19URL: http://www.freedesktop.org/wiki/Software/shared-mime-info
b99c0302 20BuildRequires: autoconf
80319feb 21BuildRequires: automake >= 1:1.9
e4b7e6ce 22BuildRequires: docbook-dtd412-xml
ff0a0e46 23BuildRequires: docbook-utils
80319feb 24BuildRequires: gettext-devel
2adcb0f9 25BuildRequires: glib2-devel >= 1:2.18.0
80319feb 26BuildRequires: intltool >= 0.35.0
425383e2 27BuildRequires: libxml2-devel >= 1:2.6.26
26a0cfcf 28BuildRequires: pkgconfig
77ea9487
JB
29BuildRequires: rpmbuild(macros) >= 1.446
30BuildRequires: tar >= 1:1.22
31BuildRequires: xz
2adcb0f9 32Requires: glib2 >= 1:2.18.0
50ff68c4 33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
50ff68c4 35%description
36This is the freedesktop.org shared MIME info database.
37
38Many programs and desktops use the MIME system to represent the types
39of files. Frequently, it is necessary to work out the correct MIME
40type for a file. This is generally done by examining the file's name
41or contents, and looking up the correct MIME type in a database.
42
43For interoperability, it is useful for different programs to use the
44same database so that different programs agree on the type of a file,
45and new rules for determining the type apply to all programs.
46
47This specification attempts to unify the type-guessing systems
48currently in use by GNOME, KDE and ROX. Only the name-to-type and
49contents-to-type mappings are covered by this spec; other MIME type
50information, such as the default handler for a particular type, or the
51icon to use to display it in a file manager, are not covered since
52these are a matter of style.
53
54In addition, freedesktop.org provides a shared database in this format
55to avoid inconsistencies between desktops. This database has been
56created by converting the existing KDE and GNOME databases to the new
57format and merging them together.
58
086e4d85
JR
59%description -l pl.UTF-8
60To jest wspólna baza informacji MIME freedesktop.org.
50ff68c4 61
086e4d85
JR
62Wiele programów oraz pulpitów używa systemu MIME do reprezentacji
63typów plików. Często, zachodzi potrzeba opracowania prawidłowego typu
64MIME dla pliku. Przeważnie jest to robione poprzez sprawdzenie nazwy
65lub zawartości pliku i znalezienie odpowiedniego typu MIME w bazie.
50ff68c4 66
086e4d85
JR
67W ramach współpracy, użytecznym jest używanie tej samej bazy przez
68różne programy. Dzięki temu pozycja dodana do bazy realizowana jest we
50ff68c4 69wszystkich programach.
70
086e4d85
JR
71Ta specyfikacja ma za zadanie zunifikowanie systemów odpytujących o
72typ używanych przez GNOME, KDE i ROX. W tym pakiecie zawarte są
73jedynie mapowania nazwa-typ i zawartość-typ. Inne informacje MIME,
74takie jak domyślna procedura obsługi dla poszczególnych typów, czy
75ikona używana podczas wyświetlania w zarządcy plików, nie są zawarte,
76gdyż zależą od gustu.
77
78Dlatego freedesktop.org udostępnia wspólne bazy w tym formacie aby
79uniknąć niekonsekwencji między pulpitami. Ta baza została stworzona
80poprzez konwersję istniejących baz KDE i GNOME do nowego formatu i
81połączenie ich.
50ff68c4 82
79bc8705
ER
83%package doc
84Summary: Manual for %{name}
85Summary(fr.UTF-8): Documentation pour %{name}
86Summary(it.UTF-8): Documentazione di %{name}
2cf1e38c 87Summary(pl.UTF-8): Dokumentacja do %{name}
79bc8705
ER
88Group: Documentation
89
90%description doc
91Documentation for %{name}.
92
93%description doc -l fr.UTF-8
94Documentation pour %{name}.
95
96%description doc -l it.UTF-8
97Documentazione di %{name}.
98
99%description doc -l pl.UTF-8
100Dokumentacja do %{name}.
101
50ff68c4 102%prep
103%setup -q
50ff68c4 104
105%build
e79df5d4 106%{__intltoolize}
b99c0302 107%{__aclocal}
50ff68c4 108%{__autoconf}
109%{__automake}
425383e2 110%configure \
add02d74
ER
111 --disable-silent-rules \
112 --disable-default-make-check \
425383e2 113 --disable-update-mimedb
b0b3de6f 114%{__make} -j1
08512103 115
add02d74
ER
116%{?with_tests:%{__make} check}
117
118%{?with_doc:db2html shared-mime-info-spec.xml}
50ff68c4 119
120%install
121rm -rf $RPM_BUILD_ROOT
787aa48f 122%{__make} install \
123 DESTDIR=$RPM_BUILD_ROOT
50ff68c4 124
add02d74
ER
125# remove bogus translation files
126# translations are already in the xml file installed
127%{__rm} -r $RPM_BUILD_ROOT%{_localedir}
0f82ad81 128
79bc8705 129# convience symlink
add02d74 130%{?with_doc:ln -s t1.html shared-mime-info-spec/index.html}
79bc8705
ER
131
132# ghost generated files
133# see update-mime-database.c const char *media_types
134install -d $RPM_BUILD_ROOT%{_datadir}/mime/{application,audio,image,inode,message,model,multipart,text,video,x-content,x-epoc}
135# see specification, also grep -F .new update-mime-database.c
136touch $RPM_BUILD_ROOT%{_datadir}/mime/globs
137touch $RPM_BUILD_ROOT%{_datadir}/mime/globs2
138touch $RPM_BUILD_ROOT%{_datadir}/mime/magic
139touch $RPM_BUILD_ROOT%{_datadir}/mime/XMLnamespaces
140touch $RPM_BUILD_ROOT%{_datadir}/mime/subclasses
141touch $RPM_BUILD_ROOT%{_datadir}/mime/aliases
142touch $RPM_BUILD_ROOT%{_datadir}/mime/types
143touch $RPM_BUILD_ROOT%{_datadir}/mime/generic-icons
144touch $RPM_BUILD_ROOT%{_datadir}/mime/icons
145touch $RPM_BUILD_ROOT%{_datadir}/mime/treemagic
146touch $RPM_BUILD_ROOT%{_datadir}/mime/mime.cache
147
11fc5c93
JB
148%clean
149rm -rf $RPM_BUILD_ROOT
150
e9a24eb2 151%post
425383e2 152%update_mime_database
153
154%preun
155# remove dirs and files created by update-mime-database
156if [ "$1" = "0" ]; then
add02d74 157 %{__rm} -rf %{_datadir}/mime/*
425383e2 158fi
e9a24eb2 159
425383e2 160%files
50ff68c4 161%defattr(644,root,root,755)
add02d74 162%doc README NEWS ChangeLog
425383e2 163%attr(755,root,root) %{_bindir}/update-mime-database
67f0f1b4
MK
164%dir %{_datadir}/mime
165%dir %{_datadir}/mime/packages
425383e2 166%{_datadir}/mime/packages/freedesktop.org.xml
2de56ea3 167%{_mandir}/man1/update-mime-database.1*
77ea9487 168%{_npkgconfigdir}/shared-mime-info.pc
79bc8705
ER
169
170# generated content
171%dir %{_datadir}/mime/application
172%dir %{_datadir}/mime/audio
173%dir %{_datadir}/mime/image
174%dir %{_datadir}/mime/inode
175%dir %{_datadir}/mime/message
176%dir %{_datadir}/mime/model
177%dir %{_datadir}/mime/multipart
178%dir %{_datadir}/mime/text
179%dir %{_datadir}/mime/video
180%dir %{_datadir}/mime/x-content
181%dir %{_datadir}/mime/x-epoc
182%ghost %{_datadir}/mime/globs
183%ghost %{_datadir}/mime/globs2
184%ghost %{_datadir}/mime/magic
185%ghost %{_datadir}/mime/XMLnamespaces
186%ghost %{_datadir}/mime/subclasses
187%ghost %{_datadir}/mime/aliases
188%ghost %{_datadir}/mime/types
189%ghost %{_datadir}/mime/generic-icons
190%ghost %{_datadir}/mime/icons
191%ghost %{_datadir}/mime/treemagic
192%ghost %{_datadir}/mime/mime.cache
193
add02d74 194%if %{with doc}
79bc8705
ER
195%files doc
196%defattr(644,root,root,755)
197%doc shared-mime-info-spec/*
add02d74 198%endif
This page took 0.217538 seconds and 4 git commands to generate.