⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mkspec

📁 linux 内核源代码
💻
字号:
#!/bin/sh##	Output a simple RPM spec file that uses no fancy features requring#	RPM v4. This is intended to work with any RPM distro.##	The only gothic bit here is redefining install_post to avoid#	stripping the symbols from files in the kernel which we want##	Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>## how we were called determines which rpms we build and how we build themif [ "$1" = "prebuilt" ]; then	PREBUILT=trueelse	PREBUILT=falsefi# starting to output the specif [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then	PROVIDES=kernel-drmfiPROVIDES="$PROVIDES kernel-$KERNELRELEASE"__KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-//g"`echo "Name: kernel"echo "Summary: The Linux Kernel"echo "Version: $__KERNELRELEASE"# we need to determine the NEXT version number so that uname and# rpm -q will agreeecho "Release: `. $srctree/scripts/mkversion`"echo "License: GPL"echo "Group: System Environment/Kernel"echo "Vendor: The Linux Community"echo "URL: http://www.kernel.org"if ! $PREBUILT; thenecho "Source: kernel-$__KERNELRELEASE.tar.gz"fiecho "BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root"echo "Provides: $PROVIDES"echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :"echo "%define debug_package %{nil}"echo ""echo "%description"echo "The Linux Kernel, the operating system core itself"echo ""if ! $PREBUILT; thenecho "%prep"echo "%setup -q"echo ""fiecho "%build"if ! $PREBUILT; thenecho "make clean && make %{_smp_mflags}"echo ""fiecho "%install"echo "%ifarch ia64"echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules'echo "%else"echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules'echo "%endif"echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install'echo "%ifarch ia64"echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE"echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/"echo "%else"echo "%ifarch ppc64"echo "cp vmlinux arch/powerpc/boot"echo "cp arch/powerpc/boot/"'$KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"echo "%else"echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"echo "%endif"echo "%endif"echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE"echo ""echo "%clean"echo '#echo -rf $RPM_BUILD_ROOT'echo ""echo "%files"echo '%defattr (-, root, root)'echo "%dir /lib/modules"echo "/lib/modules/$KERNELRELEASE"echo "/boot/*"echo ""

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -