Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > ce979ebdea1691aa9448ca82eb37ec88 > files > 8

kmod-15-2.mga4.src.rpm

%define major 2
%define libname %mklibname %{name} %{major}
%define develname %mklibname %{name} -d

# (cg) Should be same version and rel + 1 as module-init-tools.
%define tools_ver 3.16
%define tools_rel 17

%bcond_without dietlibc
%bcond_without tools

Summary: Kernel modules management tools
Name: 	 kmod
Version: 15
Release: %mkrel 2
Source0: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{version}.tar.xz
%if %{with tools}
Source1: modprobe.default
Source2: modprobe.preload
Source3: blacklist-mga.conf
Source4: ipw-no-associate.conf
# From Fedora module-init-tools package
Source5: blacklist-compat.conf
%endif
# for drakx-installer-stage1:
Patch1:  kmod-9-fix-diet-size_t.diff
# revert disabling static:
Patch3:  fix-static.diff
# fix missing be32toh symbol in dietlibc (use ntohl instead) (for drakx' stage1):
Patch4:  fix-missing-be32toh-in-dietlibc.diff

License: GPLv2+
Group: 	 System/Kernel and hardware
#Url1:	 http://www.politreco.com/2011/12/announce-kmod-1/
Url:	 http://git.profusion.mobi/cgit.cgi/kmod.git/
BuildRequires: zlib-devel
BuildRequires: lzma-devel
BuildRequires: xsltproc
%if %{with dietlibc}
BuildRequires: dietlibc-devel
%endif
Requires(pre): filesystem >= 2.1.9-18
%if %{with tools}
Provides: module-init-tools = %{tools_ver}-%{tools_rel}
Obsoletes: module-init-tools < %{tools_ver}-%{tools_rel}
%endif

%description
Simple tools for managing kernel modules.

%package -n %{libname}
Summary: Kernel modules management library
Group:   System/Libraries
License: LGPLv2+
Requires(pre): filesystem >= 2.1.9-18

%description -n %{libname}
Dynamic libraries for %{name}.

The goal of the libkmod library is to offer to other programs the
needed flexibility and fine grained control over insertion, removal,
configuration and listing of kernel modules. Using the library, with
simple pieces of code it's possible to interact with kernel modules
and then there's no need to rely on other tools for that. This is a
thing lacking on Linux for a while and it's one of the items in the
Plumber's Wish List for Linux. Quoting it:

    provide a proper libmodprobe.so from module-init-tools:
    Early boot tools, installers, driver install disks want to access
    information about available modules to optimize boot up handling.

%package -n %{develname}
Summary:	Development files for %{name}
Group:		Development/C
Requires(pre):	filesystem >= 2.1.9-18
Requires:	%{libname} = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}
License:	LGPLv2+

%description -n %{develname}
Development files and headers for %{name}.



%prep
%setup -q
%apply_patches
automake
autoreconf

%build
%if %{with dietlibc}
mkdir diet
pushd diet
CC="diet gcc" ../configure --with-zlib --with-xz --enable-static --disable-shared --disable-tools
make V=1 LD="diet ld" CC="diet cc" CFLAGS="-Os -D_BSD_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_ATFILE_SOURCE -DO_CLOEXEC=0 -g -DUINT16_MAX=65535 -DINT32_MAX=2147483647"
popd
%endif

%configure --with-zlib --with-xz
%make

%install
rm -rf %{buildroot}
%makeinstall_std
rm -f %{buildroot}/%_libdir/libkmod.la

%if %{with tools}
  mkdir -p %{buildroot}%{_sbindir}
  for tool in modprobe modinfo insmod rmmod depmod lsmod; do
    ln -sf ../bin/kmod %{buildroot}%{_sbindir}/$tool
  done

  install -d -m755 %{buildroot}%{_sysconfdir}
  install -d -m755 %{buildroot}%{_sysconfdir}/depmod.d
  install -d -m755 %{buildroot}%{_sysconfdir}/modprobe.d/
  touch %{buildroot}%{_sysconfdir}/modprobe.conf
  install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/modprobe.d/00_modprobe.conf
  install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}
  install -m 644 %{SOURCE3} %{SOURCE4} %{SOURCE5} %{buildroot}%{_sysconfdir}/modprobe.d

# (tmb) FIXME for mga3: mga tools still use /etc/modprobe.conf
ln -s  ../modprobe.conf %{buildroot}%{_sysconfdir}/modprobe.d/01_mga-config.conf

%else
  rm -rf %{buildroot}%{_mandir}
%endif

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

%check
#make test

%clean
rm -rf %{buildroot}

%files
%doc NEWS
%_bindir/%{name}
%if %{with tools}
%dir /etc/depmod.d/
%config(noreplace) %{_sysconfdir}/modprobe.preload
%config(noreplace) %{_sysconfdir}/modprobe.conf
%dir %{_sysconfdir}/modprobe.d/
%config(noreplace) %{_sysconfdir}/modprobe.d/*.conf
%_sbindir/*
%_mandir/*/*
%_datadir/bash-completion/completions/kmod
%endif

%files -n %{libname}
%_libdir/libkmod.so.%{major}*

%files -n %{develname}
%_libdir/pkgconfig/libkmod.pc
%_includedir/libkmod.h
%_libdir/*.so
%if %{with dietlibc}
%{_prefix}/lib/dietlibc/lib-%{_arch}/libkmod.a
%endif


%changelog
* Sat Oct 19 2013 umeabot <umeabot> 15-2.mga4
+ Revision: 533401
- Mageia 4 Mass Rebuild

* Thu Aug 29 2013 tv <tv> 15-1.mga4
+ Revision: 472948
- adjust file list
- new release

* Sat Jul 27 2013 tv <tv> 14-2.mga4
+ Revision: 458759
- fix missing be32toh symbol in dietlibc (use ntohl instead)

* Mon Jul 15 2013 tv <tv> 14-1.mga4
+ Revision: 454808
- fix static build
- new release

* Sat Jan 12 2013 umeabot <umeabot> 12-2.mga3
+ Revision: 356313
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Thu Dec 06 2012 tv <tv> 12-1.mga3
+ Revision: 327564
- new release

* Sun Nov 25 2012 tv <tv> 11-1.mga3
+ Revision: 321878
- BR xsltproc
- new release
- drop patch 2 (merged)
- explain patch 1

* Wed Nov 14 2012 blino <blino> 10-4.mga3
+ Revision: 317927
- remove nfs aliases, moved to nfs-utils (from JA Magall?\195?\179n, mga#6918)

* Wed Nov 14 2012 blino <blino> 10-3.mga3
+ Revision: 317923
- do not mount nfsd and rpc_pipefs and module load, now handled by systemd units in nfs-utils (from JA Magall?\195?\179n, mga#6918)

* Tue Oct 02 2012 tv <tv> 10-2.mga3
+ Revision: 302078
- patch 2: makes demod -a respect modules.order with compressed modules (#5833)

* Mon Sep 17 2012 tv <tv> 10-1.mga3
+ Revision: 295283
- rediff patch 1
- new release
- new release

* Tue Jul 24 2012 tv <tv> 9-1.mga3
+ Revision: 273957
- do not hardcode library minor
- new release
- fix source URL

* Sat Jul 21 2012 colin <colin> 8-2.mga3
+ Revision: 273158
- Update for usrmove

* Sun Jun 03 2012 tv <tv> 8-1.mga3
+ Revision: 253641
- fix file list
- new release

* Wed May 02 2012 tmb <tmb> 7-6.mga2
+ Revision: 234546
- symlink /etc/modprobe.conf to /etc/modprobe.d/01_mga-config.conf so kmod picks it up

* Sat Apr 28 2012 colin <colin> 7-5.mga2
+ Revision: 234088
- Move libs/binary to / from /usr (sometimes needed to mount /usr under sysvinit)

* Sun Apr 22 2012 tmb <tmb> 7-4.mga2
+ Revision: 232551
- modprobe: handle -ENOENT return from init_module

* Fri Apr 06 2012 tmb <tmb> 7-3.mga2
+ Revision: 229358
- modprobe: fix typo in config dump: option->options (P0, upstream)

* Fri Apr 06 2012 colin <colin> 7-2.mga2
+ Revision: 229352
- Obsolete module-init-tools

* Mon Mar 19 2012 tmb <tmb> 7-1.mga2
+ Revision: 224364
- update to v 7 (bugfix only release)

  + colin <colin>
    - Fix up links for modprobe and friends (only when built --with tools)

* Sat Mar 03 2012 tmb <tmb> 6-1.mga2
+ Revision: 217196
- drop merged patches (P0100-P0102)
- update to v 6

  + colin <colin>
    - Add a build option to build tools to replace module-init-tools (disabled for now)
    - Add configs from module-init-tools
    - Add upstream patches relating to module-init-tools usage

* Sun Feb 26 2012 tv <tv> 5-2.mga2
+ Revision: 215005
- rebuild with new dietlibc

* Tue Feb 07 2012 tmb <tmb> 5-1.mga2
+ Revision: 205901
- bump major
- drop merged P0, P1
- update to v5

  + tv <tv>
    - package NEWS

* Tue Jan 17 2012 tv <tv> 4-1.mga2
+ Revision: 197530
- new release
- better patch 0 for stat time
- drop patch 2 (no more needed with newer dietlibc)

* Sun Jan 15 2012 tv <tv> 3-7.mga2
+ Revision: 196476
- build dietlibc flavor with xz support

* Sat Jan 14 2012 tv <tv> 3-6.mga2
+ Revision: 196177
- disable debugging in dietlibc build

* Fri Jan 13 2012 tv <tv> 3-5.mga2
+ Revision: 195808
- fix libname
- fix libname

* Fri Jan 13 2012 tv <tv> 3-3.mga2
+ Revision: 195786
- build (& fix build) with dietlibc
- run make test
- disable static library

* Fri Jan 06 2012 tv <tv> 3-2.mga2
+ Revision: 192240
- install kmod-* tools in order to test
- eanble xz compressed modules support
- reeanble zlib support again
- build static library for insaller stage1

* Thu Jan 05 2012 tmb <tmb> 3-1.mga2
+ Revision: 191693
- update to v 3

* Tue Jan 03 2012 tv <tv> 2-2.mga2
+ Revision: 190165
- enable zlib

* Sat Dec 24 2011 tmb <tmb> 2-1.mga2
+ Revision: 187113
- fix libkmod.pc path
- update to version 2
- drop buildroot and defattr

  + tv <tv>
    - fix library license tag
    - imported package kmod


* Sat Dec 17 2011 Thierry Vignaud <thierry.vignaud@gmail.com> 1-1.mga2
- initial release