diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..846e2f2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/libftdi*.tar.bz2 diff --git a/Makefile b/Makefile deleted file mode 100644 index a8fc6d1..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: libftdi -# $Id$ -NAME := libftdi -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/libftdi-cmake_swig.patch b/libftdi-cmake_swig.patch new file mode 100644 index 0000000..bbbdd46 --- /dev/null +++ b/libftdi-cmake_swig.patch @@ -0,0 +1,21 @@ +--- a/python/CMakeLists.txt ++++ b/python/CMakeLists.txt +@@ -1,3 +1,7 @@ ++# swig_add_module is deprecated and SWIG_MODULE__REAL_NAME is no ++# longer set by default so set policy to the old behavior. ++cmake_policy(SET CMP0078 OLD) ++ + option ( PYTHON_BINDINGS "Build python bindings via swig" ON ) + option ( LINK_PYTHON_LIBRARY "Link against python libraries" ON ) + +@@ -24,8 +28,9 @@ if ( SWIG_FOUND AND PYTHONLIBS_FOUND AND + + if ( DOCUMENTATION AND DOXYGEN_FOUND ) + set(CMAKE_SWIG_FLAGS -DDOXYGEN=${DOXYGEN_FOUND}) ++ set_property(SOURCE ftdi1.i PROPERTY DEPENDS ftdi1_doc.i) + endif() +- swig_add_module ( ftdi1 python ftdi1.i ) ++ swig_add_library ( ftdi1 LANGUAGE python SOURCES ftdi1.i ) + swig_link_libraries ( ftdi1 ftdi1 ) + + if ( LINK_PYTHON_LIBRARY ) diff --git a/libftdi.spec b/libftdi.spec new file mode 100644 index 0000000..3a07ff3 --- /dev/null +++ b/libftdi.spec @@ -0,0 +1,360 @@ +Name: libftdi +Version: 1.4 +Release: 1%{?dist} +Summary: Library to program and control the FTDI USB controller + +License: LGPLv2 +URL: http://www.intra2net.com/de/produkte/opensource/ftdi/ +Source0: http://www.intra2net.com/en/developer/%{name}/download/%{name}1-%{version}.tar.bz2 + +# Swig requirements have changed in newer versions of CMake. +# This has been reported to the mailing list +Patch0: libftdi-cmake_swig.patch + +BuildRequires: cmake gcc-c++ +BuildRequires: doxygen +BuildRequires: boost-devel +BuildRequires: libconfuse-devel +BuildRequires: libusbx-devel +BuildRequires: python3-devel +BuildRequires: swig + +Requires: systemd + + +%description +A library (using libusb) to talk to FTDI's FT2232C, +FT232BM and FT245BM type chips including the popular bitbang mode. + +%package devel +Summary: Header files and static libraries for libftdi +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python3-%{name}%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description devel +Header files and static libraries for libftdi + + +%package -n python3-libftdi +%{?python_provide:%python_provide python3-libftdi} +Summary: Libftdi library Python 3 binding +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description -n python3-libftdi +Libftdi Python 3 Language bindings. + + +%package c++ +Summary: Libftdi library C++ binding +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description c++ +Libftdi library C++ language binding. + + +%package c++-devel +Summary: Libftdi library C++ binding development headers and libraries +Requires: %{name}-devel = %{version}-%{release} +Requires: %{name}-c++ = %{version}-%{release} + +%description c++-devel +Libftdi library C++ binding development headers and libraries +for building C++ applications with libftdi. + + +%prep +%autosetup -p1 -n %{name}1-%{version} + +# switch to uaccess control +sed -i -e 's/GROUP="plugdev"/TAG+="uaccess"/g' packages/99-libftdi.rules + + +%build +export CMAKE_PREFIX_PATH=/usr + +mkdir build-py3 && pushd build-py3 +%{cmake} -DPython_ADDITIONAL_VERSIONS=%{python3_version} .. +%make_build %{?_smp_mflags} +popd + +# Fix python sheband lines +find python/examples -type f -exec sed -i '1s=^#!/usr/bin/\(python\|env python\)[23]\?=#!%{__python3}=' {} + + + +%install +pushd build-py3 +%make_install +popd + +mkdir -p %{buildroot}/lib/udev/rules.d/ +install -pm 0644 packages/99-libftdi.rules %{buildroot}/lib/udev/rules.d/69-libftdi.rules + +find %{buildroot} -type f -name "*.la" -delete +find %{buildroot} -type f -name "*.a" -delete + +#no man install +mkdir -p %{buildroot}%{_mandir}/man3 +install -pm 0644 build-py3/doc/man/man3/*.3 %{buildroot}%{_mandir}/man3 + +# Cleanup examples +rm -f %{buildroot}%{_bindir}/simple +rm -f %{buildroot}%{_bindir}/bitbang +rm -f %{buildroot}%{_bindir}/bitbang2 +rm -f %{buildroot}%{_bindir}/bitbang_ft2232 +rm -f %{buildroot}%{_bindir}/bitbang_cbus +rm -f %{buildroot}%{_bindir}/find_all +rm -f %{buildroot}%{_bindir}/find_all_pp +rm -f %{buildroot}%{_bindir}/baud_test +rm -f %{buildroot}%{_bindir}/serial_read +rm -f %{buildroot}%{_bindir}/serial_test +rm -rf %{buildroot}%{_libdir}/cmake* + +rm -rf %{buildroot}%{_datadir}/doc/libftdi1/example.conf + + +%check +#make check + + +%files +%license COPYING.LIB +%doc AUTHORS ChangeLog README +%{_libdir}/libftdi1.so.2* +/lib/udev/rules.d/69-libftdi.rules + +%files devel +%doc build-py3/doc/html +%doc %{_datadir}/libftdi/examples +%{_bindir}/ftdi_eeprom +%{_bindir}/libftdi1-config +%{_libdir}/libftdi1.so +%{_includedir}/libftdi1 +%{_libdir}/pkgconfig/libftdi1.pc +%{_mandir}/man3/* + +%files -n python3-libftdi +%{python3_sitearch}/* + +%files c++ +%{_libdir}/libftdipp1.so.2* +%{_libdir}/libftdipp1.so.3 + +%files c++-devel +%{_libdir}/libftdipp1.so +%{_includedir}/libftdi1/*hpp +%{_libdir}/pkgconfig/libftdipp1.pc + +%ldconfig_scriptlets + +%ldconfig_scriptlets c++ + + +%changelog +* Mon Sep 09 2019 Dan Horák - 1.4-1 +- Update to 1.4 + +* Mon Aug 19 2019 Miro Hrončok - 1.3-18 +- Rebuilt for Python 3.8 + +* Thu Jul 25 2019 Fedora Release Engineering - 1.3-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Feb 26 2019 Richard Shaw - 1.3-16 +- Rebuild to drop python2 subpackage per RHBZ#1634583. + +* Sun Feb 17 2019 Richard Shaw - 1.3-1 +- Add patch to deal with change in CMake/SWIG behavior. + +* Fri Feb 01 2019 Fedora Release Engineering - 1.3-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1.3-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.3-12 +- Rebuilt for Python 3.7 +- Temporarily disable doxygen docs to workaround FTBFS + +* Wed Feb 07 2018 Fedora Release Engineering - 1.3-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Oct 09 2017 Troy Curtis, Jr - 1.3-10 +- Add python3 subpackage. +- Drop patch0 in favor of built-in cmake config methods. +- Don't include bytecompiled files for the example python scripts. + +* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek - 1.3-9 +- Add Provides for the old name without %%_isa + +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 1.3-8 +- Python 2 binary package renamed to python2-libftdi + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Wed Jul 26 2017 Fedora Release Engineering - 1.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jul 03 2017 Jonathan Wakely - 1.3-6 +- Rebuilt for Boost 1.64 + +* Thu May 25 2017 Gwyn Ciesla 1.3-5 +- libconfuse rebuild. + +* Fri Feb 10 2017 Fedora Release Engineering - 1.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Jan 27 2017 Jonathan Wakely - 1.3-3 +- Rebuilt for Boost 1.63 + +* Tue Jul 19 2016 Fedora Release Engineering - 1.3-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Tue Jun 14 2016 Jon Ciesla 1.3-1 +- 1.3, libconfuse rebuild. + +* Thu Feb 04 2016 Fedora Release Engineering - 1.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 15 2016 Jonathan Wakely - 1.2-7 +- Rebuilt for Boost 1.60 + +* Thu Aug 27 2015 Jonathan Wakely - 1.2-6 +- Rebuilt for Boost 1.59 + +* Wed Jul 29 2015 Fedora Release Engineering - 1.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 + +* Wed Jul 22 2015 David Tardon - 1.2-4 +- rebuild for Boost 1.58 + +* Wed Jun 17 2015 Fedora Release Engineering - 1.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 1.2-2 +- Rebuilt for GCC 5 C++11 ABI change + +* Sun Feb 8 2015 Peter Robinson 1.2-1 +- Update to 1.2 +- Use %%license + +* Tue Jan 27 2015 Petr Machata - 1.1-5 +- Rebuild for boost 1.57.0 + +* Sun Aug 17 2014 Fedora Release Engineering - 1.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 23 2014 Petr Machata - 1.1-2 +- Rebuild for boost 1.55.0 + +* Mon Mar 24 2014 Peter Robinson 1.1-1 +- Update to 1.1 +- Build against libusb1 +- Package cleanup +- Run make check + +* Sat Aug 03 2013 Fedora Release Engineering - 0.20-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 30 2013 Petr Machata - 0.20-4 +- Rebuild for boost 1.54.0 + +* Thu Feb 14 2013 Fedora Release Engineering - 0.20-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 0.20-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri May 04 2012 Lucian Langa - 0.20-1 +- new upstream release + +* Fri Jan 13 2012 Fedora Release Engineering - 0.19-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Nov 25 2011 Lucian Langa - 0.19-2 +- fix bug #678781 - too generic name in man file + +* Sat Jun 18 2011 Lucian Langa - 0.19-1 +- new upstream release + +* Tue May 24 2011 Lucian Langa - 0.19-1 +- new upstream release + +* Mon Feb 07 2011 Fedora Release Engineering - 0.18-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Dec 06 2010 Dan Horák - 0.18-4 +- fix build with libusb >= 1:0.1.3 (wrapper around libusb1) + +* Sun Aug 1 2010 Thomas Spura - 0.18-3 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Wed Jul 21 2010 David Malcolm - 0.18-2 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Thu Jul 01 2010 Lucian Langa - 0.18-1 +- drop patch0 - fixed upstream +- new upstream release + +* Wed Jun 09 2010 Lucian Langa - 0.17-5 +- readd mistakenly dropped parch (fixes multilib issues) + +* Wed May 05 2010 Lucian Langa - 0.17-4 +- fix typo in group handling (#581151) + +* Thu Mar 11 2010 Lucian Langa - 0.17-3 +- fix incorrect UDEV rule (#563566) + +* Sat Jan 16 2010 Lucian Langa - 0.17-2 +- do not package static libfiles (#556068) + +* Sun Jan 3 2010 Lucian Langa - 0.17-1 +- add patch to fix typo in python bindings +- drop multilib patch0 fixed upstream +- new upstream release + +* Sat Aug 22 2009 Lucian Langa - 0.16-7 +- add group for udev rule (#517773) + +* Fri Jul 31 2009 Lucian Langa - 0.16-6 +- rebuilt with modified patch + +* Fri Jul 31 2009 Lucian Langa - 0.16-5 +- fix multilib conflict in libftdi-config (#508498) + +* Fri Jul 24 2009 Fedora Release Engineering - 0.16-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jul 01 2009 Lucian Langa - 0.16-3 +- added udev rules +- addedd c++, python bindings + +* Tue Jun 30 2009 Lucian Langa - 0.16-2 +- fix doxygen conflict (#508498) + +* Fri May 08 2009 Lucian Langa - 0.16-1 +- new upstream release + +* Wed Feb 25 2009 Fedora Release Engineering - 0.15-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Feb 16 2009 Lucian Langa - 0.15-3 +- fix tag + +* Sun Feb 15 2009 Lucian Langa - 0.15-2 +- add new BR boost-devel + +* Sun Feb 15 2009 Lucian Langa - 0.15-1 +- fix for bug #485600: pick libusb-devel for -devel subpackage +- new upstream release + +* Fri Sep 26 2008 Lucian Langa - 0.14-2 +- require pkgconfig for devel + +* Tue Sep 23 2008 Lucian Langa - 0.14-1 +- new upstream + +* Wed Sep 03 2008 Lucian Langa - 0.13-1 +- initial specfile diff --git a/sources b/sources index e69de29..82d8085 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (libftdi1-1.4.tar.bz2) = dbab74f7bc35ca835b9c6dd5b70a64816948d65da1f73a9ece37a0f0f630bd0df1a676543acc517b02a718bc34ba4f7a30cbc48b6eed1c154c917f8ef0a358fc