Blob Blame History Raw
# Using just the commit date as the version, upstream has not cut a release
# in ten years so they're unlikely to start now...
%global snapdate 20170830
%global snapver %{snapdate}git

Name:		can-utils
Version:	%{snapver}
Release:	2%{?dist}
Summary:	SocketCAN user space utilities and tools

Group:		Applications/Communications
# most utilities are dual-licensed but some are GPLv2 only
License:	GPLv2 and (GPLv2 or BSD)
URL:		https://github.com/linux-can/can-utils
# Upstream does not provide release-tarballs
Source0:	%{name}-%{snapver}.tar.gz
# Use this to extract new snapshots from upstream git repo
Source1:	can-snapshot.sh

BuildRequires:	autoconf automake libtool gcc glibc-devel

%description
CAN is a message-based network protocol designed for vehicles originally
created by Robert Bosch GmbH. SocketCAN is a set of open source CAN
drivers and a networking stack contributed by Volkswagen Research to
the Linux kernel.

This package contains some user space utilities for Linux SocketCAN subsystem.

%prep
%setup -q -n %{name}-%{snapver}

%build
autoreconf -i

export CFLAGS="%{optflags} -fno-strict-aliasing"

%configure --disable-silent-rules
make %{?_smp_mflags}

# Extract the dual license from one of the sources
head -39 asc2log.c | tail -37 | cut -c4- > COPYING

%install
%make_install

%files
%license COPYING
%doc README.md
%{_bindir}/asc2log
%{_bindir}/bcmserver
%{_bindir}/can-calc-bit-timing
%{_bindir}/canbusload
%{_bindir}/candump
%{_bindir}/canfdtest
%{_bindir}/cangen
%{_bindir}/cangw
%{_bindir}/canlogserver
%{_bindir}/canplayer
%{_bindir}/cansend
%{_bindir}/cansniffer
%{_bindir}/isotpdump
%{_bindir}/isotpperf
%{_bindir}/isotprecv
%{_bindir}/isotpsend
%{_bindir}/isotpserver
%{_bindir}/isotpsniffer
%{_bindir}/isotptun
%{_bindir}/log2asc
%{_bindir}/log2long
%{_bindir}/slcan_attach
%{_bindir}/slcand
%{_bindir}/slcanpty

%changelog
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 20170830git-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Tue Oct 24 2017 Panu Matilainen <pmatilai@redhat.com> - 20170830git-1
- New snapshot from upstream
- Package README.md file now that it has somewhat meaningful content

* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20160229git-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20160229git-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20160229git-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Thu Apr 14 2016 Panu Matilainen <pmatilai@redhat.com> - 20160229git-1
- Initial packaging