X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=libftdi1.spec.in;h=c92f071fa5c2e07c41348b5872b2b9f6bad2c41f;hp=c78105be3f04a7128ad735e16b7c4e739beb601a;hb=1383a2c4d1c056f3ac17ee15ed21e9aab03db1cc;hpb=42ece7602ea66377ef2727ab45286c5cb7e9ed52 diff --git a/libftdi1.spec.in b/libftdi1.spec.in index c78105b..c92f071 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@ @@ -5,10 +7,11 @@ Release: 1 License: LGPL for libftdi and GPLv2+linking exception for the C++ wrapper Group: System Environment/Libraries Vendor: Intra2net AG -Source: http://www.intra2net.com/en/developer/libftdi/download/%{name}-%{version}.tar.gz +Source: http://www.intra2net.com/en/developer/libftdi/download/%{name}-%{version}.tar.bz2 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,25 +20,37 @@ 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 %build -PARAMS="" -./configure --prefix=%{prefix} \ - --libdir=%{_libdir} -%endif +mkdir build +cd build -make +export CFLAGS="$RPM_OPT_FLAGS" +export CXXFLAGS="$RPM_OPT_FLAGS" +cmake -DCMAKE_INSTALL_PREFIX="%{prefix}" ../ + +make %{?_smp_mflags} %install +cd build make DESTDIR=$RPM_BUILD_ROOT install # Remove example programs @@ -56,12 +71,20 @@ rm -fr $RPM_BUILD_ROOT %defattr(-,root,root) %doc COPYING.LIB COPYING.GPL LICENSE %{_libdir}/libftdi1*.so* +%{_libdir}/libftdipp1*.so* %files devel %defattr(-,root,root) %doc doc/html doc/man +%{_bindir}/ftdi_eeprom %{_bindir}/libftdi1-config -%{prefix}/include/*.h -%{prefix}/include/*.hpp +%{prefix}/include/libftdi1/*.h +%{prefix}/include/libftdi1/*.hpp %{_libdir}/libftdi1*.*a +%{_libdir}/libftdipp1*.*a %{_libdir}/pkgconfig/*.pc + +%files python +%defattr(-,root,root,-) +%attr(755,root,root) %{python_sitearch}/_ftdi1.so +%{python_sitearch}/ftdi1.py*