File transactional-update.spec of Package transactional-update

#
# spec file for package transactional-update
#
# Copyright (c) 2018 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:           transactional-update
Version:        2.3
Release:        0
Summary:        Transactional Updates with btrfs and snapshots
License:        GPL-2.0-or-later
Group:          System/Base
URL:            https://github.com/thkukuk/transactional-update
Source:         %{name}-%{version}.tar.bz2
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  rpm-devel
BuildRequires:  suse-module-tools
BuildRequires:  pkgconfig(libzypp)
Requires:       logrotate
Requires:       lsof
# psmisc is needed because of fuser
Requires:       perl-HTML-Parser
Requires:       psmisc
Requires:       rsync
Conflicts:      snapper-zypp-plugin
Recommends:     rebootmgr

%description
transactional-update is a tool to update a system in an atomic
way with zypper, btrfs and snapshots.

%prep
%setup -q

%build
%configure
make %{?_smp_mflags}

%install
%make_install
%fdupes %{buildroot}%{_mandir}

%pre
%service_add_pre %{name}.service %{name}.timer create-dirs-from-rpmdb.service

%post
%service_add_post %{name}.service %{name}.timer create-dirs-from-rpmdb.service
%regenerate_initrd_post

%posttrans
%regenerate_initrd_posttrans

%preun
%service_del_preun %{name}.service %{name}.timer create-dirs-from-rpmdb.service

%postun
%service_del_postun %{name}.service %{name}.timer create-dirs-from-rpmdb.service
%regenerate_initrd_post

%files
%license COPYING
%doc NEWS
%config(noreplace) %{_sysconfdir}/logrotate.d/transactional-update
%{_unitdir}/transactional-update.service
%{_unitdir}/transactional-update.timer
%{_unitdir}/create-dirs-from-rpmdb.service
%{_sbindir}/create_dirs_from_rpmdb
%{_sbindir}/transactional-update
%{_sbindir}/tu-rebuild-kdump-initrd
%{_sbindir}/transactional-update-helper
%dir %{_prefix}%{_sysconfdir}
%{_prefix}%{_sysconfdir}/transactional-update.conf
%dir %{_prefix}/lib/dracut
%dir %{_prefix}/lib/dracut/modules.d
%{_prefix}/lib/dracut/modules.d/50transactional-update/
%{_mandir}/man5/transactional-update.conf.5%{?ext_man}
%{_mandir}/man8/transactional-update.8%{?ext_man}
%{_mandir}/man8/transactional-update.timer.8%{?ext_man}
%{_mandir}/man8/transactional-update.service.8%{?ext_man}

%changelog
openSUSE Build Service is sponsored by