File libsmraw.spec of Package libsmraw

#
# spec file for package libsmraw
#
# Copyright (c) 2013 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/
#


Name:           libsmraw
%define lname	libsmraw1
%define timestamp 20130402
Version:        0~%timestamp
Release:        0
Summary:        Library and tools to access the (split) RAW image format
License:        LGPL-3.0+
Group:          Productivity/File utilities
Url:            http://code.google.com/p/libsmraw/

#Git-Clone:	http://code.google.com/p/libsmraw
#DL-URL:	https://googledrive.com/host/0B3fBvzttpiiSRml2cndCelp2R3M/libsmraw-alpha-20130402.tar.gz
Source:         %name-alpha-%timestamp.tar.xz
BuildRequires:  pkg-config
BuildRequires:  xz
BuildRequires:  pkgconfig(fuse) >= 2.6
BuildRequires:  pkgconfig(openssl) >= 1.0
#use the factory versions of these if building for factory
%if 0%{?suse_version} > 1230
BuildRequires:  pkgconfig(libcnotify) >= 20120425
BuildRequires:  pkgconfig(libcsplit) >= 20120701
BuildRequires:  pkgconfig(libhmac) >= 20120425
%endif
#  The following packages cause build failures if the internal version is not used
#verified April 2013
#BuildRequires:  pkgconfig(libcerror) >= 20120425
#BuildRequires:  pkgconfig(libbfio) >= 20120426
#BuildRequires:  pkgconfig(libcdata) >= 20120425
#BuildRequires:  pkgconfig(libcpath) >= 20120701
#BuildRequires:  pkgconfig(libcfile) >= 20120526
#BuildRequires:  pkgconfig(libclocale) >= 20120425
#BuildRequires:  pkgconfig(libuna) >= 20120425
#verified 8/2/2013
#  These libs are not released by upstream as packages
#BuildRequires:  pkgconfig(libcstring) >= 20120426
#BuildRequires:  pkgconfig(libcsystem) >= 20120425
#BuildRequires:  pkgconfig(libfcache) >= 20120425
#BuildRequires:  pkgconfig(libfdata) >= 20120425
#BuildRequires:  pkgconfig(libfvalue) >= 20120428
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
libsmraw is a library to access the storage media RAW format.
The library supports both RAW and split RAW.

%package -n %lname
Summary:        Library and tools to access the (split) RAW image format
Group:          System/Libraries

%description -n %lname
libsmraw is a library to access the storage media RAW format.
The library supports both RAW and split RAW.

%package devel
Summary:        Development files for libsmraw, a (split) RAW image file library
Group:          Development/Libraries/C and C++
Requires:       %lname = %version

%description devel
libsmraw is a library to access the storage media RAW format.

This subpackage contains libraries and header files for developing
applications that want to make use of libsmraw.

%package tools
Summary:        Utilities for reading and writing storage media (split) RAW files
Group:          Productivity/File utilities

%description tools
This subpackage contains the utility programs from libsmraw to
acquire, export, query and verify storage media (split) RAW files.

%prep
%setup -qn libsmraw-%timestamp

%build
%configure --disable-static --enable-wide-character-type
make %{?_smp_mflags}

%install
make install DESTDIR="%buildroot"
rm -f "%buildroot/%_libdir"/*.la

%post   -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig

%files -n %lname
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog
%_libdir/libsmraw.so.1*

%files devel
%defattr(-,root,root)
%_includedir/libsmraw*
%_libdir/libsmraw.so
%_libdir/pkgconfig/libsmraw.pc
%_mandir/man3/libsmraw.3*

%files tools
%defattr(-,root,root)
%_bindir/smrawmount
%_mandir/man1/smrawmount.1*

%changelog
openSUSE Build Service is sponsored by