0c5260e
Name:		libftdi
04315ba
Version:	1.3
abd653f
Release:	12%{?dist}
0c5260e
Summary:	Library to program and control the FTDI USB controller
0c5260e
0c5260e
Group:		System Environment/Libraries
0c5260e
License:	LGPLv2
0c5260e
URL:		http://www.intra2net.com/de/produkte/opensource/ftdi/
b1e1711
Source0:	http://www.intra2net.com/en/developer/%{name}/download/%{name}1-%{version}.tar.bz2
0c5260e
b1e1711
BuildRequires:	boost-devel
b1e1711
BuildRequires:	cmake
2f2fa6a
BuildRequires:	doxygen
b1e1711
BuildRequires:	libconfuse-devel
b1e1711
BuildRequires:	libusbx-devel
04315ba
BuildRequires:	python2-devel
654187c
BuildRequires:	python3-devel
b1e1711
BuildRequires:	swig
654187c
BuildRequires:	gcc-c++
b1e1711
Requires:	systemd
a8b16a0
0c5260e
b1e1711
%description
b1e1711
A library (using libusb) to talk to FTDI's FT2232C,
b1e1711
FT232BM and FT245BM type chips including the popular bitbang mode.
b1e1711
0c5260e
%package devel
0c5260e
Summary:	Header files and static libraries for libftdi
0c5260e
Group:		Development/Libraries
b1e1711
Requires:	%{name}%{?_isa} = %{version}-%{release}
654187c
Requires:	python3-%{name}%{?_isa} = %{version}-%{release}
b1e1711
Requires:	pkgconfig
b1e1711
b1e1711
%description devel
b1e1711
Header files and static libraries for libftdi
0c5260e
6f6613a
%package -n python2-libftdi
6f6613a
%{?python_provide:%python_provide python2-libftdi}
6f6613a
# Remove before F30
e294c33
Provides: %{name}-python = %{version}-%{release}
6f6613a
Provides: %{name}-python%{?_isa} = %{version}-%{release}
6f6613a
Obsoletes: %{name}-python < %{version}-%{release}
805952e
Summary:	Libftdi library Python binding
805952e
Group:		Development/Libraries
b1e1711
Requires:	%{name}%{?_isa} = %{version}-%{release}
b1e1711
6f6613a
%description -n python2-libftdi
b1e1711
Libftdi Python Language bindings.
805952e
654187c
%package -n python3-libftdi
654187c
%{?python_provide:%python_provide python3-libftdi}
654187c
Summary:	Libftdi library Python 3 binding
654187c
Group:		Development/Libraries
654187c
Requires:	%{name}%{?_isa} = %{version}-%{release}
654187c
654187c
%description -n python3-libftdi
654187c
Libftdi Python 3 Language bindings.
654187c
805952e
%package c++
805952e
Summary:	Libftdi library C++ binding
805952e
Group:		Development/Libraries
b1e1711
Requires:	%{name}%{?_isa} = %{version}-%{release}
b1e1711
b1e1711
%description c++
b1e1711
Libftdi library C++ language binding.
805952e
805952e
%package c++-devel
805952e
Summary:	Libftdi library C++ binding development headers and libraries
805952e
Group:		Development/Libraries
b1e1711
Requires:	%{name}-devel = %{version}-%{release}
b1e1711
Requires:	%{name}-c++ = %{version}-%{release}
805952e
805952e
%description c++-devel
805952e
Libftdi library C++ binding development headers and libraries
805952e
for building C++ applications with libftdi.
805952e
0c5260e
0c5260e
%prep
b1e1711
%setup -q -n %{name}1-%{version}
b1e1711
8e85585
#kernel does not provide usb_device anymore
8e85585
sed -i -e 's/usb_device/usb/g' packages/99-libftdi.rules
b1e1711
sed -i -e 's/GROUP="plugdev"/TAG+="uaccess"/g' packages/99-libftdi.rules
0c5260e
0c5260e
%build
b1e1711
export CMAKE_PREFIX_PATH=/usr
b1e1711
654187c
mkdir build-py2
654187c
pushd build-py2
654187c
%{cmake} -DPython_ADDITIONAL_VERSIONS=%{python2_version} ..
0c5260e
make %{?_smp_mflags}
654187c
popd
0c5260e
654187c
mkdir build-py3
654187c
pushd build-py3
654187c
%{cmake} -DPython_ADDITIONAL_VERSIONS=%{python3_version} ..
654187c
make %{?_smp_mflags}
654187c
popd
654187c
654187c
# Fix python sheband lines
654187c
find python/examples -type f -exec sed -i '1s=^#!/usr/bin/\(python\|env python\)[23]\?=#!%{__python3}=' {} +
0c5260e
0c5260e
%install
654187c
# Install python2, since we'll prefer python3 with the second install.
654187c
pushd build-py2
654187c
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
654187c
popd
654187c
654187c
pushd build-py3
0c5260e
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
654187c
popd
b1e1711
b1e1711
mkdir -p $RPM_BUILD_ROOT/lib/udev/rules.d/
b1e1711
install -p -m 644 packages/99-libftdi.rules $RPM_BUILD_ROOT/lib/udev/rules.d/69-libftdi.rules
b1e1711
b1e1711
find $RPM_BUILD_ROOT -type f -name "*.la" -delete
b1e1711
find $RPM_BUILD_ROOT -type f -name "*.a" -delete
b1e1711
0c5260e
#no man install
2f2fa6a
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3
2f2fa6a
install -p -m 644 build-py3/doc/man/man3/*.3 $RPM_BUILD_ROOT%{_mandir}/man3
0c5260e
0c5260e
# Cleanup examples
0c5260e
rm -f $RPM_BUILD_ROOT/%{_bindir}/simple
0c5260e
rm -f $RPM_BUILD_ROOT/%{_bindir}/bitbang
0c5260e
rm -f $RPM_BUILD_ROOT/%{_bindir}/bitbang2
0c5260e
rm -f $RPM_BUILD_ROOT/%{_bindir}/bitbang_ft2232
0c5260e
rm -f $RPM_BUILD_ROOT/%{_bindir}/bitbang_cbus
0c5260e
rm -f $RPM_BUILD_ROOT/%{_bindir}/find_all
8fee773
rm -f $RPM_BUILD_ROOT/%{_bindir}/find_all_pp
fc6a63b
rm -f $RPM_BUILD_ROOT/%{_bindir}/baud_test
fc6a63b
rm -f $RPM_BUILD_ROOT/%{_bindir}/serial_read
d974659
rm -f $RPM_BUILD_ROOT/%{_bindir}/serial_test
b1e1711
rm -rf $RPM_BUILD_ROOT/%{_libdir}/cmake*
b1e1711
04315ba
rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/libftdi1/example.conf
04315ba
b1e1711
%check
094a261
#make check
0c5260e
0c5260e
0c5260e
%files
fc98573
%{!?_licensedir:%global license %%doc}
fc98573
%license COPYING.LIB
fc98573
%doc AUTHORS ChangeLog README
b1e1711
%{_libdir}/libftdi1.so.2*
b1e1711
/lib/udev/rules.d/69-libftdi.rules
0c5260e
0c5260e
%files devel
2f2fa6a
%doc build-py3/doc/html
b1e1711
%doc %{_datadir}/libftdi/examples
b1e1711
%{_bindir}/ftdi_eeprom
b1e1711
%{_bindir}/libftdi1-config
b1e1711
%{_libdir}/libftdi1.so
b1e1711
%{_includedir}/libftdi1
b1e1711
%{_libdir}/pkgconfig/libftdi1.pc
2f2fa6a
%{_mandir}/man3/*
654187c
# Don't include byte-compiled files for python scripts.
654187c
%exclude %{_datadir}/libftdi/examples/*.pyc
654187c
%exclude %{_datadir}/libftdi/examples/*.pyo
0c5260e
6f6613a
%files -n python2-libftdi
04315ba
%{python2_sitearch}/*
805952e
654187c
%files -n python3-libftdi
654187c
%{python3_sitearch}/*
654187c
805952e
%files c++
b1e1711
%{_libdir}/libftdipp1.so.2*
805952e
805952e
%files c++-devel
b1e1711
%{_libdir}/libftdipp1.so
b1e1711
%{_includedir}/libftdi1/*hpp
b1e1711
%{_libdir}/pkgconfig/libftdipp1.pc
0c5260e
0c5260e
%post -p /sbin/ldconfig
0c5260e
%postun -p /sbin/ldconfig
0c5260e
805952e
%post c++ -p /sbin/ldconfig
805952e
%postun c++ -p /sbin/ldconfig
805952e
0c5260e
%changelog
abd653f
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.3-12
abd653f
- Rebuilt for Python 3.7
ddba03d
- Temporarily disable doxygen docs to workaround FTBFS
abd653f
3861990
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-11
3861990
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3861990
654187c
* Mon Oct 09 2017 Troy Curtis, Jr <troycurtisjr@gmail.com> - 1.3-10
654187c
- Add python3 subpackage.
654187c
- Drop patch0 in favor of built-in cmake config methods.
654187c
- Don't include bytecompiled files for the example python scripts.
654187c
e294c33
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.3-9
e294c33
- Add Provides for the old name without %%_isa
e294c33
6f6613a
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.3-8
6f6613a
- Python 2 binary package renamed to python2-libftdi
6f6613a
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
6f6613a
b1a2eeb
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-7
b1a2eeb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b1a2eeb
8813b8e
* Mon Jul 03 2017 Jonathan Wakely <jwakely@redhat.com> - 1.3-6
8813b8e
- Rebuilt for Boost 1.64
8813b8e
2115696
* Thu May 25 2017 Gwyn Ciesla <limburgher@gmail.com> 1.3-5
2115696
- libconfuse rebuild.
2115696
2957767
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-4
2957767
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2957767
067e466
* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 1.3-3
067e466
- Rebuilt for Boost 1.63
067e466
60a5f3c
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-2
60a5f3c
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
60a5f3c
04315ba
* Tue Jun 14 2016 Jon Ciesla <limburgher@gmail.com> 1.3-1
04315ba
- 1.3, libconfuse rebuild.
04315ba
5e79b1b
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-8
5e79b1b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5e79b1b
23c173d
* Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 1.2-7
23c173d
- Rebuilt for Boost 1.60
23c173d
8e9b3a9
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 1.2-6
8e9b3a9
- Rebuilt for Boost 1.59
8e9b3a9
9d90314
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-5
9d90314
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
9d90314
2b457b2
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 1.2-4
2b457b2
- rebuild for Boost 1.58
2b457b2
44e6b8e
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-3
44e6b8e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
44e6b8e
32148bc
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.2-2
32148bc
- Rebuilt for GCC 5 C++11 ABI change
32148bc
fc98573
* Sun Feb  8 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.2-1
fc98573
- Update to 1.2
fc98573
- Use %%license
fc98573
Petr Machata b9e20ae
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 1.1-5
Petr Machata b9e20ae
- Rebuild for boost 1.57.0
Petr Machata b9e20ae
b528e29
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-4
b528e29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
b528e29
6be1117
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-3
6be1117
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
6be1117
Petr Machata ec6bc46
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 1.1-2
Petr Machata ec6bc46
- Rebuild for boost 1.55.0
Petr Machata ec6bc46
b1e1711
* Mon Mar 24 2014 Peter Robinson <pbrobinson@fedoraproject.org> 1.1-1
b1e1711
- Update to 1.1
b1e1711
- Build against libusb1
b1e1711
- Package cleanup
b1e1711
- Run make check
b1e1711
da7a951
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20-5
da7a951
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
da7a951
Petr Machata 5adf0ef
* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 0.20-4
Petr Machata 5adf0ef
- Rebuild for boost 1.54.0
Petr Machata 5adf0ef
b6d1705
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20-3
b6d1705
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
b6d1705
711d36b
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20-2
711d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
711d36b
d974659
* Fri May 04 2012 Lucian Langa <cooly@gnome.eu.org> - 0.20-1
d974659
- new upstream release
d974659
4851bec
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.19-3
4851bec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
4851bec
ebe1a6c
* Fri Nov 25 2011 Lucian Langa <cooly@gnome.eu.org> - 0.19-2
ebe1a6c
- fix bug #678781 - too generic name in man file
ebe1a6c
eb452d4
* Sat Jun 18 2011 Lucian Langa <cooly@gnome.eu.org> - 0.19-1
eb452d4
- new upstream release
eb452d4
eb452d4
* Tue May 24 2011 Lucian Langa <cooly@gnome.eu.org> - 0.19-1
eb452d4
- new upstream release
eb452d4
d66da53
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.18-5
d66da53
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d66da53
0f28bfb
* Mon Dec 06 2010 Dan Horák <dan[at]danny.cz> - 0.18-4
0f28bfb
- fix build with libusb >= 1:0.1.3 (wrapper around libusb1)
0f28bfb
9a1f178
* Sun Aug  1 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.18-3
9a1f178
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
9a1f178
8d838df
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.18-2
8d838df
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
8d838df
185d446
* Thu Jul 01 2010 Lucian Langa <cooly@gnome.eu.org> - 0.18-1
185d446
- drop patch0 - fixed upstream
185d446
- new upstream release
185d446
8e86cd6
* Wed Jun 09 2010 Lucian Langa <cooly@gnome.eu.org> - 0.17-5
8e86cd6
- readd mistakenly dropped parch (fixes multilib issues)
8e86cd6
54956c5
* Wed May 05 2010 Lucian Langa <cooly@gnome.eu.org> - 0.17-4
54956c5
- fix typo in group handling (#581151)
54956c5
8e85585
* Thu Mar 11 2010 Lucian Langa <cooly@gnome.eu.org> - 0.17-3
8e85585
- fix incorrect UDEV rule (#563566)
8e85585
6123b84
* Sat Jan 16 2010 Lucian Langa <cooly@gnome.eu.org> - 0.17-2
6123b84
- do not package static libfiles (#556068)
6123b84
b1e1711
* Sun Jan  3 2010 Lucian Langa <cooly@gnome.eu.org> - 0.17-1
e701a64
- add patch to fix typo in python bindings
e701a64
- drop multilib patch0 fixed upstream
fc6a63b
- new upstream release
fc6a63b
a8b16a0
* Sat Aug 22 2009 Lucian Langa <cooly@gnome.eu.org> - 0.16-7
a8b16a0
- add group for udev rule (#517773)
a8b16a0
fb98151
* Fri Jul 31 2009 Lucian Langa <cooly@gnome.eu.org> - 0.16-6
fb98151
- rebuilt with modified patch
fb98151
328a305
* Fri Jul 31 2009 Lucian Langa <cooly@gnome.eu.org> - 0.16-5
328a305
- fix multilib conflict in libftdi-config (#508498)
328a305
1ee77f0
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-4
1ee77f0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
1ee77f0
805952e
* Wed Jul 01 2009 Lucian Langa <cooly@gnome.eu.org> - 0.16-3
805952e
- added udev rules
805952e
- addedd c++, python bindings
805952e
805952e
* Tue Jun 30 2009 Lucian Langa <cooly@gnome.eu.org> - 0.16-2
805952e
- fix doxygen conflict (#508498)
805952e
4f9be70
* Fri May 08 2009 Lucian Langa <cooly@gnome.eu.org> - 0.16-1
4f9be70
- new upstream release
4f9be70
3f30e6d
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-4
3f30e6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
3f30e6d
787646c
* Mon Feb 16 2009 Lucian Langa <cooly@gnome.eu.org> - 0.15-3
787646c
- fix tag
787646c
ef5a0c2
* Sun Feb 15 2009 Lucian Langa <cooly@gnome.eu.org> - 0.15-2
ef5a0c2
- add new BR boost-devel
ef5a0c2
8fee773
* Sun Feb 15 2009 Lucian Langa <cooly@gnome.eu.org> - 0.15-1
8fee773
- fix for bug #485600: pick libusb-devel for -devel subpackage
8fee773
- new upstream release
8fee773
0c5260e
* Fri Sep 26 2008 Lucian Langa <cooly@gnome.eu.org> - 0.14-2
0c5260e
- require pkgconfig for devel
0c5260e
0c5260e
* Tue Sep 23 2008 Lucian Langa <cooly@gnome.eu.org> - 0.14-1
0c5260e
- new upstream
0c5260e
0c5260e
* Wed Sep 03 2008 Lucian Langa <cooly@gnome.eu.org> - 0.13-1
0c5260e
- initial specfile