Summary: sysfsutils, library interface to sysfs.
Summary(ja): sysfs インタフェースライブラリおよびユーティリティ
Name: sysfsutils
Version: 2.1.0
Release: 3%{?_dist_release}
License: GPL/LGPL
Group: Development/Tools

Source0: http://prdownloads.sourceforge.net/linux-diag/%{name}-%{version}.tar.gz

Buildroot: %{_tmppath}/%{name}-%{version}-root

%description
This package's purpose is to provide a set of utilities for interfacing
with sysfs.

The library is distributed under LGPL and utilities that come with it are
under GPL.

%package devel
Summary: Static library and headers for sysfsutils
Summary(ja): sysfsutils のスタティックライブラリおよびヘッダファイル
Group: Development/Libraries
Requires: sysfsutils = %{version}

%description devel
sysfsutils-devel provides the header files and static libraries required
to build programs using the libsysfs API.

%prep
%setup -q

%build
%configure --disable-static
%__make %{?_smp_mflags}

%install
rm -fr %{buildroot}

%__make DESTDIR=$RPM_BUILD_ROOT install

# remove unpackaged files
rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
find $RPM_BUILD_ROOT%{_bindir} -type f -not -name "systool" -exec rm -f \{\} \;

%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING AUTHORS README NEWS CREDITS ChangeLog docs/libsysfs.txt cmd/GPL lib/LGPL
%{_bindir}/systool
%{_libdir}/libsysfs.so.*
%{_mandir}/man1/systool.1*

%files devel
%defattr(-,root,root)
%{_includedir}/sysfs/libsysfs.h
%{_includedir}/sysfs/dlist.h
%{_libdir}/libsysfs.so
#{_libdir}/libsysfs.a


%changelog
* Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 2.1.0-3
- rebuilt with rpm-4.8.1-3

* Mon Apr 13 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.1.0-2
- spec in utf-8
- remove static library

* Sun Jun 15 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.1.0-1
- applied new versioning policy

* Tue Sep 19 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.1.0-0vl1
- new upstream release

* Fri Mar 17 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.0-0vl1
- initial build

