Blob Blame History Raw
Name:           libHX
Version:        3.5
Release:        1%{?dist}
Summary:        General-purpose library for typical low-level operations

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
A library for:
- rbtree with key-value pair extension
- deques (double-ended queues) (Stacks (LIFO) / Queues (FIFOs))
- platform independent opendir-style directory access
- platform independent dlopen-style shared library access
- auto-storage strings with direct access
- command line option (argv) parser
- shconfig-style config file parser
- platform independent random number generator with transparent
  /dev/urandom support
- various string, memory and zvec ops


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