# Using just the date as the version, upstream has not cut a release
# in ten years so they're unlikely to start now...
%global snapdate 20160229
%global snapver %{snapdate}git
Name: can-utils
Version: %{snapver}
Release: 1%{?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
%{_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
* Thu Apr 14 2016 Panu Matilainen <pmatilai@redhat.com> - 20160229git-1
- Initial packaging