File odhcp6c.spec of Package odhcp6c
#
# spec file for package odhcp6c
#
# Copyright (c) 2022 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: odhcp6c
Version: 20230725
Release: 0
Summary: Minimal DHCPv6 client
License: GPL-2.0
Group: Productivity/Networking/Other
Url: https://git.openwrt.org/?p=project/odhcp6c.git
Source0: %{name}-%{version}.tar.gz
Source1: odhcp6c@.service
Patch0: resolv.diff
BuildRequires: cmake >= 2.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
odhcp6c is a minimal DHCPv6 and RA-client for use in embedded Linux systems,
especially routers.
%prep
%setup -q
%patch0
%build
%{__cmake} -DLIBUBOX=0 .
make %{?_smp_mflags}
%install
install -D -s -m 755 %{name} %{buildroot}/%{_sbindir}/%{name}
install -D -m 755 %{name}-example-script.sh %{buildroot}/%{_sbindir}/%{name}-update
install -D -m 644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}@.service
%pre
%service_add_pre %{name}@.service
%post
%fillup_only %{name}
%service_add_post %{name}@.service
%preun
%service_del_preun %{name}@.service
%postun
%service_del_postun %{name}@.service
%files
%defattr(-,root,root)
%{_sbindir}/*
%{_unitdir}/*
%doc COPYING README
%changelog