# Define boolean to quickly set option and dependencies for # building QT5 client %global build_qt5_client 1 # Define boolean to quickly set option and dependencies for # building with websocket support %global build_websocket 1 # Define boolean to quickly set option and dependencies for # unit tests %global build_tests 1 Name: libindi Version: 2.0.0 Release: %autorelease Summary: Instrument Neutral Distributed Interface License: GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later and BSD-3-Clause # See COPYRIGHT file for a description of the licenses and files covered URL: http://www.indilib.org Source0: https://github.com/indilib/indi/archive/v%{version}/indi-%{version}.tar.gz BuildRequires: cmake BuildRequires: libev-devel BuildRequires: libogg-devel BuildRequires: libnova-devel BuildRequires: libtheora-devel BuildRequires: systemd BuildRequires: pkgconfig(cfitsio) BuildRequires: pkgconfig(fftw3) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(gsl) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libusb-1.0) BuildRequires: pkgconfig(zlib) %if 0%{?build_qt5_client} BuildRequires: pkgconfig(Qt5Network) %global qt5_client ON %else %global qt5_client OFF %endif %if 0%{?build_websocket} BuildRequires: boost-devel BuildRequires: websocketpp-devel %global websocket ON %else %global websocket OFF %endif %if 0%{?build_tests} BuildRequires: pkgconfig(gtest) BuildRequires: pkgconfig(gmock) %global tests ON %else %global tests OFF %endif Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description INDI is a distributed control protocol designed to operate astronomical instrumentation. INDI is small, flexible, easy to parse, and scalable. It supports common DCS functions such as remote control, data acquisition, monitoring, and a lot more. %package devel Summary: Libraries, includes, etc. used to develop an application with %{name} Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-static%{?_isa} = %{version}-%{release} %description devel These are the header files needed to develop a %{name} application %package libs Summary: INDI shared libraries %description libs These are the shared libraries of INDI. %package static Summary: Static libraries, includes, etc. used to develop an application with %{name} Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description static Static library needed to develop a %{name} application %prep %autosetup -p1 -n indi-%{version} # For Fedora we want to put udev rules in %%{_udevrulesdir} sed -i 's|/lib/udev/rules.d|%{_udevrulesdir}|g' CMakeLists.txt chmod -x drivers/telescope/pmc8driver.h chmod -x drivers/telescope/pmc8driver.cpp %build %cmake \ -DINDI_BUILD_QT5_CLIENT="%{qt5_client}" \ -DINDI_BUILD_UNITTESTS="%{tests}" \ -DINDI_BUILD_WEBSOCKET="%{websocket}" %cmake_build %install %cmake_install %check %if 0%{?build_tests} %ctest --test-dir %_vpath_builddir/test %endif %files %license COPYING.BSD COPYING.GPL COPYING.LGPL COPYRIGHT LICENSE %doc AUTHORS ChangeLog NEWS README %{_bindir}/indi_* %{_bindir}/indiserver %{_bindir}/shelyak_usis %{_datadir}/indi %{_udevrulesdir}/80-dbk21-camera.rules %{_udevrulesdir}/99-indi_auxiliary.rules %files libs %license COPYING.BSD COPYING.GPL COPYING.LGPL COPYRIGHT LICENSE %{_libdir}/%{name}*.so.2 %{_libdir}/%{name}*.so.2.* %{_libdir}/indi/MathPlugins %files devel %{_includedir}/%{name} %{_libdir}/%{name}*.so %{_libdir}/pkgconfig/%{name}.pc %files static %{_libdir}/%{name}*.a %changelog %autochangelog