diff --git a/htmldoc.changes b/htmldoc.changes
index c1728e8..ca99540 100644
--- a/htmldoc.changes
+++ b/htmldoc.changes
@@ -25,6 +25,7 @@ Mon Dec 4 08:06:31 UTC 2017 - mpluskal@suse.com
* And many more
- Drop upstreamed htmldoc-cups_rand.patch and no longer needed
htmldoc-docpath.diff
+- Lots of spec file cleaning
-------------------------------------------------------------------
Sat Mar 11 01:18:13 UTC 2017 - sfalken@opensuse.org
diff --git a/htmldoc.spec b/htmldoc.spec
index 4fbd869..c5a838f 100644
--- a/htmldoc.spec
+++ b/htmldoc.spec
@@ -31,6 +31,7 @@ BuildRequires: libgcrypt-devel
BuildRequires: libgnutls-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
+BuildRequires: update-desktop-files
BuildRequires: zlib-devel
%description
@@ -47,11 +48,22 @@ make %{?_smp_mflags} V=1
%install
%make_install
+# Workaround faulty installation
+mv -f %{buildroot}%{buildroot}/* \
+ %{buildroot}
+# Get rid of unvanted files
+rm -rf %{buildroot}/home %{buildroot}%{_datadir}/doc/%{name}
+# Update desktop file
+%suse_update_desktop_file -r %{name} Development Documentation
+%suse_update_desktop_file %{name} -G%{name}
%files
%doc CHANGES.md COPYING README.md
%{_bindir}/htmldoc
%{_datadir}/htmldoc
+%{_datadir}/pixmaps/htmldoc.xpm
+%{_datadir}/mime/packages/htmldoc.xml
+%{_datadir}/applications/htmldoc.desktop
%{_mandir}/man1/htmldoc.1%{ext_man}
%changelog