First shot at fixing the .spec file
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 27 Dec 2012 16:30:01 +0000 (17:30 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 27 Dec 2012 16:30:01 +0000 (17:30 +0100)
libftdi1.spec.in

index 8c06b09..e5ca1b6 100644 (file)
@@ -5,7 +5,7 @@ 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
@@ -28,14 +28,17 @@ Header files and static libraries for libftdi1
 
 %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,6 +59,7 @@ 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)
@@ -64,4 +68,5 @@ rm -fr $RPM_BUILD_ROOT
 %{prefix}/include/libftdi1/*.h
 %{prefix}/include/libftdi1/*.hpp
 %{_libdir}/libftdi1*.*a
+%{_libdir}/libftdipp1*.*a
 %{_libdir}/pkgconfig/*.pc