Blob Blame History Raw
Name:           CQRlib
Version:        1.1.2
Release:        1%{?dist}
Summary:        ANSI C API for quaternion arithmetic and rotation

Group:          System Environment/Libraries
License:        LGPLv2+
URL:            http://cqrlib.sourceforge.net/
Source0:        http://downloads.sourceforge.net/project/cqrlib/cqrlib/CQRlib-%{version}/CQRlib-%{version}.tar.gz
# to fix /-dynamic/-rdynamic/ issue, reported to upstream
Patch0:         CQRlib-1.0.6-dynamic.patch
# to fix libdir for lib64 architecture
Patch1:         CQRlib-1.0.6-lib64.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  libtool

%description
CQRlib is an ANSI C implementation of a utility library for quaternion
arithmetic and quaternion rotation math.

%package devel
Summary:        Development tools for compiling programs using CQRlib
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description devel
The CQRlib-devel package includes the header and library files for
developing applications that use CQRlib.

%prep
%setup -q

%patch0 -p1 -b .dynamic
%if %{_lib} == lib64
%patch1 -p1 -b .lib64
%endif

%build
make all CFLAGS="%{optflags}" %{?_smp_mflags}

%install
rm -rf %{buildroot}

make install CFLAGS="%{optflags}" INSTALLDIR="%{buildroot}%{_prefix}"

# remove .la and .a files
find %{buildroot} -name '*.la' -exec rm -f {} ';'
find %{buildroot} -name '*.a' -exec rm -f {} ';'

%check
make tests

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc README_CQRlib.html README_CQRlib.txt lgpl.txt
%{_libdir}/libCQRlib.so.*

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

%changelog
* Wed Dec 22 2010 Takanori MATSUURA <t.matsuu@gmail.com> - 1.1.2-1
- update to 1.1.2

* Mon Oct 18 2010 Takanori MATSUURA <t.matsuu@gmail.com> - 1.1.1-2
- use "make all" instead of "make"
- add %%check

* Thu Oct 14  2010 Takanori MATSUURA <t.matsuu@gmail.com> - 1.1.1-1
- initial import (#545045).

* Tue Oct 12 2010 Takanori MATSUURA <t.matsuu@gmail.com> - 1.1.1-0.1
- use %%{_lib} detection to fix W: %%ifarch-applied-patch

* Thu Sep 30 2010 Takanori MATSUURA <t.matsuu@gmail.com> - 1.1.1-0
- update to 1.1.1

* Fri Sep 10 2010 Takanori MATSUURA <t.matsuu@gmail.com> - 1.1-0
- update to 1.1

* Mon Aug 30 2010 Takanori MATSUURA <t.matsuu@gmail.com> - 1.0.6-1
- update to 1.0.6
- provide 64 bit libdir fix as a patch
- provide s/dynamic/rsynamic/g as a patch

* Thu May  6 2010 Takanori MATSUURA <t.matsuu@gmail.com> - 1.0.5-1
- update to 1.0.5

* Wed Dec  9 2009 Takanori MATSUURA <t.matsuu@gmail.com> - 1.0.3-3.20090805
- remove static library

* Tue Dec  8 2009 Takanori MATSUURA <t.matsuu@gmail.com> - 1.0.3-2.20090805
- fit to Fedora Packaging Guidelines
- apply changes pointed at rhbz #545045 comment #1

* Tue Aug 25 2009 Takanori MATSUURA <t.matsuu@gmail.com> - 1.0.3-1.20090805
- update to 1.0.3-5Aug09

* Wed Jul 29 2009 Takanori MATSUURA <t.matsuu@gmail.com> - 1.0.3-1
- initial build