#
# spec file for package libraw1394
#
# Copyright (c) 2015 SUSE LINUX 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/
#


Name:           libraw1394
Version:        2.1.1
Release:        1.9
Summary:        A Firewire Interface library
License:        LGPL-2.1+
Group:          Development/Libraries/C and C++
Url:            http://www.dennedy.org/libraw1394/

#Git-Web:	https://git.kernel.org/cgit/libs/ieee1394/libraw1394.git/
#Git-Clone:	git://git.kernel.org/pub/scm/libs/ieee1394/libraw1394
Source:         https://www.kernel.org/pub/linux/libs/ieee1394/%name-%version.tar.xz
Source2:        https://www.kernel.org/pub/linux/libs/ieee1394/%name-%version.tar.sign
Source3:        %name.keyring
Source4:        baselibs.conf
Patch0:         libraw1394.no-isodump.patch
Patch1:         libraw1394-exports.patch
BuildRequires:  libtool
BuildRequires:  openjade-devel
BuildRequires:  pkg-config
BuildRequires:  xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
libraw1394 provides direct access to the connected 1394 buses to
userspace. Through this library, applications can directly send to
and receive from other nodes without requiring a kernel driver for
the protocol in question.

%package 11
Summary:        A Firewire Interface library
Group:          System/Libraries

%description 11
libraw1394 provides direct access to the connected 1394 buses to
userspace. Through this library, applications can directly send to
and receive from other nodes without requiring a kernel driver for
the protocol in question.

libraw1394 abstracts the interface that is used to communicate with
the kernel. It works with both the Juju stack (firewire-core.ko;
/dev/fw*; present since Linux kernel 2.6.22) and the old Linux1394
(raw1394.ko; /dev/raw1394; present until 2.6.36).

%package devel
Summary:        Development files for libraw1394
Group:          Development/Libraries/C and C++
Summary(pt_BR): Arquivos de desenvolvimento e cabeçalhos para o libraw1394
Requires:       %{name}-11 = %{version}
Requires:       glibc-devel

%description devel
libraw1394 provides direct access to the connected 1394 buses to
userspace. Through this library, applications can directly send to
and receive from other nodes without requiring a kernel driver for
the protocol in question.

This subpackage contains the library links and headers for
libraw1394.

%package tools
Summary:        Command-line utilties to manipulate IEEE1394 devices
Group:          Hardware/Other
# added on 2015-11-14
Obsoletes:      %name < %version-%release
Provides:       %name = %version-%release

%description tools
Command-line utilities to inspect and send IEEE 1394 isochronous
packets, and to test the basic functionality of raw1394.

%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
autoreconf --force --install
%configure --disable-static
make %{?_smp_mflags} all

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
# empty dependency libs
rm -f %{buildroot}%{_libdir}/libraw1394.la

%post 11 -p /sbin/ldconfig

%postun 11 -p /sbin/ldconfig

%files tools
%defattr(-,root,root)
%doc AUTHORS COPYING* NEWS README
%{_bindir}/testlibraw
%{_bindir}/dumpiso
%{_bindir}/sendiso
%{_mandir}/man1/*

%files 11
%defattr(-,root,root)
%{_libdir}/libraw1394.so.11*

%files devel
%defattr(-,root,root)
%{_includedir}/libraw1394
%{_libdir}/libraw1394.so
%{_libdir}/pkgconfig/libraw1394.pc

%changelog
* Sat Nov 14 2015 jengelh@inai.de
- Update to new upstream release 2.2.1
  * Align fw_handle buffer for 64-bit access
  * Prevent requests for previously provided ISO TX packets
  * Save and restore errno in raw1394_new_handle{,_on_port} for
  legacy applications
- Store and use gpg key to verify. Trim description and update it
  for the contemporary Firewire stack.
- Make libraw1394-exports.patch simpler by avoiding ^- lines.
- Drop redundant --with-pic; it is only used for static libs (which
  we do not build), and always on anyway for shared libraires.
- Name the utility package -tools as with many other pkgs.
- Remove non-library packages from baselibs.conf.
* Sat Mar 21 2015 mpluskal@suse.com
- Cleanup spec file with spec-cleaner
- Remove obsolete ppc provides/obsoletes
* Thu Sep  4 2014 crrodriguez@opensuse.org
- libraw1394-exports.patch: Only symbols prefixed with
  raw1394_ are part of the public API, everything else
  is private.
* Sat Mar 23 2013 zaitor@opensuse.org
- Update to version 2.1.0:
  + Behavior changes of the backend to firewire-core:
  - The isochronous reception buffer is now mapped read/writable
    rather than read-only.
  - Decrease memory footprint of IR and IT buffers by avoiding
    some internal rounding up of the buffer size.
  + New APIs in <libraw1394/raw1394.h>:
  - raw1394_add_config_rom_descriptor(): Add contents to
    the Configuration ROM of the local node(s). At runtime, this
    API is only available if running on top of firewire-core.
  - raw1394_remove_config_rom_descriptor(): Counterpart to
    raw1394_add_config_rom_descriptor().
  - raw1394_read_cycle_timer_and_clock(): Like the existing
    raw1394_read_cycle_timer(), but lets the caller choose
    between CLOCK_REALTIME, CLOCK_MONOTONIC, or
    CLOCK_MONOTONIC_RAW.
  - raw1394_get_speed(): Returns the speed code of the maximum
    possible transmission speed between a given node and the
    local node.
  - enum raw1394_iso_speed was extended by RAW1394_ISO_SPEED_800,
    _1600, and _3200.
  + New APIs in <libraw1394/ieee1394.h>: Added preprocessor
    constants L1394_SPEED_BETA, L1394_SPEED_800, _1600, and _3200.
  + testlibraw1394: Added unit tests of the new APIs.
- Changes from version 2.0.9:
  + Fix that raw1394_iso_recv_flush() did not have any effect when
    running on firewire-core alias juju kernel drivers.
    This fix needs kernel 3.4 or later at runtime.
  + Remove build-time dependency on linux-headers.
  + Remove --with-fw-dir configure switch which is no longer useful
  + Janitorial fixes.
- Changes from version 2.0.8:
  + Performance improvement: Configuration ROM access via
    raw1394_read() is dramatically faster and very robust now.
  + Interoperability fix: Internally retry
    raw1394_read/write/lock/lock64() after ack-busy response.
  + Small bug fixes.
* Tue Jul 26 2011 aj@suse.de
- Update to version 2.0.7:
  * Fixes playback to some audio devices based on the DICE chipset.
  * Several fixes for using libraw1394 on top of the firewire-core
    kernel driver (as opposed to raw1394 which was removed in kernel
    2.6.37).
* Sat Oct 16 2010 jslaby@suse.de
- convert Summary(pt_BR) to UTF-8
* Thu Sep 30 2010 davejplater@gmail.com
- Update to version 2.0.5
- See https://ieee1394.wiki.kernel.org/index.php/Release_Notes_-_Libraries
  for changes since 1.3.0
- Upstream urls changed as http://www.linux1394.org/ is up for sale
  and no longer in use.
- Removed patch libraw1394.eventloop-return.patch, already integrated.
- Removed mpg1394grab.patch and mpg1394grab-beautify.patch as the upstream
  maintainer says that streaming video support is now integrated.
* Sat Apr 24 2010 coolo@novell.com
- buildrequire pkg-config to provide the correct symbols
* Fri Dec 18 2009 jengelh@medozas.de
- add baselibs.conf as a source
* Wed Jan  7 2009 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Wed Jun 25 2008 olh@suse.de
- eventloop.c: fix to retry read when failed with EINTR.
* Wed May 21 2008 cthiel@suse.de
- fix baselibs.conf
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Tue Mar 18 2008 crrodriguez@suse.de
- remove pointless libtool archive with empty dependency_libs
- remove static libraries
- update to version 1.3.0
  * added raw1394_read_cycle_timer() as used by FFADO project.
  * added support for environment variable RAW1394DEV to override default device node /dev/raw1394.
  * added --with-valgrind to configure script. other optimizations and bugfixes - see ChangeLog.
* Sat Aug  4 2007 olh@suse.de
- remove isodump.5 man page
  split libraw1394-8 package which contains only libraries
* Mon Jan 29 2007 olh@suse.de
- add mpg1394grab (#236537)
* Tue Jul 18 2006 olh@suse.de
- update to version 1.2.1
  generate compiler warnings on deprecated functions (legacy isochronous).
  bugfixes and optimizations.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Jul  1 2005 olh@suse.de
- update to version 1.2.0
  add bugfix stalling on iso transmission underflow
* Tue Jan 11 2005 olh@suse.de
- update to version 1.1.0
* Mon Mar  8 2004 lmuelle@suse.de
- update to version 0.10.1
* Fri Feb 20 2004 kkaempf@suse.de
- adapt aclocal definitions to automake 1.8.x (#34793)
* Sun Jan 11 2004 adrian@suse.de
- add %%run_ldconfig
* Mon Jan 27 2003 kukuk@suse.de
- Move .so symlinks into -devel package [Bug #22382]
* Sun Jan 12 2003 aj@suse.de
- Fix multiline strings.
* Wed Jun 19 2002 ro@suse.de
- run autoreconf
* Thu Jun  6 2002 bk@suse.de
- fix defattr properly(for perms of includedir, mandir, docdir)
- never ever include %%{_mandir}/* (dirs!) into package filelist
- fix rpm license tag to LGPL and add URL tag und use optflags
* Tue May 28 2002 lmuelle@suse.de
- fixed directory permissions of includedir
* Tue Feb 26 2002 kraxel@suse.de
- added automake m4 file to devel package file list
- fixed s390x build failure
* Fri Sep 21 2001 bjacke@suse.de
- initial build: version 0.9.0