File libuca.spec of Package libuca

Summary:	GLib framework for unified detector handling
Name:		libuca
Version:	2.0.0
Release:	1
License:	LGPL-3.0
Group:		System/Libraries
URL:		https://github.com/ufo-kit/libuca
Source: 	https://github.com/ufo-kit/libuca/archive/v%{version}.tar.gz
BuildRequires: 	cmake
BuildRequires: 	gcc-c++
BuildRequires: 	gobject-introspection-devel

%description
This directory contains libuca (short for Unified Camera access), a GLib-based
library to access two-dimensional pixel detectors. It gives the user a general
interface to a variety of different cameras and camera types. You can read more
about it in our [manual](http://ufo.kit.edu/extra/libuca/manual/manual.html).

%package -n uca-tools
Summary: 	Basic tools to work with libuca
Group: 		System/Management
BuildRequires: 	glib2-devel
BuildRequires: 	gtk2-devel
Requires: 	libuca = %version

%description -n uca-tools
This package provides basic tools to acquire and view frames taken with
libuca-based cameras.

%package devel
Summary:	Development files of libuca
Group:		Development/Libraries/C and C++
Requires:	libuca = %version

%description devel
This package provides the files needed to build libuca client applications.

%prep
%setup -q

%build
export CFLAGS="$RPM_OPT_FLAGS"
cmake . -DPREFIX=%_prefix -DLIBDIR=%_libdir -DCMAKE_BUILD_TYPE:STRING=Release
make

%install
rm -rf %{buildroot}
%make_install

%post
ldconfig

%postun
ldconfig

%clean
rm -rf %{buildroot}

%files
%defattr(-, root, root)
%{_libdir}/libuca.so.*
%{_libdir}/uca
%{_libdir}/girepository-1.0/*.typelib
%{_datadir}/libuca

%files -n uca-tools
%defattr(-, root, root)
%{_bindir}/uca-benchmark
%{_bindir}/uca-camera-control
%{_bindir}/uca-gen-doc
%{_bindir}/uca-grab

%files devel
%defattr(-, root, root)
%doc NEWS COPYING
%{_libdir}/libuca.so
%{_libdir}/pkgconfig/libuca.pc
%{_datadir}/gir-1.0/*.gir
%{_includedir}/uca

%changelog