File jeos-firstboot.spec of Package jeos-firstboot

#
# spec file for package jeos-firstboot
#
# Copyright (c) 2017 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:           jeos-firstboot
Version:        0.0+git20170629.77ff28f
Release:        0
Summary:        Simple text based JeOS first boot wizard
License:        MIT
Group:          Development/Tools/Other
Url:            https://github.com/openSUSE/jeos-firstboot
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  distribution-release
BuildRequires:  systemd
BuildRequires:  udev
#only needed as directory owners
Requires:       distribution-release
Requires:       systemd
Requires:       udev
%if 0%{?is_opensuse}
# Needed by jeos-add-repos
Requires:       libxslt-tools
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Simple text based JeOS first boot wizard that can be used instead
of the line based one that is built into systemd.

%prep
%setup -q

%build

%install
cp -a files/* %{buildroot}
%if !0%{?is_opensuse}
	# Not needed on SLE
	rm %{buildroot}%{_sbindir}/jeos-add-repos
%endif

%preun
%service_del_preun jeos-firstboot.service

%postun
%service_del_postun jeos-firstboot.service

%pre
%service_add_pre jeos-firstboot.service

%post
%service_add_post jeos-firstboot.service

%files
%defattr(-,root,root)
%doc README examples/ifcfg-eth0
%license LICENSE
%{_unitdir}
%{_libexecdir}/jeos-firstboot
%{_libexecdir}/jeos-firstboot-functions
%if 0%{?is_opensuse}
%{_sbindir}/jeos-add-repos
%endif
/lib/kiwi

%changelog
openSUSE Build Service is sponsored by