Blame SPECS/synce4l.spec

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