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
URL: https://launchpad.net/%name
Source: http://launchpad.net/%name/1.0/%version/+download/%name-%version.tar.gz
# 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

%description
%name is a small library for C application development containing functions
that, despite its name, are not implemented elsewhere in the standard library
set.
%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
%name.
%endif


%prep
%setup -q
%patch1 -p1


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


%install
%make_install pkgconfigdir=%_libdir/pkgconfig


%check
make %{?_smp_mflags} check


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


%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog.* README
%{?_enable_shared:%_libdir/*.so.*}
%exclude %_libdir/*.la


%files devel
%defattr(-,root,root)
%doc HACKING TODO
%_mandir/man1/*
%_bindir/*
%_includedir/*
%{?_enable_shared:%_libdir/*.so}
%_libdir/pkgconfig/*
%_datadir/aclocal/*


%if_enabled static
%files devel-static
%defattr(-,root,root)
%_libdir/*.a
%endif


%changelog
openSUSE Build Service is sponsored by