Sophie

Sophie

distrib > Mandriva > cooker > x86_64 > by-pkgid > 9c0c4ba19d1768ee9b449df8615aba70 > files > 5

sysfsutils-2.1.0-21.src.rpm

%define	fname	sysfs
%define	major	2
%define	libname	%mklibname %{fname} %{major}
%define	devname	%mklibname %{fname} -d
%define	static	%mklibname %{fname} -d -s

%bcond_without	diet
%bcond_without	uclibc

Summary:	Utility suite to enjoy sysfs
Name:		sysfsutils
Version:	2.1.0
Release:	21
URL:		http://linux-diag.sourceforge.net/
Source0:	http://prdownloads.sourceforge.net/linux-diag/%{name}-%{version}.tar.bz2
License:	GPLv2
Group:		System/Kernel and hardware
Patch0:		sysfsutils-2.0.0-class-dup.patch
Patch1:		sysfsutils-2.1.0-get_link.patch
Patch2:		sysfsutils-2.1.0-srcdir-include.patch
%if %{with diet}
BuildRequires:	dietlibc-devel
%endif
%if %{with uclibc}
BuildRequires:	uClibc-devel >= 0.9.33.2-9
%endif

%description
This package's purpose is to provide a set of utilities for interfacing
with sysfs, a virtual filesystem in Linux kernel versions 2.5+ that
provides a tree of system devices. While a filesystem is a very useful
interface, we've decided to provide a stable programming interface
that will hopefully make it easier for applications to query system devices
and their attributes.

This package currently includes:

- lsbus: a small application to query system bus information.
- systool: an application to view system device information by bus, class,
        and topology.

%package -n %{libname}
Summary:	Main library for %{name}
License:	LGPLv2.1
Group:		System/Libraries

%description -n	%{libname}
This package contains the library needed to run programs dynamically
linked with %{name}. The libsysfs library enables to access system devices.

%package -n uclibc-%{libname}
Summary:	uClibc linked library for %{name}
License:	LGPLv2.1
Group:		System/Libraries

%description -n	uclibc-%{libname}
This package contains the library needed to run programs dynamically
linked with %{name}. The libsysfs library enables to access system devices.

%package -n %{devname}
Summary:	Headers for developing programs that will use %{name}
License:	LGPLv2.1
Group:		Development/C
Requires:	%{libname} = %{version}-%{release}
%if %{with uclibc}
Requires:	uclibc-%{libname} = %{version}-%{release}
%endif
# for Turbolinux compatibility:
Provides:	sysfsutils-devel = %{version}-%{release}
Obsoletes:	%mklibname %{fname} 2 -d
Conflicts:	%{_lib}sysfs1-devel < 2.1.0

%description -n	%{devname}
This package contains the headers that programmers will need to develop
applications which will use %{name}.

%package -n %{static}
Summary:	Static library for developing programs that will use %{name}
License:	LGPLv2.1
Group:		Development/C
Requires:	%{libname} = %{version}
Requires:	%{devname} = %{version}
Obsoletes:	%mklibname %{fname} 2 -d -s
Provides:	sysfsutils-static-devel = %{version}-%{release}

%description -n	%{static}
This package contains the static library that programmers will need to develop
applications which will use %{name}.


%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1 -b .inc~
autoreconf -fi -Im4

%build
CONFIGURE_TOP=$PWD
%if %{with diet}
mkdir -p diet
pushd diet
%configure2_5x	CC="diet gcc" \
		--enable-static \
		--disable-shared
%make V=1 LD="diet ld" CFLAGS="-Os -g"
popd
%endif

%if %{with uclibc}
mkdir -p uclibc
pushd uclibc
%configure2_5x	CC="%{uclibc_cc}" \
		CFLAGS="%{uclibc_cflags}" \
		--enable-static \
		--enable-shared \
		--libdir=%{uclibc_root}/%{_lib}
%make V=1
popd
%endif

mkdir -p glibc
pushd glibc
%configure2_5x	--libdir=/%{_lib}
%make
popd

%install
%makeinstall_std -C glibc

install -d %{buildroot}%{_libdir}
mv %{buildroot}/%{_lib}/*.{so,a} %{buildroot}%{_libdir}
ln -rsf %{buildroot}/%{_lib}/libsysfs.so.%{major}.* %{buildroot}%{_libdir}/libsysfs.so

%if %{with diet}
install -m644 ./diet/lib/.libs/libsysfs.a -D %{buildroot}%{_prefix}/lib/dietlibc/lib-%{_arch}/libsysfs.a
%endif

%if %{with uclibc}
%makeinstall_std -C uclibc/lib
install -d %{buildroot}%{uclibc_root}%{_libdir}
mv %{buildroot}%{uclibc_root}/%{_lib}/*.{so,a} %{buildroot}%{uclibc_root}%{_libdir}
ln -rsf %{buildroot}%{uclibc_root}/%{_lib}/libsysfs.so.%{major}.* %{buildroot}%{uclibc_root}%{_libdir}/libsysfs.so
%endif

%files
%doc AUTHORS README NEWS
%{_bindir}/systool
%{_bindir}/dlist_test
%{_bindir}/get_device
%{_bindir}/get_driver
%{_bindir}/get_module
#%{_bindir}/testlibsysfs
%{_mandir}/man1/*

%files -n %{libname}
/%{_lib}/libsysfs.so.%{major}*

%if %{with uclibc}
%files -n uclibc-%{libname}
%{uclibc_root}/%{_lib}/libsysfs.so.%{major}*
%endif

%files -n %{devname}
%doc docs/libsysfs.txt
%{_libdir}/libsysfs.so
%{_includedir}/sysfs/libsysfs.h
%{_includedir}/sysfs/dlist.h
%if %{with uclibc}
%{uclibc_root}%{_libdir}/libsysfs.so
%endif

%files -n %{static}
%{_libdir}/libsysfs.a
%if %{with diet}
%{_prefix}/lib/dietlibc/lib-%{_arch}/libsysfs.a
%endif
%if %{with uclibc}
%{uclibc_root}%{_libdir}/libsysfs.a
%endif


%changelog
* Fri Oct 19 2012 Tomasz Pawel Gajc <tpg@mandriva.org> 2.1.0-21
+ Revision: 819086
- reupload
- spec file clean

* Tue Oct 02 2012 Alexander Khrukin <akhrukin@mandriva.org> 2.1.0-20
+ Revision: 818088
- %/{_lib} bad macro

* Sat Sep 29 2012 Per Øyvind Karlsen <peroyvind@mandriva.org> 2.1.0-19
+ Revision: 817914
- really, truly build against uClibc #"!#

* Sat Sep 29 2012 Per Øyvind Karlsen <peroyvind@mandriva.org> 2.1.0-18
+ Revision: 817910
- rebuild against latest uClibc

* Mon Sep 24 2012 Per Øyvind Karlsen <peroyvind@mandriva.org> 2.1.0-17
+ Revision: 817516
- add missing dependency on uclibc library in devel package

* Fri Sep 21 2012 Per Øyvind Karlsen <peroyvind@mandriva.org> 2.1.0-16
+ Revision: 817243
- build dynamic version of uClibc linked lib

* Thu Aug 09 2012 Andrey Bondrov <abondrov@mandriva.org> 2.1.0-15
+ Revision: 813208
- Bump release

* Thu May 24 2012 Per Øyvind Karlsen <peroyvind@mandriva.org> 2.1.0-14
+ Revision: 800343
- provide sysfsutils-static-devel

* Wed May 23 2012 Per Øyvind Karlsen <peroyvind@mandriva.org> 2.1.0-13
+ Revision: 800295
- add conditional buildrequires on uClibc & dietlibc-devel
- move libsysfs.so symlink to %%{_libdir}
- move static library from /%%{_lib}/ to %%{_libdir}/
- fix so that we're able to do out-of-source build (P2)
- do uclibc & dietlibc builds
- drop buildconflicts on it's own library package
- drop libsysfsutils-devel provides
- make license accurate
- clean out spec

* Fri Nov 11 2011 Tomasz Pawel Gajc <tpg@mandriva.org> 2.1.0-12
+ Revision: 730033
- add buildconflicts on libname
- Patch0: make use of of SYSFS_NAME_LEN (from Fedora)
- Patch1: fix resolving of symlinks on kernels 2.6.25 and above (from Fedora)
- spec file clean

* Fri May 06 2011 Oden Eriksson <oeriksson@mandriva.com> 2.1.0-11
+ Revision: 670256
- mass rebuild

* Mon Dec 22 2008 Oden Eriksson <oeriksson@mandriva.com> 2.1.0-10mnb2
+ Revision: 317612
- rebuild

* Tue Aug 05 2008 Thierry Vignaud <tv@mandriva.org> 2.1.0-9mnb2
+ Revision: 263683
- rebuild

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Mon Feb 18 2008 Thierry Vignaud <tv@mandriva.org> 2.1.0-8mnb1
+ Revision: 170657
- replace %%mkrel with %%manbo_mkrel for Manbo Core 1

* Fri Feb 08 2008 Pixel <pixel@mandriva.com> 2.1.0-8mdv2008.1
+ Revision: 163992
- add a provide sysfsutils-devel in libsysfs-devel (Turbolinux compatibility)

  + Olivier Blin <blino@mandriva.org>
    - restore BuildRoot

  + Thierry Vignaud <tv@mandriva.org>
    - kill re-definition of %%buildroot on Pixel's request
    - improve description

* Sat Nov 17 2007 Olivier Blin <blino@mandriva.org> 2.1.0-7mdv2008.1
+ Revision: 109630
- move library in /lib (required for pcmcia-socket-startup, #33452)

* Sun Sep 23 2007 Frederic Crozat <fcrozat@mandriva.com> 2.1.0-6mdv2008.0
+ Revision: 92400
- Add explicit conflicts with old sysfs devel package

* Tue Sep 18 2007 Frederic Crozat <fcrozat@mandriva.com> 2.1.0-5mdv2008.0
+ Revision: 89599
- Rebuild

* Tue Jun 26 2007 Thierry Vignaud <tv@mandriva.org> 2.1.0-4mdv2008.0
+ Revision: 44508
- new devel library policy
- prevent packaging wrong library major again

* Thu Jun 07 2007 Anssi Hannula <anssi@mandriva.org> 2.1.0-3mdv2008.0
+ Revision: 36202
- rebuild with correct optflags

* Tue Jun 05 2007 Funda Wang <fwang@mandriva.org> 2.1.0-2mdv2008.0
+ Revision: 35722
- Provides lib_major for sysfsutils


* Thu Dec 14 2006 Emmanuel Andry <eandry@mandriva.org> 2.1.0-2mdv2007.0
+ Revision: 96863
- rebuild

* Wed Dec 13 2006 Emmanuel Andry <eandry@mandriva.org> 2.1.0-1mdv2007.1
+ Revision: 96525
- New version 2.1.0
- Import sysfsutils

* Mon Dec 26 2005 Stefan van der Eijk <stefan@eijk.nu> 2.0.0-4mdk
- reupload

* Tue Dec 13 2005 Thierry Vignaud <tvignaud@mandriva.com> 2.0.0-3mdk
- fix upload

* Tue Dec 13 2005 Thierry Vignaud <tvignaud@mandriva.com> 2.0.0-2mdk
- bump major

* Mon Dec 12 2005 Thierry Vignaud <tvignaud@mandriva.com> 2.0.0-1mdk
- new release

* Sat Jun 18 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.3.0-1mdk
- new release

* Tue Jan 04 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.2.0-2mdk
- patch 0: fix segfault with vc classq

* Thu Nov 18 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.2.0-1mdk
- 1.2.0
- wipe out buildroot in %%install, not %%prep
- don't ship al documents with every subpackage

* Wed Jun 23 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.1.0-2mdk
- fix download url
- add project url

* Thu Apr 15 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.1.0-1mdk
- new release

* Thu Dec 18 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.4.0-1mdk
- new release
- remove uneeded patch 0