1 |
blino |
5293 |
Summary: Utilities for working with desktop entries |
2 |
|
|
Name: desktop-file-utils |
3 |
ovitters |
305232 |
Version: 0.21 |
4 |
umeabot |
348726 |
Release: %mkrel 2 |
5 |
blino |
5293 |
License: GPLv2+ |
6 |
|
|
Group: Graphical desktop/Other |
7 |
|
|
Url: http://freedesktop.org/Software/desktop-file-utils |
8 |
fwang |
188839 |
Source: http://freedesktop.org/software/desktop-file-utils/releases/%{name}-%{version}.tar.xz |
9 |
wally |
248338 |
Buildrequires: popt-devel glibc-static-devel |
10 |
blino |
5293 |
BuildRequires: glib2-devel |
11 |
|
|
BuildRequires: emacs-bin |
12 |
|
|
|
13 |
|
|
%description |
14 |
|
|
desktop-file-utils contains a couple of command line utilities for working |
15 |
|
|
with desktop entries. It requires GLib and popt to compile, because the |
16 |
|
|
implementation requires Unicode utilities and such. |
17 |
|
|
|
18 |
|
|
Right now the only documentation is "desktop-file-install --help". |
19 |
|
|
desktop-file-validate takes a single argument, the file to validate. |
20 |
|
|
|
21 |
|
|
%prep |
22 |
|
|
%setup -q |
23 |
wally |
248338 |
%apply_patches |
24 |
|
|
|
25 |
blino |
5293 |
%build |
26 |
|
|
%configure2_5x |
27 |
|
|
%make |
28 |
|
|
|
29 |
|
|
%install |
30 |
wally |
248338 |
%makeinstall_std |
31 |
blino |
5293 |
|
32 |
|
|
mkdir -p %{buildroot}%{_sysconfdir}/emacs/site-start.d/ |
33 |
|
|
cat > %{buildroot}%{_sysconfdir}/emacs/site-start.d/%{name}.el << EOF |
34 |
|
|
(autoload 'desktop-entry-mode "desktop-entry-mode" "Desktop Entry mode" t) |
35 |
|
|
(add-to-list 'auto-mode-alist |
36 |
|
|
'("\\\\.desktop\\\\(\\\\.in\\\\)?$" . desktop-entry-mode)) |
37 |
|
|
(add-hook 'desktop-entry-mode-hook 'font-lock-mode) |
38 |
|
|
EOF |
39 |
|
|
|
40 |
|
|
# automatic cache update on rpm installs/removals |
41 |
|
|
# (see http://wiki.mandriva.com/en/Rpm_filetriggers) |
42 |
|
|
install -d %buildroot%{_var}/lib/rpm/filetriggers |
43 |
|
|
cat > %buildroot%{_var}/lib/rpm/filetriggers/update-desktop-database.filter << EOF |
44 |
|
|
^./usr/share/applications/.*\.desktop$ |
45 |
|
|
EOF |
46 |
|
|
cat > %buildroot%{_var}/lib/rpm/filetriggers/update-desktop-database.script << EOF |
47 |
|
|
#!/bin/sh |
48 |
|
|
/usr/bin/update-desktop-database /usr/share/applications > /dev/null 2> /dev/null |
49 |
|
|
EOF |
50 |
|
|
chmod 755 %buildroot%{_var}/lib/rpm/filetriggers/update-desktop-database.script |
51 |
|
|
|
52 |
|
|
%files |
53 |
|
|
%doc AUTHORS NEWS README ChangeLog |
54 |
|
|
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el |
55 |
|
|
%{_bindir}/* |
56 |
wally |
248338 |
%{_mandir}/man1/* |
57 |
blino |
5293 |
%{_datadir}/emacs/site-lisp/desktop-entry-mode.el* |
58 |
|
|
%{_var}/lib/rpm/filetriggers/update-desktop-database.* |
59 |
|
|
|
60 |
|
|
|