Files
libh/libh.spec

115 lines
3.4 KiB
RPMSpec

#
# spec file for package libh
#
# 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: libh
%define lname libh0
Summary: P.Howard's Handy Library for C Programmers
License: LGPL-2.1+
Group: Development/Libraries/C and C++
Version: 0.8.5
Release: 0
Url: http://libh.sf.net/
Source: http://libh.sourceforge.net/download/%name-%version.tar.bz2
Patch1: libh-no-werror.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires: libopenssl-devel
%endif
%if 0%{?redhat_version} || 0%{?centos_version} || 0%{?fedora_version}
BuildRequires: openssl-devel
%endif
%description
LIBH is a collection of functions for C programming intended to be
helpful or handy for C programmers. Many of these functions
originated with various programming projects where they were needed.
Other functions were then added to fill out the scope of
possibilities to make a more complete selection. LIBH is divided into
a number of different logical sections.
%package -n %lname
Summary: P.Howard's Handy Library for C Programmers
Group: System/Libraries
%description -n %lname
LIBH is a collection of functions for C programming intended to be
helpful or handy for C programmers. Many of these functions
originated with various programming projects where they were needed.
%package devel
Summary: Developemnt files for P.Howard's Handy C library
Group: Development/Libraries/C and C++
Requires: %lname = %version
%description devel
LIBH is a collection of functions for C programming intended to be
helpful or handy for C programmers. Many of these functions
originated with various programming projects where they were needed.
%package tools
Summary: Utilities from the libh suite
Group: Development/Libraries/C and C++
%description tools
LIBH is a collection of functions for C programming intended to be
helpful or handy for C programmers. Many of these functions
originated with various programming projects where they were needed.
%prep
%setup -q
%patch -P 1 -p1
%build
# Not auto*. And that's why this configure line is now so ugly.
# Have to build static library or the tools won't compile.
./configure --no-strip -q \
--prefix="%_usr" --install-prefix="%buildroot/%_prefix";
make %{?_smp_mflags}
%install
b="%buildroot";
make install;
if [ "%_lib" != "lib" ]; then
mv "$b/%_prefix/lib" "$b/%_prefix/%_lib";
fi;
mkdir -p "$b/%_libexecdir/%name";
mv "$b/%_prefix/cgi" "$b/%_libexecdir/%name/";
rm -f "$b/%_libdir"/libh.a*;
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%defattr(-,root,root)
%_libdir/libh.so.*
%files devel
%defattr(-,root,root)
%_includedir/%name
%_libdir/libh.so
%files tools
%defattr(-,root,root)
%_bindir/*
%_sbindir/*
%_libexecdir/%name
%changelog