File libghthash.spec of Package libghthash

Summary: Generic Hash Table implementation
Name: libghthash
Version: 0.6.2
Release: 1
License: GPL
Group: Development/Libraries/C and C++
URL: http://www.ipd.bth.se/ska/sim_home/libghthash.html
#Original Source: http://www.ipd.bth.se/ska/sim_home/filer/libghthash-%%{version}.tar.gz
Source: libghthash-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM conrad@quisquis.de
Patch: libghthash-man.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%if 0%{?suse_version} >= 1100 && 0%{?suse_version} < 1150
Requires: licenses
BuildRequires: licenses
%endif

%description
libghthash is a Generic Hash Table which is meant to be easy to extend,
portable, clear in its code and easy to use. You can store any kind of
data in it, regardless of size etc.

%package -n libghthash1
Summary: Generic Hash Table library
Group: Development/Libraries/C and C++

%description -n libghthash1
libghthash is a Generic Hash Table which is meant to be easy to extend,
portable, clear in its code and easy to use. You can store any kind of
data in it, regardless of size etc.

%package devel
Summary: Development files for Generic Hash Table
Group: Development/Libraries/C and C++
Requires: libghthash1 = %{version}

%description devel
libghthash is a Generic Hash Table which is meant to be easy to extend,
portable, clear in its code and easy to use.

This package contains the C header files.

%prep
%setup
%patch -p1

%build
%configure --disable-static
export shared_ext=.so
make SUBDIRS=src %{?_smp_mflags}
lic="`md5sum COPYING | cut -d' ' -f 1`"
if [ -r "/usr/share/doc/licenses/md5/$lic" ]; then
    ln -sf /usr/share/doc/licenses/md5/"$lic" COPYING
fi

%install
make SUBDIRS=src DESTDIR="%{buildroot}" install
%__rm -rf "%{buildroot}%{_libdir}/libghthash.la" examples/Makefile examples/.deps
%__debug_install_post

%post -n libghthash1 -p /sbin/ldconfig

%postun -n libghthash1 -p /sbin/ldconfig

%clean
[ "%{buildroot}" = "/" ] || rm -rf "%{buildroot}"

%files -n libghthash1
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_libdir}/libghthash.so.1
%{_libdir}/libghthash.so.1.1.0

%files devel
%defattr(-,root,root,-)
%doc examples html
%{_prefix}/include/ght_hash_table.h
%{_libdir}/libghthash.so
%{_mandir}/man3/ght_create.3%{ext_man}
%{_mandir}/man3/ght_finalize.3%{ext_man}
%{_mandir}/man3/ght_first.3%{ext_man}
%{_mandir}/man3/ght_first_keysize.3%{ext_man}
%{_mandir}/man3/ght_get.3%{ext_man}
%{_mandir}/man3/ght_insert.3%{ext_man}
%{_mandir}/man3/ght_next.3%{ext_man}
%{_mandir}/man3/ght_next_keysize.3%{ext_man}
%{_mandir}/man3/ght_remove.3%{ext_man}

%changelog
openSUSE Build Service is sponsored by