File cmdline2ip.spec of Package cmdline2ip
#
# spec file for package cmdline2ip
#
# Copyright (c) 2025 Georg Pfuetzenreuter
#
# 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 https://bugs.opensuse.org/
#
Name: cmdline2ip
Version: 1
Release: 0
Summary: Network from cmdline
License: Apache-2.0
URL: https://opensuse.org
Source0: %{name}.sh
Source1: %{name}.service
%description
Miniature network manager which configures an interface based on the ifcfg kernel parameter.
%prep
%build
%install
install -D %{SOURCE0} %{buildroot}%{_libexecdir}/%{name}
install -d %{buildroot}%{_unitdir}
sed 's?__LIBEXECDIR__?%{_libexecdir}?' %{SOURCE1} > %{buildroot}%{_unitdir}/%{name}.service
%pre
%service_add_pre %{name}.service
%post
%service_add_post %{name}.service
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%files
%{_libexecdir}/%{name}
%{_unitdir}/%{name}.service
%changelog