SHA256
1
0
forked from pool/python-kiwi
Marcus Schaefer 2017-03-09 16:13:24 +00:00 committed by Git OBS Bridge
parent dbd31c9d88
commit 9196852f9d
2 changed files with 44 additions and 18 deletions

View File

@ -30,6 +30,7 @@ Source1: %{name}-boot-packages
Source2: %{name}-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_module base}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
BuildRequires: fdupes
BuildRequires: update-alternatives
@ -41,12 +42,12 @@ Provides: kiwi-image:vmx
Provides: kiwi-image:pxe
Provides: kiwi-image:oem
Requires: update-alternatives
Requires: %{python_module docopt}
Requires: %{python_module setuptools}
Requires: %{python_module lxml}
Requires: %{python_module xattr}
Requires: %{python_module six}
Requires: %{python_module future}
Requires: python-docopt
Requires: python-setuptools
Requires: python-lxml
Requires: python-xattr
Requires: python-six
Requires: python-future
Requires(post): update-alternatives
Requires(postun): update-alternatives
# tools used by kiwi
@ -118,6 +119,8 @@ Requires: s390-tools
%define distro rhel-07.0
%endif
%python_subpackages
%description
The KIWI Image System provides an operating system image builder
for Linux supported hardware platforms as well as for virtualization
@ -172,21 +175,36 @@ kiwi to build the boot image. This package must never be published
nor installed by anybody else except for the buildservice, it is part
of the kiwi - buildservice integration exclusively
%package -n kiwi-man-pages
Summary: KIWI - manual pages
License: GPL-3.0+
Group: System/Management
%description -n kiwi-man-pages
Provides manual pages to describe the kiwi commands
%prep
%setup -q -n kiwi-%{version}
%build
%python_build
%python_build --cflags="${RPM_OPT_FLAGS}"
%install
%python_install
# alternatives setup for kiwi -> kiwi-ng binary
# init alternatives setup
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
# alternatives setup for kiwi -> kiwi-ng-py_ver binary
touch %{buildroot}%{_sysconfdir}/alternatives/kiwi
ln -s %{_sysconfdir}/alternatives/kiwi \
%{buildroot}%_bindir/kiwi
# alternatives setup for kiwicompat -> kiwicompat-py_ver binary
touch %{buildroot}%{_sysconfdir}/alternatives/kiwicompat
ln -s %{_sysconfdir}/alternatives/kiwicompat \
%{buildroot}%_bindir/kiwicompat
# kiwi pxeboot directory structure to be packed in kiwi-pxeboot
%ifarch %ix86 x86_64
for i in KIWI pxelinux.cfg image upload boot; do \
@ -199,11 +217,15 @@ done
%post
%{_sbindir}/update-alternatives \
--install %_bindir/kiwi kiwi %_bindir/kiwi-ng 10
--install %_bindir/kiwi kiwi %_bindir/kiwi-ng-%{py_ver} 10
%{_sbindir}/update-alternatives \
--install %_bindir/kiwicompat kiwicompat %_bindir/kiwicompat-%{py_ver} 10
%preun
%{_sbindir}/update-alternatives \
--remove kiwi %_bindir/kiwi
%{_sbindir}/update-alternatives \
--remove kiwicompat %_bindir/kiwicompat
%ifarch %ix86 x86_64
%pre -n kiwi-pxeboot
@ -218,23 +240,27 @@ if ! /usr/bin/getent passwd tftp >/dev/null; then
fi
%endif
%files
%files %python_files
%defattr(-,root,root,-)
%{_bindir}/kiwi-ng
%{_bindir}/kiwi-ng-%{py_ver}
%{_bindir}/kiwicompat-%{py_ver}
%ghost %{_bindir}/kiwi
%ghost %{_bindir}/kiwicompat
%ghost %_sysconfdir/alternatives/kiwi
%{_bindir}/kiwicompat
%ghost %_sysconfdir/alternatives/kiwicompat
%{python_sitelib}/*
%pycache_only %{python3_sitelib}/__pycache__/*
%{python_sitelib}/kiwi-%{version}-py*.egg-info
%config %_sysconfdir/bash_completion.d/kiwi-ng.sh
%config %_sysconfdir/bash_completion.d/kiwi-ng-%{py_ver}.sh
%files -n kiwi-man-pages
%defattr(-, root, root)
%doc %{_mandir}/man2/*
%files -n kiwi-tools
%defattr(-, root, root)
%exclude %{_bindir}/kiwi
%exclude %{_bindir}/kiwi-ng
%exclude %{_bindir}/kiwicompat
%exclude %{_bindir}/kiwi-ng-*
%exclude %{_bindir}/kiwicompat-*
%{_bindir}/*
%ifarch %ix86 x86_64

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:678e5edffb58f73e96a2db8d5a41edc3ef372beddb9137c3a7de5097a9d51572
size 2937655
oid sha256:d36754f2b58895929ebe2c1bcb29d4969db1929c0db71e5c6745534fc433ee4b
size 2924212