File dmapi.spec of Package dmapi

#
# spec file for package dmapi (Version 2.2.8)
#
# Copyright (c) 2008 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


Name:           dmapi
BuildRequires:  e2fsprogs-devel xfsprogs-devel
Version:        2.2.8
Release:        96
AutoReqProv:    on
Group:          Development/Libraries/C and C++
License:        GPL v2 or later
Url:            http://oss.sgi.com/projects/xfs/
Summary:        Data Management API Runtime Environment
Source0:        dmapi_%{version}-1.tar.bz2
Patch0:         dmapi-docdir.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This package contains files required by system software using the Data
Management API. (DMAPI).  This is used to implement the interface
defined in the X/Open document:  Systems Management: Data Storage
Management (XDSM) API dated February 1997.  This interface is
implemented by the libdm library.



Authors:
--------
    SGI

%package      devel
Requires:       dmapi = %version
AutoReqProv:    on
Group:          Development/Libraries/C and C++
License:        GPL v2 or later
Url:            http://oss.sgi.com/projects/xfs/
Summary:        DMAPI Libraries and Header Files

%description devel
The dmapi-devel package contains the libraries and header files needed
to develop programs which make use of the Data Management API (DMAPI). 
If you install dmapi-devel, you will also want to install the dmapi
(runtime) package and the xfsprogs-devel package.



Authors:
--------
    SGI

%prep
%setup -q
%patch0

%build
autoreconf -fi
CFLAGS=$RPM_OPT_FLAGS \
./configure \
	--prefix=/usr \
	--libdir=/%_lib \
	--libexecdir=%_libdir
LCFLAGS="$RPM_OPT_FLAGS" make

%install
export DIST_ROOT="$RPM_BUILD_ROOT"
/usr/bin/make install
/usr/bin/make install-dev
# remove devel stuff from /lib
rm $RPM_BUILD_ROOT/%_lib/libdm.{so,a,la}
rm $RPM_BUILD_ROOT/%_libdir/libdm.so
pushd $RPM_BUILD_ROOT%_libdir
	ls ../../%_lib/libdm.so.[0-9]
	ln -s ../../%_lib/libdm.so.[0-9] libdm.so
popd
find $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,755)
/%_lib/libdm.so.*
%doc %_defaultdocdir/%name

%files devel
%defattr(-,root,root,755)
/usr/include/xfs/dmapi.h
%_libdir/libdm.a
%_libdir/libdm.so
%_libdir/libdm.la
/usr/share/man/man3/*

%changelog
* Fri Jun 22 2007 mmarek@suse.cz
- updated to 2.2.8
  * Fix a problem in get_mnt() called by dm_handle_to_path()
  The "dmi" mount option was not considered.
  * Fix issues with makedepend on libtool libraries.
  * Makefile dependency fixes
- specfile cleanup
* Wed Jan 24 2007 mmarek@suse.cz
- use $RPM_OPT_FLAGS
* Thu Jul 27 2006 mjancar@suse.cz
- update to 2.2.5
  * Debian packaging updates (debmake out, debhelper in)
  * Fix Debian build packaging dependency.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 16 2006 mjancar@suse.cz
- update to 2.2.3
* Sun Aug 21 2005 ro@suse.de
- no .a/.la files in /
* Mon Feb 07 2005 mjancar@suse.cz
- update to 2.2.1
* Fri Aug 06 2004 mjancar@suse.cz
- update to 2.2.0
* Thu Feb 26 2004 mjancar@suse.cz
- update to 2.1.0
* Sun Jan 11 2004 adrian@suse.de
- build as user
* Fri Jun 20 2003 ja@suse.cz
- Upgrade to 2.0.8.
* Mon Jun 16 2003 ja@suse.cz
- File list fixed for dmapi-devel.
* Tue Apr 29 2003 jderfina@suse.cz
- update to version 2.0.7
* Tue Aug 20 2002 ro@suse.de
- fix links in devel package
  (broken for this case where PKG_DEVLIB_DIR == PKG_LIB_DIR)
* Tue Aug 20 2002 mge@suse.de
- update to 2.0.5
* Thu May 09 2002 tcrhak@suse.cz
- fixed to build with lib64
* Tue Feb 26 2002 ro@suse.de
- update to 2.0.0
* Tue Aug 21 2001 adostal@suse.cz
- split dmapi-0.1.1 from package xfsprogs
- use DESTDIR from %%install (...destdir.patch)
- create  ...dirs.patch
openSUSE Build Service is sponsored by