File lucidor.spec of Package lucidor

#
# spec file for package lucidor
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           lucidor
Version:        0.9.10
Release:        0
Summary:        E-book reader application
License:        GPL-3.0+
Group:          Productivity/Other
Url:            http://lucidor.org/lucidor/
Source0:        http://lucidor.org/lucidor/%{name}_%{version}.tar.gz
BuildRequires:  fdupes
Requires:       MozillaFirefox
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif

%description
Lucidor is an e-book reader application. It supports e-books
in the EPUB file format, and catalogs in the OPDS format.

%prep
%setup -q


%build
cp -a lucidor.sh lucidor-bin
sed -i "s/DIR=lucidor/DIR=\/usr\/share\/lucidor/" lucidor-bin


%install
# app
install -d %{buildroot}%{_bindir} %{buildroot}%{_datadir}
install -D lucidor-bin %{buildroot}%{_bindir}/lucidor
cp -r lucidor %{buildroot}%{_datadir}/

# misc
install -d %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/pixmaps %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
install -m 644 data/icons/scalable/apps/lucidor.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
install -m 644 data/lucidor.xpm %{buildroot}%{_datadir}/pixmaps

# desktop file
# mkdir -p {buildroot}{_datadir}/applications/
install -m 644 data/lucidor.desktop %{buildroot}%{_datadir}/applications/lucidor.desktop
%if 0%{?suse_version}
%suse_update_desktop_file lucidor
%endif

# man
install -d %{buildroot}%{_mandir}/man1
install -m 644 man/lucidor.1 %{buildroot}%{_mandir}/man1 && gzip %{buildroot}%{_mandir}/man1/lucidor.1

# mime
#install -D -m 644 debian.orig/lucidor.mime {buildroot}{_libdir}/mime/packages/lucidor
install -D -m 644 debian.orig/lucidor.sharedmimeinfo %{buildroot}%{_datadir}/mime/packages/lucidor.xml
# change wrong line endings
sed -i s/\\r//g %{buildroot}%{_datadir}/mime/packages/lucidor.xml

# documentation
# change wrong line endings
sed -i s/\\r//g style.css

%fdupes -s %{buildroot}


%post
#desktop_database_post


%postun
#desktop_database_postun


%files
%defattr(-,root,root,-)
%doc credits.txt gpl-3.0.txt readme.html
#dir {_libdir}/mime
#dir {_libdir}/mime/packages
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_bindir}/lucidor
%{_datadir}/lucidor/
%{_mandir}/man1/lucidor.1.gz
%{_datadir}/applications/lucidor.desktop
#{_libdir}/mime/packages/lucidor
%{_datadir}/mime/packages/lucidor.xml
%{_datadir}/icons/hicolor/scalable/apps/lucidor.svg
%{_datadir}/pixmaps/lucidor.xpm

%changelog
openSUSE Build Service is sponsored by