3adb1e2
Name:		can-utils
242bca2
Version:	2020.12.0
c4d3e77
Release:	2%{?dist}
3adb1e2
Summary:	SocketCAN user space utilities and tools
3adb1e2
3adb1e2
# most utilities are dual-licensed but some are GPLv2 only
3adb1e2
License:	GPLv2 and (GPLv2 or BSD)
3adb1e2
URL:		https://github.com/linux-can/can-utils
b351110
Source0:	https://github.com/linux-can/can-utils/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
3adb1e2
# Use this to extract new snapshots from upstream git repo
3adb1e2
Source1:	can-snapshot.sh
3adb1e2
b351110
BuildRequires:	autoconf
b351110
BuildRequires:	automake
b351110
BuildRequires:	libtool
b351110
BuildRequires:	gcc
b351110
BuildRequires:	glibc-devel
242bca2
BuildRequires:  make
3adb1e2
3adb1e2
%description
3adb1e2
CAN is a message-based network protocol designed for vehicles originally
3adb1e2
created by Robert Bosch GmbH. SocketCAN is a set of open source CAN
3adb1e2
drivers and a networking stack contributed by Volkswagen Research to
3adb1e2
the Linux kernel.
3adb1e2
3adb1e2
This package contains some user space utilities for Linux SocketCAN subsystem.
3adb1e2
3adb1e2
%prep
a80f5b0
%autosetup -p1
35ecfaa
# Correct includes
35ecfaa
for file in canlogserver cansniffer isotpdump isotpperf slcanpty isotpdump isotpsniffer; do
35ecfaa
    sed -i -e 's|#include <sys/socket.h>|#include <linux/sockios.h>|' ${file}.c
35ecfaa
done
3adb1e2
3adb1e2
%build
496cf85
autoreconf -vif
3adb1e2
3adb1e2
export CFLAGS="%{optflags} -fno-strict-aliasing"
3adb1e2
3adb1e2
%configure --disable-silent-rules
a80f5b0
%make_build
3adb1e2
3adb1e2
# Extract the dual license from one of the sources
3adb1e2
head -39 asc2log.c | tail -37 | cut -c4- > COPYING
3adb1e2
3adb1e2
%install
3adb1e2
%make_install
3adb1e2
3adb1e2
%files
3adb1e2
%license COPYING
6c2d55e
%doc README.md
3adb1e2
%{_bindir}/asc2log
3adb1e2
%{_bindir}/bcmserver
3adb1e2
%{_bindir}/can-calc-bit-timing
3adb1e2
%{_bindir}/canbusload
3adb1e2
%{_bindir}/candump
3adb1e2
%{_bindir}/canfdtest
3adb1e2
%{_bindir}/cangen
3adb1e2
%{_bindir}/cangw
3adb1e2
%{_bindir}/canlogserver
3adb1e2
%{_bindir}/canplayer
3adb1e2
%{_bindir}/cansend
2bdc8b0
%{_bindir}/cansequence
3adb1e2
%{_bindir}/cansniffer
3adb1e2
%{_bindir}/isotpdump
3adb1e2
%{_bindir}/isotpperf
3adb1e2
%{_bindir}/isotprecv
3adb1e2
%{_bindir}/isotpsend
3adb1e2
%{_bindir}/isotpserver
3adb1e2
%{_bindir}/isotpsniffer
3adb1e2
%{_bindir}/isotptun
2bdc8b0
%{_bindir}/j1939acd
2bdc8b0
%{_bindir}/j1939cat
2bdc8b0
%{_bindir}/j1939spy
2bdc8b0
%{_bindir}/j1939sr
3adb1e2
%{_bindir}/log2asc
3adb1e2
%{_bindir}/log2long
3adb1e2
%{_bindir}/slcan_attach
3adb1e2
%{_bindir}/slcand
3adb1e2
%{_bindir}/slcanpty
496cf85
%{_bindir}/testj1939
3adb1e2
3adb1e2
%changelog
c4d3e77
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2020.12.0-2
c4d3e77
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
c4d3e77
242bca2
* Sun Jan  3 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2020.12.0-1
242bca2
- Update to 2020.12.0
242bca2
242bca2
* Mon Nov  9 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 2020.11.0-1
a80f5b0
- Update to 2020.11.0
a80f5b0
6489654
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2020.02.04-2
6489654
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
6489654
b351110
* Sat Feb 22 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 2020.02.04-1
b351110
- Update to 2020.02.04
b351110
dacdb60
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2018.02.0-5
dacdb60
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
dacdb60
08352ae
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2018.02.0-4
08352ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
08352ae
aa02f63
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2018.02.0-3
aa02f63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
aa02f63
69114ea
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2018.02.0-2
69114ea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
69114ea
496cf85
* Mon Feb 19 2018 Peter Robinson <pbrobinson@fedoraproject.org> 2018.02.0-1
496cf85
- Upstream 2018.02.0 release
496cf85
1ba7c0f
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 20170830git-2
1ba7c0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
1ba7c0f
6c2d55e
* Tue Oct 24 2017 Panu Matilainen <pmatilai@redhat.com> - 20170830git-1
6c2d55e
- New snapshot from upstream
6c2d55e
- Package README.md file now that it has somewhat meaningful content
6c2d55e
c3277ae
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20160229git-4
c3277ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
c3277ae
19b9486
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20160229git-3
19b9486
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
19b9486
a537528
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20160229git-2
a537528
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a537528
3adb1e2
* Thu Apr 14 2016 Panu Matilainen <pmatilai@redhat.com> - 20160229git-1
3adb1e2
- Initial packaging