File libHX.spec of Package libHX

#
# spec file for package libHX
#
# Copyright (c) 2012 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:           libHX
%define lname   libHX28
Summary:        Useful collection of routines for C and C++ programming
License:        LGPL-2.1 or LGPL-3.0
Group:          Development/Libraries/C and C++
Version:        3.12.1
Release:        0
Source:         http://downloads.sf.net/libhx/libHX-%version.tar.xz
Source3:        http://downloads.sf.net/libhx/libHX-%version.tar.xz.asc
Source2:        baselibs.conf
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  xz
Url:            http://libhx.sf.net/

%description
libHX is a C library (with some C++ bindings available) that provides
data structures and functions commonly needed, such as maps, deques,
linked lists, string formatting and autoresizing, option and config
file parsing, type checking casts and more.

libHX aids in quickly writing up C and C++ data processing programs,
by consolidating tasks that often happen to be open-coded, such as
(simple) config file reading, option parsing, directory traversal,
and others, into a library. The focus is on reducing the amount of
time (and secondarily, the amount of code) a developer has to spend
for otherwise implementing such.


Authors:
--------
	Jan Engelhardt <jengelh [at] medozas de>

%package -n %lname
Summary:        Useful collection of routines for C and C++ programming
Group:          System/Libraries

%description -n %lname
libHX is a C library (with some C++ bindings available) that provides
data structures and functions commonly needed, such as maps, deques,
linked lists, string formatting and autoresizing, option and config
file parsing, type checking casts and more.

libHX aids in quickly writing up C and C++ data processing programs,
by consolidating tasks that often happen to be open-coded, such as
(simple) config file reading, option parsing, directory traversal,
and others, into a library. The focus is on reducing the amount of
time (and secondarily, the amount of code) a developer has to spend
for otherwise implementing such.


Authors:
--------
	Jan Engelhardt <jengelh [at] medozas de>

%package devel
Summary:        Useful collection of routines for C and C++ programming
Group:          Development/Libraries/C and C++
Requires:       %lname = %version

%description devel
libHX is a C library (with some C++ bindings available) that provides
data structures and functions commonly needed, such as maps, deques,
linked lists, string formatting and autoresizing, option and config
file parsing, type checking casts and more.

libHX aids in quickly writing up C and C++ data processing programs,
by consolidating tasks that often happen to be open-coded, such as
(simple) config file reading, option parsing, directory traversal,
and others, into a library. The focus is on reducing the amount of
time (and secondarily, the amount of code) a developer has to spend
for otherwise implementing such.


Authors:
--------
	Jan Engelhardt <jengelh [at] medozas de>

%prep
%if 0%{?__xz:1}
%setup -q
%else
tar -xf "%{S:0}" --use=xz;
%setup -DTq
%endif

%build
%configure --includedir=%_includedir/%name-%version
make %{?_smp_mflags}

%install
make install DESTDIR=%buildroot docdir=%_defaultdocdir/%name
mkdir -p "%buildroot/%_docdir";
install -pm0644 doc/* "%buildroot/%_defaultdocdir/%name"
rm -f %buildroot/%_defaultdocdir/%name/Makefile*
find "%buildroot" -type f -name "*.la" -delete;

%check
make check

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

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

%files -n %lname
%defattr(-,root,root)
/%_libdir/%{name}*.so.*

%files devel
%defattr(-,root,root)
%docdir %_docdir/%name
%_docdir/%name
%_includedir/%{name}*
/%_libdir/%{name}*.so
%_libdir/pkgconfig/*.pc

%changelog