File libsmdev.spec of Package libsmdev

#
# spec file for package libsmdev
#
# 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:           libsmdev
%define lname	libsmdev1
%define timestamp 20130407
Version:        0~%timestamp
Release:        0
License:        LGPL-3.0+
Summary:        Library to access storage media devices
Group:          Productivity/File utilities
Url:            http://code.google.com/p/libsmdev/

#Git-Clone:	http://code.google.com/p/libsmdev
#DL-URL:	https://googledrive.com/host/0B3fBvzttpiiSNEJFQ1FqanFYVUU/libsmdev-alpha-20130407.tar.gz
Source:         %name-alpha-%timestamp.tar.gz
BuildRequires:  pkg-config
#use factory packages if available
%if 0%{?suse_version} > 1230
BuildRequires:  pkgconfig(libcfile) >= 20130609
BuildRequires:  pkgconfig(libclocale) >= 20130609
%endif
# build fails with factory version of these packages, use internal version
#BuildRequires:  pkgconfig(libcerror) >= 20120425
#BuildRequires:  pkgconfig(libcdata) >= 20120425
#BuildRequires:  pkgconfig(libuna) >= 20120425
#verified 7/31/2013
# not (yet) in factory, use internal version
#BuildRequires:  pkgconfig(libcstring) >= 20120425
#BuildRequires:  pkgconfig(libcsystem) >= 20120425
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
libsmdev is a library to access and read storage media devices.

%package -n %lname
Summary:        Library to access storage media devices
Group:          System/Libraries

%description -n %lname
libsmdev is a library to access and read storage media devices.

%package devel
Summary:        Development files for libsmdev, a storage media access library
Group:          Development/Libraries/C and C++
Requires:       %lname = %version

%description devel
libsmdev is a library to access and read storage media devices.

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

%package tools
Summary:        Utilities for reading storage media devices through libsmdev
Group:          Productivity/File utilities

%description tools
This subpackage contains the utility programs from libsmdev, which
can access and read storage media devices and will determine
information about such.

%prep
%setup -qn libsmdev-%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/libsmdev.so.1*

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

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

%changelog
openSUSE Build Service is sponsored by