summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libnifalcon-boost.patch29
-rw-r--r--libnifalcon-link.patch11
-rw-r--r--libnifalcon.spec27
3 files changed, 28 insertions, 39 deletions
diff --git a/libnifalcon-boost.patch b/libnifalcon-boost.patch
deleted file mode 100644
index 9771097..0000000
--- a/libnifalcon-boost.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- libnifalcon-1.0.2/CMakeLists.txt.orig 2010-11-27 05:42:07.000000000 +0100
-+++ libnifalcon-1.0.2/CMakeLists.txt 2014-12-31 15:20:50.459408548 +0100
-@@ -81,14 +81,13 @@
-
- #Find boost, used all over the place
- SET(Boost_USE_MULTITHREADED ON)
--SET(Boost_USE_STATIC_LIBS ON)
-
- FIND_PACKAGE(Boost REQUIRED)
- IF(NOT Boost_FOUND)
- MESSAGE(FATAL_ERROR "libnifalcon requires a minimum of the Boost 1.33 headers to build")
- ENDIF(NOT Boost_FOUND)
-
--FIND_PACKAGE(Boost COMPONENTS program_options thread)
-+FIND_PACKAGE(Boost COMPONENTS program_options thread system)
-
- ######################################################################################
- # Project specific globals
---- libnifalcon-1.0.2/examples/CMakeLists.txt.orig 2010-11-27 05:42:07.000000000 +0100
-+++ libnifalcon-1.0.2/examples/CMakeLists.txt 2014-12-31 15:58:29.952647059 +0100
-@@ -128,7 +128,7 @@
- IF(X11_FOUND AND X11_XTest_LIB)
- INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR})
- SET(MOUSE_SRCS falcon_mouse/falcon_mouse.cpp falcon_mouse/falcon_mouse_x11.cpp)
-- SET(MOUSE_LINK_LIBS ${LIBNIFALCON_EXE_PO_LINK_LIBS} ${X11_LIBRARIES} ${X11_XTest_LIB})
-+ SET(MOUSE_LINK_LIBS ${LIBNIFALCON_EXE_PO_LINK_LIBS} ${X11_LIBRARIES} ${X11_XTest_LIB} boost_system)
- ELSE(X11_FOUND AND X11_XTest_LIB)
- MESSAGE(STATUS "Not compiling falcon_mouse example - X11 compiling requires the XTest library")
- ENDIF(X11_FOUND AND X11_XTest_LIB)
diff --git a/libnifalcon-link.patch b/libnifalcon-link.patch
new file mode 100644
index 0000000..fd75513
--- /dev/null
+++ b/libnifalcon-link.patch
@@ -0,0 +1,11 @@
+--- libnifalcon-1.1/src/util/CMakeLists.txt.orig 2016-07-04 23:07:21.000000000 +0200
++++ libnifalcon-1.1/src/util/CMakeLists.txt 2019-04-27 09:37:13.738152081 +0200
+@@ -29,7 +29,7 @@
+ NAME nifalcon_device_thread
+ SOURCES "${SRCS}"
+ CXX_FLAGS FALSE
+- LINK_LIBS "${CPP_LINK_LIBS}"
++ LINK_LIBS ${CPP_LINK_LIBS} -lpthread
+ LINK_FLAGS FALSE
+ DEPENDS nifalcon
+ SHOULD_INSTALL TRUE
diff --git a/libnifalcon.spec b/libnifalcon.spec
index 5068143..f8faded 100644
--- a/libnifalcon.spec
+++ b/libnifalcon.spec
@@ -6,18 +6,19 @@
Summary: Open Source Driver for the Novint Falcon Haptic Controller
Summary(pl.UTF-8): Sterownik z otwartymi źródłami dla kontrolerów haptycznych Novint Falcon
Name: libnifalcon
-Version: 1.0.2
-Release: 12
+Version: 1.1
+Release: 1
License: BSD
Group: Libraries
-# for new releases see https://github.com/qdot/libnifalcon
-Source0: http://downloads.sourceforge.net/libnifalcon/%{name}-%{version}.tar.gz
-# Source0-md5: d2d226dad44ad2c98343cca5523e9f16
-Patch0: %{name}-boost.patch
+#Source0Download: https://github.com/qdot/libnifalcon/releases
+Source0: https://github.com/qdot/libnifalcon/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 3723b16749ddfa13fb6ddd1a8a95d58c
+Patch0: %{name}-link.patch
URL: https://github.com/qdot/libnifalcon
BuildRequires: boost-devel
BuildRequires: cmake >= 2.6.0
%{?with_apidocs:BuildRequires: doxygen}
+BuildRequires: libstdc++-devel
BuildRequires: libusb-devel >= 1.0
BuildRequires: pkgconfig
BuildRequires: xorg-lib-libX11-devel
@@ -119,8 +120,14 @@ cd build
%{__make} -j1
+%if %{with apidocs}
+cd ../doc
+doxygen
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
+
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
@@ -154,13 +161,13 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/findfalcons_multi
%attr(755,root,root) %{_libdir}/libnifalcon.so.*.*.*
%attr(755,root,root) %{_libdir}/libnifalcon_cli_base.so.*.*.*
-%attr(755,root,root) %{_libdir}/libnifalcon_device_boost_thread.so.*.*.*
+%attr(755,root,root) %{_libdir}/libnifalcon_device_thread.so.*.*.*
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libnifalcon.so
%attr(755,root,root) %{_libdir}/libnifalcon_cli_base.so
-%attr(755,root,root) %{_libdir}/libnifalcon_device_boost_thread.so
+%attr(755,root,root) %{_libdir}/libnifalcon_device_thread.so
%{_includedir}/falcon
%{_pkgconfigdir}/libnifalcon.pc
@@ -168,12 +175,12 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%{_libdir}/libnifalcon.a
%{_libdir}/libnifalcon_cli_base.a
-%{_libdir}/libnifalcon_device_boost_thread.a
+%{_libdir}/libnifalcon_device_thread.a
%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
-%doc doc/html/*
+%doc doc/html/* doc/*.asciidoc
%endif
%if %{with swig}