File libvstr-1_0-0.spec of Package libvstr-1_0-0

#
# spec file for package vstr (Version 1.0.15)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define pkg_name vstr

Name:           libvstr-1_0-0
Version:        1.0.15
Release:        1
License:        LGPL
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Group:          Development/Libraries
Summary:        Vstr is a safe and fast string library for C
Source:         %{pkg_name}-%{version}.tar.bz2
BuildRequires:	autoconf >= 2.12, automake, libtool, pkgconfig

%description

Vstr is a safe and fast string library for C. It is designed for network communication. Its design uses chunks of ptr+length data, so adding, substituting, and deleting data are all fast operations. This model also allows it to do automatic referencing for mmap() areas of memory. Shortcut APIs are included to mmap() a file into a Vstr string, and read()/write() data to/from a Vstr string. Another big feature of the library is a POSIX and ISO 9899:1999 compliant printf() like function, which can also be extended with user supplied formatters that are gcc warning compatible. The total API is over 280 functions, but laid out in a easy to remember manner, including data parsing functions, a non-destructive split() function, and conversion functions (among others).


%package -n libvstr-devel
Summary:        Vstr is a safe and fast string library for C
Group:          Development/Libraries
Requires:       %{name} = %{version} glibc-devel 

%description -n libvstr-devel

Vstr is a safe and fast string library for C. It is designed for network communication. Its design uses chunks of ptr+length data, so adding, substituting, and deleting data are all fast operations. This model also allows it to do automatic referencing for mmap() areas of memory. Shortcut APIs are included to mmap() a file into a Vstr string, and read()/write() data to/from a Vstr string. Another big feature of the library is a POSIX and ISO 9899:1999 compliant printf() like function, which can also be extended with user supplied formatters that are gcc warning compatible. The total API is over 280 functions, but laid out in a easy to remember manner, including data parsing functions, a non-destructive split() function, and conversion functions (among others).

%prep

%setup -q -n %{pkg_name}-%{version}

%build

./scripts/autogen.sh

CFLAGS="%{optflags}"
CXXFLAGS="%{optflags}"
%if 0%{?suse_version} > 1000
CFLAGS="$CFLAGS -fstack-protector"
CXXFLAGS="$CXXFLAGS -fstack-protector"
%endif

export CFLAGS
export CXXFLAGS

%configure --disable-static --with-pic 

make %{?_smp_mflags}


%install

%makeinstall

%{__rm} -rf %{buildroot}/usr/share/doc/*

%{__rm} -f %{buildroot}%{_libdir}/*.la

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_libdir}/libvstr-1.0.so.0*

%files -n libvstr-devel
%defattr(-,root,root)
%{_includedir}/*.h
%{_libdir}/libvstr.so
%{_libdir}/pkgconfig/vstr.pc
%{_mandir}/man3/vstr.3.gz
%{_mandir}/man3/vstr_const.3.gz

%changelog
openSUSE Build Service is sponsored by