Группа :: Система/Ядро и оборудование
Пакет: modutils
Главная Изменения Спек Патчи Загрузить Bugs and FR
%define mitver 3.1
%def_enable mit
Name: modutils
Version: 2.4.27
Release: alt6.M24.1
Summary: The kernel module utilities
License: GPL
Group: System/Kernel and hardware
Url: ftp://ftp.kernel.org/pub/linux/utils/kernel/%name/v2.4
ExclusiveOS: Linux
Packager: Sergey Vlasov <vsu at altlinux.ru>
%if_enabled mit
Provides: module-init-tools = %mitver
%endif
Source0: %url/%name-%version.tar.bz2
Source1: %name.macros
Source2: 00kernel.%name
Source4: modules.conf
Source5: modules.5
%if_enabled mit
Source5: http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-%mitver.tar.bz2
%endif
Patch1: %name-2.4.2-rh-prepost.patch
Patch2: %name-2.4.27-rh-owl-syms.patch
Patch3: %name-2.4.27-rh-versions.patch
Patch4: %name-2.4.27-rh-showconfig.patch
Patch11: %name-2.4.27-alt-aliases.patch
Patch12: %name-2.4.27-alt-insmod-GPL.patch
Patch13: %name-2.4.27-alt-modprobe-bL.patch
Patch14: %name-2.4.27-alt-depmod-prtdepend-cut_prefix.patch
Patch15: %name-2.4.27-alt-allowable-licenses.patch
Patch16: %name-2.4.26-alt-kernelversion.patch
Patch18: %name-2.4.25-alt-include.patch
Patch19: %name-2.4.27-alt-insmod-force_load.patch
Patch21: %name-2.4.25-alt-glob-sort.patch
Patch22: %name-2.4.27-deb-alt-fixes.patch
Patch23: %name-2.4.27-alt-warning-stderr.patch
Patch24: %name-2.4.27-owl-warnings.patch
Patch101: module-init-tools-3.1-alt-release-memory.patch
Patch102: module-init-tools-3.1-alt-depmod-check-aliases.patch
Patch103: module-init-tools-3.1-alt-modinfo-legacy.patch
Patch120: %name-2.4.27-alt-mit-combined.patch
Patch121: %name-2.4.27-alt-doc.patch
Requires(post): chkconfig, coreutils
Obsoletes: modules
# due to statically linked utilities
Conflicts: mkinitrd < 1:2.8.0-alt1
# due to %_sysconfdir/%name.d/pcmcia
Conflicts: pcmcia-cs < 0:3.2.4-alt1
# Automatically added by buildreq on Thu Jan 06 2005
BuildRequires: docbook-utils flex zlib-devel
%description
The %name packages includes the module management programs.
Examples of loaded and unloaded modules are device drivers and
filesystems, as well as some other things.
%prep
%if_enabled mit
%setup -q -a 4 -a 5
%else
%setup -q -a4
%endif
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch18 -p1
%patch19 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%if_enabled mit
mv module-init-tools-%mitver module-init-tools
pushd module-init-tools
%patch101 -p1
%patch102 -p1
%patch103 -p1
popd
%patch120 -p1
%patch121 -p1
%endif
find -type f -name \*.orig -delete -print
chmod 755 insmod/kernelversion_*
%build
autoconf
%if_enabled mit
pushd module-init-tools
%configure --enable-zlib CPPFLAGS="-D_COMBINED_MODUTILS_=1"
%make_build combined
pushd doc
docbook2man modinfo.sgml
popd
popd
%endif
%configure \
--enable-zlib \
--with-dynamic-zlib \
--exec_prefix=/
%make_build dep all
bzip2 -9fk ChangeLog
%install
mkdir -p %buildroot/sbin
%makeinstall sbindir=%buildroot/sbin
install -pD -m644 %_sourcedir/%name.macros %buildroot/lib/%name/macros
install -pD -m644 %_sourcedir/modules.conf %buildroot%_sysconfdir/modules.conf
for f in %_sourcedir/00kernel.%name; do
n="${f%%.%name}"
install -pD -m644 "$f" "%buildroot%_sysconfdir/%name.d/${n##*/}"
done
%if_enabled mit
install -pD -m644 module-init-tools/doc/modinfo.8 \
%buildroot%_man8dir/modinfo.8
%endif
ln -snf modules.conf.5 %buildroot%_man5dir/conf.modules.5
install -pm644 %_sourcedir/modules.5 %buildroot%_man5dir/
# Obsoleted by man-pages-2.25.
rm -rf %buildroot%_man2dir
%post
[ $1 -ge 2 ] || exit 0
# Get rid of the old installations on upgrade.
if [ -x %_initdir/kerneld ]; then
/sbin/chkconfig --del kerneld
fi
if [ -e %_sysconfdir/conf.modules -a ! -e %_sysconfdir/modules.conf ]; then
%__mv -f %_sysconfdir/conf.modules %_sysconfdir/modules.conf
fi
/sbin/depmod -A ||:
%files
%config(noreplace) %_sysconfdir/modules.conf
%config %_sysconfdir/%name.d
/lib/%name
/sbin/*
%_mandir/man?/*
%doc README CREDITS TODO ChangeLog.bz2 example/kallsyms.c include/kallsyms.h
%changelog
…
Полный changelog можно просмотреть здесь
%def_enable mit
Name: modutils
Version: 2.4.27
Release: alt6.M24.1
Summary: The kernel module utilities
License: GPL
Group: System/Kernel and hardware
Url: ftp://ftp.kernel.org/pub/linux/utils/kernel/%name/v2.4
ExclusiveOS: Linux
Packager: Sergey Vlasov <vsu at altlinux.ru>
%if_enabled mit
Provides: module-init-tools = %mitver
%endif
Source0: %url/%name-%version.tar.bz2
Source1: %name.macros
Source2: 00kernel.%name
Source4: modules.conf
Source5: modules.5
%if_enabled mit
Source5: http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-%mitver.tar.bz2
%endif
Patch1: %name-2.4.2-rh-prepost.patch
Patch2: %name-2.4.27-rh-owl-syms.patch
Patch3: %name-2.4.27-rh-versions.patch
Patch4: %name-2.4.27-rh-showconfig.patch
Patch11: %name-2.4.27-alt-aliases.patch
Patch12: %name-2.4.27-alt-insmod-GPL.patch
Patch13: %name-2.4.27-alt-modprobe-bL.patch
Patch14: %name-2.4.27-alt-depmod-prtdepend-cut_prefix.patch
Patch15: %name-2.4.27-alt-allowable-licenses.patch
Patch16: %name-2.4.26-alt-kernelversion.patch
Patch18: %name-2.4.25-alt-include.patch
Patch19: %name-2.4.27-alt-insmod-force_load.patch
Patch21: %name-2.4.25-alt-glob-sort.patch
Patch22: %name-2.4.27-deb-alt-fixes.patch
Patch23: %name-2.4.27-alt-warning-stderr.patch
Patch24: %name-2.4.27-owl-warnings.patch
Patch101: module-init-tools-3.1-alt-release-memory.patch
Patch102: module-init-tools-3.1-alt-depmod-check-aliases.patch
Patch103: module-init-tools-3.1-alt-modinfo-legacy.patch
Patch120: %name-2.4.27-alt-mit-combined.patch
Patch121: %name-2.4.27-alt-doc.patch
Requires(post): chkconfig, coreutils
Obsoletes: modules
# due to statically linked utilities
Conflicts: mkinitrd < 1:2.8.0-alt1
# due to %_sysconfdir/%name.d/pcmcia
Conflicts: pcmcia-cs < 0:3.2.4-alt1
# Automatically added by buildreq on Thu Jan 06 2005
BuildRequires: docbook-utils flex zlib-devel
%description
The %name packages includes the module management programs.
Examples of loaded and unloaded modules are device drivers and
filesystems, as well as some other things.
%prep
%if_enabled mit
%setup -q -a 4 -a 5
%else
%setup -q -a4
%endif
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch18 -p1
%patch19 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%if_enabled mit
mv module-init-tools-%mitver module-init-tools
pushd module-init-tools
%patch101 -p1
%patch102 -p1
%patch103 -p1
popd
%patch120 -p1
%patch121 -p1
%endif
find -type f -name \*.orig -delete -print
chmod 755 insmod/kernelversion_*
%build
autoconf
%if_enabled mit
pushd module-init-tools
%configure --enable-zlib CPPFLAGS="-D_COMBINED_MODUTILS_=1"
%make_build combined
pushd doc
docbook2man modinfo.sgml
popd
popd
%endif
%configure \
--enable-zlib \
--with-dynamic-zlib \
--exec_prefix=/
%make_build dep all
bzip2 -9fk ChangeLog
%install
mkdir -p %buildroot/sbin
%makeinstall sbindir=%buildroot/sbin
install -pD -m644 %_sourcedir/%name.macros %buildroot/lib/%name/macros
install -pD -m644 %_sourcedir/modules.conf %buildroot%_sysconfdir/modules.conf
for f in %_sourcedir/00kernel.%name; do
n="${f%%.%name}"
install -pD -m644 "$f" "%buildroot%_sysconfdir/%name.d/${n##*/}"
done
%if_enabled mit
install -pD -m644 module-init-tools/doc/modinfo.8 \
%buildroot%_man8dir/modinfo.8
%endif
ln -snf modules.conf.5 %buildroot%_man5dir/conf.modules.5
install -pm644 %_sourcedir/modules.5 %buildroot%_man5dir/
# Obsoleted by man-pages-2.25.
rm -rf %buildroot%_man2dir
%post
[ $1 -ge 2 ] || exit 0
# Get rid of the old installations on upgrade.
if [ -x %_initdir/kerneld ]; then
/sbin/chkconfig --del kerneld
fi
if [ -e %_sysconfdir/conf.modules -a ! -e %_sysconfdir/modules.conf ]; then
%__mv -f %_sysconfdir/conf.modules %_sysconfdir/modules.conf
fi
/sbin/depmod -A ||:
%files
%config(noreplace) %_sysconfdir/modules.conf
%config %_sysconfdir/%name.d
/lib/%name
/sbin/*
%_mandir/man?/*
%doc README CREDITS TODO ChangeLog.bz2 example/kallsyms.c include/kallsyms.h
%changelog
…
Полный changelog можно просмотреть здесь