File libfli.spec of Package libfli

#
# spec file for package libfli (Version 1.7)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

%define rlibname libfli1

Name:           libfli
BuildRequires:  cmake gcc-c++
Url:            http://www.flicamera.com
License:        BSD
Group:          Development/Libraries/C and C++
AutoReqProv:    on
Summary:        Library for FLI CCD Camera & Filter Wheels
Version:        1.7
Release:        1
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         %{rlibname}_%{version}.tar.gz

%description
Finger Lakes Instrument library is used by applications to control FLI line of CCDs and Filter wheels

%package -n %{rlibname}

License:        BSD
Group:          Development/Libraries/C and C++
Summary:        Library for FLI CCD Camera & Filter Wheels

%description -n %{rlibname}
Development headers and files for Finger Lakes Instruments library. 

Authors:
--------
    Finger Lakes Instruments <support@flicamera.com>

%package devel
License:        BSD
Group:          Development/Libraries/C and C++
Summary:        Development headers for Finger Lakes Instruments Library
Requires:       libfli1 = %{version}

%description devel
Development headers and files for Finger Lakes Instruments library. 

Authors:
--------
    Finger Lakes Instruments <support@flicamera.com>

%prep
%setup -q -n %{rlibname}-%{version}

%build
# Determine build arch for CMake
%define ARCH_POSTFIX ""
%ifarch amd64 x86_64
%define ARCH_POSTFIX 64
%endif
  cmake . -DCMAKE_INSTALL_PREFIX=/usr -DLIB_POSTFIX=%{ARCH_POSTFIX}
  make %{?jobs:-j %jobs}

%install
  make DESTDIR=$RPM_BUILD_ROOT install  

%post -n %{rlibname} -p /sbin/ldconfig

%postun -n %{rlibname} -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT
rm -rf filelists

%files -n %{rlibname} 
%defattr(-,root,root)
%{_libdir}/libfli.so.*

%files devel
%defattr(-,root,root)
%{_libdir}/libfli.so
%{_includedir}/libfli.h

%changelog
openSUSE Build Service is sponsored by