File libcfgplus.spec of Package libcfgplus
#
# spec file for package libcfgplus
#
# Copyright (c) 2015 SUSE LINUX 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: libcfgplus
%define lname libcfg+0_7_0
Version: 0.7.0
Release: 0
Summary: Library for multi-command line and configuration file parsing
License: GPL-2.0
Group: Development/Libraries/C and C++
URL: http://opensource.platon.sk/projects/main_page.php?project_id=3
#Freshcode: http://freshcode.club/projects/libcfgplus
#DL: http://opensource.platon.sk/projects/download.php?id=136
Source: libcfg+-%version.tar.gz
Patch1: libcfgplus-shared.diff
BuildRequires: fdupes
%description
libcfg+ is a C library that features multi-command line and
configuration file parsing. It is possible to set up various special
properties such as quoting characters, deliminator strings, file
comment prefixes, multi-line postfixes, and more. It supports many
data types such as booleans, integers, decimal numbers, strings with
many additional data type flags (such as multiple values for a single
option).
%package -n %lname
Summary: Library for multi-command line and configuration file parsing
Group: System/Libraries
%description -n %lname
libcfg+ is a C library that features multi-command line and
configuration file parsing. It is possible to set up various special
properties such as quoting characters, deliminator strings, file
comment prefixes, multi-line postfixes, and more. It supports many
data types such as booleans, integers, decimal numbers, strings with
many additional data type flags (such as multiple values for a single
option).
%package devel
Summary: Library for multi-command line and configuration file parsing
Group: Development/Libraries/C and C++
Requires: %lname = %version
%description devel
libcfg+ is a C library that features multi-command line and
configuration file parsing. It is possible to set up various special
properties such as quoting characters, deliminator strings, file
comment prefixes, multi-line postfixes, and more. It supports many
data types such as booleans, integers, decimal numbers, strings with
many additional data type flags (such as multiple values for a single
option).
%prep
%autosetup -p1 -n libcfg+-%version
%build
export CFLAGS="%optflags -fPIC"
%configure --disable-static LD="gcc"
make %{?_smp_mflags} docdir="%_docdir"
%install
%make_install docdir="%_docdir"
find "%buildroot" -type f -name "*.a" -delete
fdupes %buildroot/%_prefix
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%_libdir/libcfg+.so.0.7.0
%files devel
%_libdir/libcfg+.so
%_includedir/*
%_mandir/man3/*
%_docdir/libcfg*
%license COPYING
%changelog