Blob Blame History Raw
Name:           libHX
Version:        3.6
Release:        2%{?dist}
Summary:        Useful collection of routines for C and C++ programming

Group:          System Environment/Libraries
License:        LGPLv2 or LGPLv3
URL:            http://sourceforge.net/projects/libhx/
Source0:        http://downloads.sourceforge.net/libhx/libHX-%{version}.tar.xz
Source1:        http://downloads.sourceforge.net/libhx/libHX-%{version}.tar.xz.asc
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  perl gcc-c++


%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.


%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%setup -q


%build
# Move libHX.so.* to /%{_lib}:
# /sbin/mount.crypt from pam_mount uses libHX
# /lib/security/pam_mount.so from pam_mount uses libHX
%configure --disable-static --libdir=/%{_lib} --with-pkgconfigdir=%{_libdir}/pkgconfig --docdir=%{_docdir}/%{name}-%{version}
make %{?_smp_mflags} V=verbose


%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT V=verbose
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'

# move libHX.so to %{_libdir}
rm $RPM_BUILD_ROOT/%{_lib}/libHX.so
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
pushd $RPM_BUILD_ROOT/%{_libdir}
ln -s ../../%{_lib}/libHX.so.*.*.* $RPM_BUILD_ROOT/%{_libdir}/libHX.so
popd
# :TODO: include the documentation more cleanly
rm doc/Makefile*


%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc LICENSE.LGPL2 LICENSE.LGPL3 LICENSE.GPL3
/%{_lib}/libHX.so.25
/%{_lib}/libHX.so.25.0.0


%files devel
%defattr(-,root,root,-)
%doc doc/* README.txt
%dir %{_includedir}/libHX
%{_includedir}/libHX.h
%{_includedir}/libHX/ctype_helper.h
%{_includedir}/libHX/defs.h
%{_includedir}/libHX/deque.h
%{_includedir}/libHX/init.h
%{_includedir}/libHX/libxml_helper.h
%{_includedir}/libHX/list.h
%{_includedir}/libHX/map.h
%{_includedir}/libHX/misc.h
%{_includedir}/libHX/option.h
%{_includedir}/libHX/proc.h
%{_includedir}/libHX/string.h
%{_includedir}/libHX/wx_helper.hpp
%{_libdir}/libHX.so
%{_libdir}/pkgconfig/libHX.pc


%changelog
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Aug 16 2010 Till Maas <opensource@till.name> - 3.6-1
- really update to latest release

* Mon Aug 16 2010 Till Maas <opensource@till.name> - 3.5-1
- Update to latest release
- remove devel %%files %%{_includedir} globbing
- Update soname

* Sat Aug 07 2010 Till Maas <opensource@till.name> - 3.4-2
- Use less globbing in %%files to detect changes

* Sun May 16 2010 Till Maas <opensource@till.name> - 3.4-1
- Update to new release

* Thu Sep 24 2009 Till Maas <opensource@till.name> - 3.1-1
- Update to new release

* Thu Aug 27 2009 Till Maas <opensource@till.name> - 3.0-1
- Update to new release

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Jul 02 2009 Till Maas <opensource@till.name> - 2.8-1
- Update to new release
- Define docdir for %%configure, because of installed PDF documentation

* Tue Mar 03 2009 Till Maas <opensource@till.name> - 2.5-1
- Update to new release
- Update URL/Source0 to SF.net webpage

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Jan 20 2009 Till Maas <opensource@till.name> - 2.3-1
- Update to new release

* Mon Dec 29 2008 Till Maas <opensource@till.name> - 2.1-1
- Update to new release

* Sat Dec 20 2008 Till Maas <opensource@till.name> - 1.25-3
- Fix .so symlink

* Thu Nov 27 2008 Till Maas <opensource@till.name> - 1.25-2
- Move libHX.so.* to /%%{_lib} because of /sbin/mount.crypt from pam_mount

* Thu Sep 11 2008 Till Maas <opensource@till.name> - 1.25-1
- Update to latest version

* Fri Sep 05 2008 Till Maas <opensource@till.name> - 1.23-1
- Update to latest version

* Wed Jun 11 2008 Till Maas <opensource till name> - 1.18-2
- Set variable V for make: displays full compiler commandline

* Wed Jun 11 2008 Till Maas <opensource till name> - 1.18-1
- Update to latest version

* Tue May 27 2008 Till Maas <opensource till name> - 1.17-1
- Update to latest version

* Mon May 05 2008 Till Maas <opensource till name> - 1.15-1
- Update to latest version
- Update description

* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.10.2-2
- Autorebuild for GCC 4.3

* Wed Dec 26 2007 Till Maas <opensource till name> - 1.10.2-1
- update to latest version
- fixed bug: https://sourceforge.net/tracker/?func=detail&atid=430593&aid=1845721&group_id=41452

* Thu Sep 27 2007 Till Maas <opensource till name> - 1.10.1-2
- add tests as examples to devel documentation

* Wed Sep 26 2007 Till Maas <opensource till name> - 1.10.1-1
- initial spec for Fedora