Blame SPECS/synce4l.spec

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