libindi/libindi.spec

147 lines
3.5 KiB
RPMSpec
Raw Normal View History

2021-05-13 11:29:28 +00:00
# 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
2021-05-13 11:29:28 +00:00
# Define boolean to quickly set option and dependencies for
# unit tests
2022-01-06 16:09:20 +00:00
%global build_tests 1
2021-05-13 11:29:28 +00:00
2022-02-05 14:34:57 +00:00
Name: libindi
Version: 2.0.0
2022-05-24 10:00:48 +00:00
Release: %autorelease
2022-02-05 14:34:57 +00:00
Summary: Instrument Neutral Distributed Interface
2009-02-09 15:58:11 +00:00
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
2009-02-09 15:58:11 +00:00
2022-02-05 14:34:57 +00:00
URL: http://www.indilib.org
2022-05-24 10:08:26 +00:00
Source0: https://github.com/indilib/indi/archive/v%{version}/indi-%{version}.tar.gz
2009-02-09 15:58:11 +00:00
2017-10-08 07:23:18 +00:00
BuildRequires: cmake
2022-08-06 11:20:35 +00:00
BuildRequires: libev-devel
2022-02-27 12:55:05 +00:00
BuildRequires: libogg-devel
2015-09-07 09:13:23 +00:00
BuildRequires: libnova-devel
2022-02-27 12:55:05 +00:00
BuildRequires: libtheora-devel
2015-09-07 09:13:23 +00:00
BuildRequires: systemd
2017-10-08 07:23:18 +00:00
BuildRequires: pkgconfig(cfitsio)
2021-05-13 11:29:28 +00:00
BuildRequires: pkgconfig(fftw3)
2017-10-08 07:23:18 +00:00
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(gsl)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(zlib)
2009-02-09 15:58:11 +00:00
2021-05-13 11:29:28 +00:00
%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
2021-05-13 11:29:28 +00:00
%if 0%{?build_tests}
BuildRequires: pkgconfig(gtest)
BuildRequires: pkgconfig(gmock)
%global tests ON
%else
%global tests OFF
%endif
2018-01-02 12:16:51 +00:00
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
2009-02-09 15:58:11 +00:00
%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.
2018-01-02 12:16:51 +00:00
2009-02-09 15:58:11 +00:00
%package devel
Summary: Libraries, includes, etc. used to develop an application with %{name}
2018-01-02 12:16:51 +00:00
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
2017-10-07 17:48:53 +00:00
Requires: %{name}-static%{?_isa} = %{version}-%{release}
2009-02-09 15:58:11 +00:00
%description devel
These are the header files needed to develop a %{name} application
2018-01-02 12:16:51 +00:00
%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}
2018-01-02 12:16:51 +00:00
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description static
Static library needed to develop a %{name} application
2009-02-09 15:58:11 +00:00
%prep
2022-05-24 10:08:26 +00:00
%autosetup -p1 -n indi-%{version}
2022-01-06 16:09:20 +00:00
2021-05-13 11:29:28 +00:00
# For Fedora we want to put udev rules in %%{_udevrulesdir}
2015-09-07 09:13:23 +00:00
sed -i 's|/lib/udev/rules.d|%{_udevrulesdir}|g' CMakeLists.txt
chmod -x drivers/telescope/pmc8driver.h
chmod -x drivers/telescope/pmc8driver.cpp
2009-02-09 15:58:11 +00:00
%build
2021-05-13 11:29:28 +00:00
%cmake \
-DINDI_BUILD_QT5_CLIENT="%{qt5_client}" \
-DINDI_BUILD_UNITTESTS="%{tests}" \
-DINDI_BUILD_WEBSOCKET="%{websocket}"
2021-05-13 11:29:28 +00:00
%cmake_build
2009-02-09 15:58:11 +00:00
%install
%cmake_install
2021-05-13 11:29:28 +00:00
%check
%if 0%{?build_tests}
%ctest --test-dir %_vpath_builddir/test
2021-05-13 11:29:28 +00:00
%endif
2009-02-09 15:58:11 +00:00
%files
2015-09-07 09:13:23 +00:00
%license COPYING.BSD COPYING.GPL COPYING.LGPL COPYRIGHT LICENSE
2018-05-26 10:39:08 +00:00
%doc AUTHORS ChangeLog NEWS README
%{_bindir}/indi_*
%{_bindir}/indiserver
%{_bindir}/shelyak_usis
2009-02-09 15:58:11 +00:00
%{_datadir}/indi
%{_udevrulesdir}/80-dbk21-camera.rules
%{_udevrulesdir}/99-indi_auxiliary.rules
2009-02-09 15:58:11 +00:00
2018-01-02 12:16:51 +00:00
%files libs
%license COPYING.BSD COPYING.GPL COPYING.LGPL COPYRIGHT LICENSE
%{_libdir}/%{name}*.so.2
%{_libdir}/%{name}*.so.2.*
2018-01-02 12:16:51 +00:00
%{_libdir}/indi/MathPlugins
2009-02-09 15:58:11 +00:00
%files devel
%{_includedir}/%{name}
%{_libdir}/%{name}*.so
%{_libdir}/pkgconfig/%{name}.pc
%files static
%{_libdir}/%{name}*.a
2009-02-09 15:58:11 +00:00
%changelog
2022-05-24 10:00:48 +00:00
%autochangelog