libconfig/libconfig.spec

197 lines
5.9 KiB
RPMSpec

#
# spec file for package libconfig++ (Version 1.4.5)
#
# Copyright (c) 2010 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/
#
# norootforbuild
%define _prefix /usr
%define _libname libconfig
%define _SO_nr 9
Name: libconfig
Summary: A simple library for manipulating structured configuration files
Version: 1.4.8
Release: 0
License: LGPL-2.1+
Group: System/Libraries
URL: http://www.hyperrealm.com/main.php?s=libconfig
# http://www.hyperrealm.com/libconfig/
Source: %{name}-%{version}.tar.bz2
Source90: %{name}-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(pre): info
BuildRequires: bison
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: texinfo
BuildRequires: texlive-latex
BuildRequires: texlive
BuildRequires: pkg-config fdupes
%description
Libconfig is a simple library for manipulating structured
configuration files, like this one: test.cfg. This file format
is more compact and more readable than XML. And unlike XML, it
is type-aware, so it is not necessary to do string parsing in
application code.
Libconfig is very compact just 38K for the stripped C shared
library (less than one-fourth the size of the expat XML parser
library) and 66K for the stripped C++ shared library. This makes
it well-suited for memory-constrained systems like handheld
devices.
The library includes bindings for both the C and C++ languages.
It works on POSIX-compliant UNIX systems (GNU/Linux, Mac OS X,
Solaris, FreeBSD) and Windows (2000, XP and later).
%package -n %{_libname}%{_SO_nr}
Summary: Shared libraries for libconfig
Group: System/Libraries
%description -n %{_libname}%{_SO_nr}
Libconfig is a simple library for manipulating structured
configuration files, like this one: test.cfg. This file format
is more compact and more readable than XML. And unlike XML, it
is type-aware, so it is not necessary to do string parsing in
application code.
This package contains the shared libraries for libconfig.
%package -n %{_libname}-devel
Summary: C-Bindings development files for libconfig
Group: Development/Languages/C and C++
Requires: %{_libname}%{_SO_nr} = %{version}
%description -n %{_libname}-devel
Libconfig is a simple library for manipulating structured
configuration files, like this one: test.cfg. This file format
is more compact and more readable than XML. And unlike XML, it
is type-aware, so it is not necessary to do string parsing in
application code.
This package contains the C-bindings development files.
%package -n %{_libname}++%{_SO_nr}
Summary: Shared libraries for libconfig
Group: System/Libraries
%description -n %{_libname}++%{_SO_nr}
Libconfig is a simple library for manipulating structured
configuration files, like this one: test.cfg. This file format
is more compact and more readable than XML. And unlike XML, it
is type-aware, so it is not necessary to do string parsing in
application code.
This package contains the shared libraries for libconfig.
%package -n %{_libname}++-devel
Summary: C++-Bindings development files for libconfig
Group: Development/Languages/C and C++
Requires: %{_libname}++%{_SO_nr} = %{version}
Requires: %{_libname}-devel = %{version}
%description -n %{_libname}++-devel
Libconfig is a simple library for manipulating structured
configuration files, like this one: test.cfg. This file format
is more compact and more readable than XML. And unlike XML, it
is type-aware, so it is not necessary to do string parsing in
application code.
This package contains the C++-bindings development files.
%package doc
Summary: Documentation files for libconfig
Group: Documentation/Other
%description doc
Documentation files for package libconfig.
%prep
%setup -q
%build
%configure
%__make pdf
%__make html
make %{?_smp_flags}
%install
%makeinstall
# clean up
pushd examples
%__make clean
find . -name '*.vcproj' | xargs %__rm
popd
%__rm %{buildroot}%{_libdir}/*.a
%__rm %{buildroot}%{_libdir}/*.la
for i in `find . -name '.deps' -print`; do \
rm -rfv ${i}; done
%fdupes -s examples/
%fdupes -s %{buildroot}%{_docdir}
%post -n %{_libname}%{_SO_nr} -p /sbin/ldconfig
%postun -n %{_libname}%{_SO_nr} -p /sbin/ldconfig
%post -n %{_libname}++%{_SO_nr} -p /sbin/ldconfig
%postun -n %{_libname}++%{_SO_nr} -p /sbin/ldconfig
%post doc
%install_info --info-dir=%{_infodir} %{_infodir}/libconfig.info.gz
%postun doc
%install_info_delete --info-dir=%{_infodir} %{_infodir}/libconfig.info.gz
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING* README TODO
%doc examples
%files doc
%defattr(-,root,root)
%doc doc/*.html
%doc doc/*.pdf
%{_infodir}/%{_libname}.info.gz
%files -n %{_libname}%{_SO_nr}
%defattr(-,root,root)
%{_libdir}/libconfig.so.*
%files -n %{_libname}++%{_SO_nr}
%defattr(-,root,root)
%{_libdir}/libconfig++.so.*
%files -n %{_libname}-devel
%defattr(-,root,root)
%{_includedir}/%{_libname}.h
%{_libdir}/%{_libname}.so
%{_libdir}/pkgconfig/%{_libname}.pc
%files -n %{_libname}++-devel
%defattr(-,root,root)
%{_includedir}/%{_libname}.h++
%{_libdir}/%{_libname}++.so
%{_libdir}/pkgconfig/%{_libname}++.pc
%changelog