File chmlib.spec of Package chmlib

#
# spec file for package chmlib (Version 0.39)
#
# 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:           chmlib
BuildRequires:  gcc-c++
License:        LGPL v2.1 or later
Group:          System/Libraries
AutoReqProv:    on
Version:        0.39
Release:        101
%define rversion 0.39
Source0:        %{name}-%{version}.tar.bz2
Patch:          %{name}-%{version}.diff
Url:            http://www.jedrea.com/chmlib/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        A library for dealing with ITSS/CHM files

%description
CHMLIB is a library for dealing with Microsoft ITSS/CHM format files.



Authors:
--------
    Jed Wing <jedwin@ugcs.caltech.edu>

%package      devel
License:        LGPL v2.1 or later
Summary:        Documentation and Headers for chmlib
Group:          System/Libraries
Requires:       %{name} = %{version}

%description	devel
This package contains the headers and documentation for the chmlib API
that programmers will need to develop applications which use chmlib,
the software library for dealing with Microsoft ITSS/CHM format files.



Authors:
--------
    Jed Wing <jedwin@ugcs.caltech.edu>

%prep
%setup -q -n "%{name}-%{rversion}"
%patch

%build
export CFLAGS="$RPM_OPT_FLAGS -fstack-protector"
export CXXFLAGS="$CFLAGS"
export CXXCPP="g++ -E"
./configure --mandir=%{_mandir} \
	    --prefix=%{_prefix}  \
	    --libdir=%{_prefix}/%_lib  \
            --infodir=%{_infodir} \
            --sysconfdir=%{_sysconfdir} \
	    --enable-debug=no \
	    --disable-pread
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-, root, root)
%doc AUTHORS COPYING NEWS README
%{_prefix}/%_lib/*.so.*

%files devel
%defattr(-, root, root)
/usr/include/chm_lib.h
/usr/include/lzx.h
%{_prefix}/%_lib/*.la
%{_prefix}/%_lib/*.a
%{_prefix}/%_lib/*.so

%changelog
* Thu Feb 08 2007 dmueller@suse.de
- fix -devel requir'ing release number
* Mon Jan 29 2007 stbinner@suse.de
- update to version 0.39:
  * all of the dynamically-sized buffers which were allocated on
  the stack before have been changed to heap allocations. This
  circumvents some dangerous security flaws. (#239747)
* Wed Aug 09 2006 stbinner@suse.de
- update to version 0.38:
  * fix extract_chmLib directory traversal problem (#197808)
  * bugfix to allow successful reading of more chm files
* Sat Jun 03 2006 schwab@suse.de
- Port to all future systems.
* Mon May 22 2006 stbinner@suse.de
- Initial package of version 0.37.4