File libnih.spec of Package libnih

#
# spec file for package libnih (Version 1.0.1)
#
# 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


Name:           libnih
BuildRequires:  glibc-devel
BuildRequires:  dbus-1-devel
BuildRequires:  pkg-config
BuildRequires:  libexpat-devel
License:        GPLv2
Group:          Development/Libraries/C and C++
Summary:        Library for sharing code
Version:        1.0.1
Release:        4
Source:         %{name}-%{version}.tar.bz2
Url:            http://bazaar.launchpad.net/~scott/libnih/trunk/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Nih is a library of C helper functions.

It duplicates much of glib for no (really) good reason.

%package devel
License:        GPLv2
Summary:        Library for sharing code
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version} glibc-devel dbus-1-devel libexpat-devel

%description devel
Nih is a library of C helper functions.

It duplicates much of glib for no (really) good reason.

%prep
%setup -q

%build
%configure --libdir=/%_lib --disable-static --disable-silent-rules
make %{?_smp_mflags}

%install
%makeinstall pkgconfigdir=$DESTDIR/%{_libdir}/pkgconfig
rm $RPM_BUILD_ROOT/%{_lib}/*.la 

%check
# works locally but creates problems in build service (very likely due to too little ram)
#make check

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-, root, root)
%doc COPYING ChangeLog NEWS AUTHORS
/%{_lib}/*.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/libnih.h
%{_includedir}/libnih-dbus.h
%{_includedir}/nih
%{_includedir}/nih-dbus
/%{_lib}/*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/aclocal/libnih.m4
%{_datadir}/man/man1/nih-dbus-tool.1.gz
%{_bindir}/nih-dbus-tool

%changelog
openSUSE Build Service is sponsored by