File kgraft.spec of Package kgraft

# spec file for package kgraft
# 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

Name:           kgraft
Version:        2.0
Release:        0
Summary:        Scripts for installing kGraft patches
License:        GPL-2.0
Group:          System/Kernel
Source1:        kgraft-rpm-helper
Source4:        kgraft-module-subpackage
Source5:        macros.kgraft
Source8:        COPYING
Conflicts:      kernel < 4.12

This package contains a helper script used when installing kGraft patch

%package devel
Summary:        Macros for building kGraft patches
# The OBS build does a testinstallation of all built packages, which needs
# the kgraft runtime package
Group:          Development/Tools/Building
Requires:       %{name} = %{version}
Requires:       kmod-compat

%description devel
This package contains RPM macro definitions for building kGraft patches.

%setup -q -Tc
cp %{_sourcedir}/{kgraft-rpm-helper,dracut-{module-setup,kgraft-patch}.sh} .
cp %{_sourcedir}/{kgraft-module-subpackage,macros.kgraft} .
cp %{_sourcedir}/kgr.{sh,man} .
cp %{_sourcedir}/COPYING .


install -D kgraft-rpm-helper %{buildroot}%{_libexecdir}/kgraft/kgraft-rpm-helper
install -D \
install -D \
install -D -m0644 kgraft-module-subpackage %{buildroot}%{_libexecdir}/rpm/kgraft-module-subpackage
install -D -m0644 macros.kgraft %{buildroot}%{_sysconfdir}/rpm/macros.kgraft
install -D -m0755 %{buildroot}%{_bindir}/kgr
sed -i 's/@@VERSION@@/%{version}-%{release}/' %{buildroot}%{_bindir}/kgr
install -d %{buildroot}%{_mandir}/man8
gzip -c9 > %{buildroot}%{_mandir}/man8/kgr.8.gz
install -d %{buildroot}%{_docdir}

%dir %{_libexecdir}/dracut
%dir %{_libexecdir}/dracut/modules.d

%files devel

openSUSE Build Service is sponsored by