- added udev rules

- addedd c++, python bindings
This commit is contained in:
Lucian Langa 2009-07-01 09:03:17 +00:00
parent b5819939fe
commit 805952e13d
2 changed files with 74 additions and 10 deletions

View File

@ -1,16 +1,18 @@
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Name: libftdi Name: libftdi
Version: 0.16 Version: 0.16
Release: 1%{?dist} Release: 3%{?dist}
Summary: Library to program and control the FTDI USB controller Summary: Library to program and control the FTDI USB controller
Group: System Environment/Libraries Group: System Environment/Libraries
License: LGPLv2 License: LGPLv2
URL: http://www.intra2net.com/de/produkte/opensource/ftdi/ URL: http://www.intra2net.com/de/produkte/opensource/ftdi/
Source0: http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/%{name}-%{version}.tar.gz Source0: http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/%{name}-%{version}.tar.gz
Source1: no_date_footer.html
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libusb-devel, doxygen, boost-devel BuildRequires: libusb-devel, doxygen, boost-devel, python-devel, swig
Requires: pkgconfig Requires: pkgconfig, udev
%package devel %package devel
Summary: Header files and static libraries for libftdi Summary: Header files and static libraries for libftdi
@ -18,6 +20,22 @@ Group: Development/Libraries
Requires: libftdi = %{version}-%{release} Requires: libftdi = %{version}-%{release}
Requires: libusb-devel Requires: libusb-devel
%package python
Summary: Libftdi library Python binding
Group: Development/Libraries
Requires: libftdi = %{version}-%{release}
%package c++
Summary: Libftdi library C++ binding
Group: Development/Libraries
Requires: libftdi = %{version}-%{release}
%package c++-devel
Summary: Libftdi library C++ binding development headers and libraries
Group: Development/Libraries
Requires: libftdi-devel = %{version}-%{release}, libftdi-c++ = %{version}-%{release}
%description %description
A library (using libusb) to talk to FTDI's FT2232C, A library (using libusb) to talk to FTDI's FT2232C,
FT232BM and FT245BM type chips including the popular bitbang mode. FT232BM and FT245BM type chips including the popular bitbang mode.
@ -25,13 +43,25 @@ FT232BM and FT245BM type chips including the popular bitbang mode.
%description devel %description devel
Header files and static libraries for libftdi Header files and static libraries for libftdi
%description python
Libftdi Python Language bindings.
%description c++
Libftdi library C++ language binding.
%description c++-devel
Libftdi library C++ binding development headers and libraries
for building C++ applications with libftdi.
%prep %prep
%setup -q %setup -q
sed -i -e 's/HTML_FOOTER =/HTML_FOOTER = no_date_footer.html/g' doc/Doxyfile.in
%build %build
%configure %configure --enable-python-binding --enable-libftdipp
cp %{SOURCE1} %{_builddir}/%{name}-%{version}/doc
make %{?_smp_mflags} make %{?_smp_mflags}
@ -42,6 +72,8 @@ find %{buildroot} -name \*\.la -print | xargs rm -f
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3
#no man install #no man install
install -p -m 644 doc/man/man3/*.3 $RPM_BUILD_ROOT%{_mandir}/man3 install -p -m 644 doc/man/man3/*.3 $RPM_BUILD_ROOT%{_mandir}/man3
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
install -p -m 644 packages/99-libftdi.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
# Cleanup examples # Cleanup examples
@ -59,26 +91,51 @@ rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING.LIB README %doc AUTHORS ChangeLog COPYING.LIB README
%{_libdir}/*.so.* %{_libdir}/libftdi.so.*
%config(noreplace) %{_sysconfdir}/udev/rules.d/99-libftdi.rules
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc doc/html %doc doc/html
%{_bindir}/libftdi-config %{_bindir}/libftdi-config
%{_libdir}/libftdi.a %{_libdir}/libftdi.a
%{_libdir}/libftdipp.a %{_libdir}/libftdi.so
%{_libdir}/*.so
%{_includedir}/*.h %{_includedir}/*.h
%{_includedir}/*.hpp %{_libdir}/pkgconfig/libftdi.pc
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man3/* %{_mandir}/man3/*
%files python
%defattr(-, root, root, -)
%{python_sitearch}/*
%files c++
%defattr(-, root, root, -)
%doc AUTHORS ChangeLog COPYING.LIB README
%{_libdir}/libftdipp.so.*
%files c++-devel
%defattr(-, root, root, -)
%doc doc/html
%{_libdir}/libftdipp.a
%{_libdir}/libftdipp.so
%{_includedir}/*.hpp
%{_libdir}/pkgconfig/libftdipp.pc
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%post c++ -p /sbin/ldconfig
%postun c++ -p /sbin/ldconfig
%changelog %changelog
* Wed Jul 01 2009 Lucian Langa <cooly@gnome.eu.org> - 0.16-3
- added udev rules
- addedd c++, python bindings
* Tue Jun 30 2009 Lucian Langa <cooly@gnome.eu.org> - 0.16-2
- fix doxygen conflict (#508498)
* Fri May 08 2009 Lucian Langa <cooly@gnome.eu.org> - 0.16-1 * Fri May 08 2009 Lucian Langa <cooly@gnome.eu.org> - 0.16-1
- new upstream release - new upstream release

7
no_date_footer.html Normal file
View File

@ -0,0 +1,7 @@
<hr size="1"><address style="text-align: right;"><small>
Generated for $projectname by <a href="http://www.doxygen.org/
index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a>
$doxygenversion</small></address>
</body>
</html>