File kbackup.spec of Package kbackup

# spec file for package kbackup
#
# Copyright (c) 2012 Martin Koller
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bug fixes or comments via mailto:kollix@aon.at

# norootforbuild

Name:           kbackup
Version:        1.0.2
Release:        1
License:        GPLv2
Summary:        Backup Your Data in a Simple, User Friendly, KDE-based Way
Url:            http://members.aon.at/m.koller/
Group:          Productivity/Archiving/Backup
Source0:        http://members.aon.at/m.koller/%{name}-%{version}.tar.xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires: kconfig-devel kio-devel kwidgetsaddons-devel kdoctools-devel knotifications-devel
BuildRequires: kiconthemes-devel karchive-devel
BuildRequires: kxmlgui-devel ki18n-devel libQt5Widgets-devel
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
Requires(post): shared-mime-info
Requires(postun): shared-mime-info
Recommends:     %{name}-lang = %{version}

%description
KBackup is a program that lets you back up any directories or files,
whereby it uses an easy to use directory tree to select the things to back up.

The program was designed to be very simple in its use
so that it can be used by non-computer experts.

It can do full and incremental backups.

The storage format is the well known TAR format, whereby the data
can still be stored in compressed format (bzip2 or gzip).

%package lang
Summary:        Languages for package kbackup
Group:          System/Localization
Requires:       %{name} = %{version}

%description lang
Provides translations and help to the package kbackup.

%prep
%setup -q

%build
%if 0%{?suse_version}
%cmake
%make_jobs
%else
%cmake
make
%endif

%install
pushd build
make DESTDIR=$RPM_BUILD_ROOT install
popd

%find_lang %{name}

%if 0%{?suse_version}
%suse_update_desktop_file -r %{name} Qt KDE System Backup
%else
%endif

%post
%if 0%{?mandriva_version}
%update_menus
%endif
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :

%postun
%if 0%{?mandriva_version}
%clean_menus
%endif
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog README TODO
%{_bindir}/%{name}
%{_datadir}/mime/packages/kbackup.xml
%{_datadir}/kxmlgui5/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/icons/hicolor/*/mimetypes/text-x-kbp.png
%{_datadir}/icons/hicolor/*/actions/%{name}*.png
%doc %{_datadir}/doc/HTML/en/%{name}/


%files lang -f %{name}.lang
%defattr(-,root,root,-)
%doc %{_datadir}/doc/HTML/*/%{name}
%exclude %dir %{_datadir}/doc/HTML/en
%exclude %{_datadir}/doc/HTML/en/%{name}/

%changelog
openSUSE Build Service is sponsored by