Blame SPECS/synce4l.spec

84ac35
%global gitver 9564b5589d72ed3571a1f2130204aea60683bd78
84ac35
%global gitrel %(c=%{gitver}; echo ${c:0:6})
84ac35
%global gitdate 20221122
84ac35
84ac35
Name:		synce4l
84ac35
Version:	0
84ac35
Release:	4.%{gitdate}git%{gitrel}%{?dist}
84ac35
Summary:	SyncE implementation for Linux
84ac35
84ac35
License:	GPL-2.0-or-later
84ac35
URL:		https://github.com/intel/synce4l
84ac35
Source0:	https://github.com/intel/synce4l/archive/%{gitrel}/synce4l-%{gitrel}.tar.gz
84ac35
Source1:	synce4l.service
84ac35
Source2:	synce4l.conf
84ac35
84ac35
BuildRequires:	gcc make systemd
84ac35
84ac35
%{?systemd_requires}
84ac35
84ac35
%description
84ac35
synce4l is a software implementation of Synchronous Ethernet (SyncE) according
84ac35
to ITU-T Recommendation G.8264. The design goal is to provide logic to
84ac35
supported hardware by processing Ethernet Synchronization Messaging Channel
84ac35
(ESMC) and control Ethernet Equipment Clock (EEC) on Network Card Interface
84ac35
(NIC).
84ac35
84ac35
%prep
84ac35
%setup -q -n synce4l-%{gitver}
84ac35
84ac35
%build
84ac35
%{make_build} \
84ac35
	EXTRA_CFLAGS="$RPM_OPT_FLAGS" \
84ac35
	EXTRA_LDFLAGS="$RPM_LD_FLAGS"
84ac35
84ac35
%install
84ac35
# make_install doesn't work here
84ac35
%makeinstall
84ac35
84ac35
mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir},%{_unitdir},%{_mandir}/man5}
84ac35
install -m 644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}
84ac35
install -m 644 -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
84ac35
84ac35
echo '.so man8/synce4l.8' > $RPM_BUILD_ROOT%{_mandir}/man5/synce4l.conf.5
84ac35
84ac35
%check
84ac35
./synce4l -h 2>&1 | grep 'usage:.*synce4l'
84ac35
84ac35
%post
84ac35
%systemd_post synce4l.service
84ac35
84ac35
%preun
84ac35
%systemd_preun synce4l.service
84ac35
84ac35
%postun
84ac35
%systemd_postun_with_restart synce4l.service
84ac35
84ac35
%files
84ac35
%license COPYING
84ac35
%doc README.md
84ac35
%config(noreplace) %{_sysconfdir}/synce4l.conf
84ac35
%{_unitdir}/synce4l.service
84ac35
%{_sbindir}/synce4l
84ac35
%{_mandir}/man5/*.5*
84ac35
%{_mandir}/man8/*.8*
84ac35
84ac35
%changelog
84ac35
* Tue Jan 03 2023 Miroslav Lichvar <mlichvar@redhat.com> 0-4.20221122git9564b5
84ac35
- update to 20221122git9564b5 (#2019751)
84ac35
84ac35
* Wed Nov 16 2022 Miroslav Lichvar <mlichvar@redhat.com> 0-3.20221114gitca51d5
84ac35
- update to 20221114gitca51d5 (#2141038)
84ac35
84ac35
* Thu Nov 10 2022 Miroslav Lichvar <mlichvar@redhat.com> 0-2.20221108git079577
84ac35
- fix compiler warning (#2141038)
84ac35
- add simple test (#2141038)
84ac35
84ac35
* Tue Nov 08 2022 Miroslav Lichvar <mlichvar@redhat.com> 0-1.20221108git079577
84ac35
- make initial release