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