📄 i2c-rh.spec
字号:
###The only customizable variable is prefix.###This package IS relocatable (change prefix to relocate).%define prefix /usr/local#WARNING!!! This package must be compiled for the the same kernel that will#run on the target machine. This implies the same kernel version and the#same kernel configuration. Thus, the binary packages can be provided by#distribution vendors only for their stock distribution kernels. If you use#a custom configured kernel, you must rebuild this package. To protect the#innocent, we define kversion and make the resulting package dependable#on the specific version of the kernel.#This spec file is good for stock kernels of RedHat based distributions.#If you run a stock smp kernel, the package suitable for smp kernel will be#built.If you run a stock up kernel, the package suitable for up kernel will be#built.#Define your kernel version here. %define kversion %(uname -r)%define name kernel-i2c%define ver 2.8.3Summary: Updated i2c driversName: %{name}Version: %{ver}Release: 1rhGroup: System Environment/KernelCopyright: GPLSource0: http://www.lm-sensors.nu/lm-sensors/archive/i2c-%{ver}.tar.gzBuildroot: /var/tmp/%{name}-%{ver}Docdir: %{prefix}/docUrl: http://www.netroedge.com/~lm78/Requires: kernel = %{kversion}#The new i2c code has been integrated into kernel 2.3.38#For officially distributed packages, please sign belowPackager: Marc Rieffel <marc@paracel.com>Distribution: Rocks 2.3%descriptionThis package contains the new i2c code and several bus drivers (algorithmand adapter drivers). The chip drivers are not included in this package.Most of the chip and bus drivers as well as additional basic codefor SMBus emulation over i2c are included in the lm_sensors package.This package is required if you want to install programs which use the newi2c implementation. Lm_sensors and video4linux (latest versions of bttvdriver) require the new i2c code.%prep%setup -n i2c-%{ver}%buildmake -j4%installrm -rf $RPM_BUILD_ROOTmake install DESTDIR=$RPM_BUILD_ROOT LINUX_INCLUDE_DIR=%{prefix}/include/linux \ MODDIR=/lib/modules/%{kversion}/misc%postdepmod -a || /bin/true%postundepmod -a || /bin/true%files%dir /lib/modules/%{kversion}%dir /lib/modules/%{kversion}/kernel/drivers/i2c/lib/modules/%{kversion}/kernel/drivers/i2c/*%dir %{prefix}/include/linux%{prefix}/include/linux/*.h%doc doc/* IMPORTANT_CHANGES INSTALL README TODO%cleanrm -rf $RPM_BUILD_ROOTrm -rf $RPM_BUILD_DIR/i2c-%{ver}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -