X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=libftdi1.spec.in;h=4717a84a2859e9425e54e3051aafbbbb678d90c5;hp=e5ca1b646a294110e0b580c2b5d9927139616863;hb=49a41e911a08ce04ad742222e265786a73a71e40;hpb=024705ce0043ee897d3b4871f310d9c82e47ccb0 diff --git a/libftdi1.spec.in b/libftdi1.spec.in index e5ca1b6..4717a84 100644 --- a/libftdi1.spec.in +++ b/libftdi1.spec.in @@ -1,3 +1,5 @@ +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} + Summary: Library to program and control the FTDI USB controller Name: libftdi1 Version: @VERSION@ @@ -9,6 +11,7 @@ Source: http://www.intra2net.com/en/developer/libftdi/download/%{name}-%{vers Buildroot: /tmp/%{name}-%{version}-root Requires: libusb1 BuildRequires: libusb1, libusb1-devel, pkgconfig, doxygen +BuildRequires: swig python-devel Prefix: /usr URL: http://www.intra2net.com/en/developer/libftdi @@ -17,12 +20,21 @@ Summary: Header files and static libraries for libftdi1 Group: Development/Libraries Requires: libftdi1 = %{version}, libusb1-devel +%package python +Summary: Python bindings for libftdi +License: LGPL +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + %description Library to program and control the FTDI USB controller %description devel Header files and static libraries for libftdi1 +%description python +Python bindings for libftdi1 generated by SWIG + %prep %setup -q @@ -52,6 +64,14 @@ rm -f $RPM_BUILD_ROOT/usr/bin/find_all_pp rm -f $RPM_BUILD_ROOT/usr/bin/serial_test rm -f $RPM_BUILD_ROOT/usr/bin/baud_test +# Clean python compiled files in examples dir +find $RPM_BUILD_ROOT%{prefix}/share/libftdi/examples -name "*.pyc" -or -name "*.pyo" -exec rm -f \{\} \; + +# move documentation to version specific directory +# Is there an easy way in cmake to set the DOCDIR? +mkdir -p $RPM_BUILD_ROOT%{prefix}/share/doc/%{name}-%{version} +mv $RPM_BUILD_ROOT%{prefix}/share/doc/%{name}/* $RPM_BUILD_ROOT%{prefix}/share/doc/%{name}-%{version} + %clean rm -fr $RPM_BUILD_ROOT @@ -63,10 +83,18 @@ rm -fr $RPM_BUILD_ROOT %files devel %defattr(-,root,root) -%doc doc/html doc/man +%doc build/doc/html build/doc/man +%{_bindir}/ftdi_eeprom %{_bindir}/libftdi1-config %{prefix}/include/libftdi1/*.h %{prefix}/include/libftdi1/*.hpp +%{prefix}/share/libftdi/examples/* %{_libdir}/libftdi1*.*a %{_libdir}/libftdipp1*.*a %{_libdir}/pkgconfig/*.pc +%{_libdir}/cmake/libftdi1/* + +%files python +%defattr(-,root,root,-) +%attr(755,root,root) %{python_sitearch}/_ftdi1.so +%{python_sitearch}/ftdi1.py*