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:        %mkrel 1
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
Requires(post):   rpm-helper >= %{rpmhelper_required_version}
Requires(preun):  rpm-helper >= %{rpmhelper_required_version}
Requires(postun): rpm-helper >= %{rpmhelper_required_version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
odhcp6c is a minimal DHCPv6 and RA-client for use in embedded Linux systems,
especially routers.

%global debug_package %{nil}

%prep
%setup -q
%patch -P 0

%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

%post
%_post_service %{name}@
 
%preun
%_preun_service %{name}@
 
%postun
%_postun_userdel %{name}@

%files
%defattr(-,root,root)
%{_sbindir}/*
%{_unitdir}/*
%doc COPYING README

%changelog
openSUSE Build Service is sponsored by