File libnih.spec of Package libnih

%def_enable shared
%def_enable static
%def_enable nls
%def_enable threads
%def_enable threading

Name: libnih
Version: 1.0.3
Release: 2
Summary: Lightweight application development library
Group: System/Libraries
License: GPL-2.0
# don't use dirent.d_type (#562815)
Patch1: %name-file-isdir.patch
Provides: %{name}1 = %version-%release

#BuildRequires: autoconf >= 2.62 automake >= 1.11 libtool >= 2.2.4
%{?_enable_nls:BuildRequires: gettext >= 0.17}
BuildRequires: pkg-config
BuildRequires: pkgconfig(dbus-1) >= 1.2.16
BuildRequires: pkgconfig(expat) >= 2.0.0

# Filter GLIBC_PRIVATE Requires:
%define __filter_GLIBC_PRIVATE 1

%name is a small library for C application development containing functions
that, despite its name, are not implemented elsewhere in the standard library
%name is roughly equivalent to other C libraries such as glib, except that its
focus is on a small size and intended for applications that sit very low in the
software stack, especially outside of /usr.

%package devel
Summary: Development files for %name
Group: Development/Libraries/C and C++
Requires: %name = %version-%release
%{?_disable_shared:Requires: %name-devel-static = %version-%release}
Requires: pkg-config

%description devel
This package contains libraries and header files for developing applications that
use %name.

%if_enabled static
%package devel-static
Summary: Static %name
Group: Development/Libraries/C and C++
Requires: %name-devel = %version-%release

%description devel-static
This package contains static libraries for developing applications that use

%setup -q
%patch1 -p1

%configure \
	%{subst_enable shared} \
	%{subst_enable static} \
	%{subst_enable threads} \
	%{subst_enable threading} \
	%{subst_enable nls} \
make %{?_smp_mflags}
gzip -9c ChangeLog > ChangeLog.gz

%make_install pkgconfigdir=%_libdir/pkgconfig

make %{?_smp_mflags} check

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%doc AUTHORS ChangeLog.* README
%exclude %_libdir/*.la

%files devel

%if_enabled static
%files devel-static

openSUSE Build Service is sponsored by