root/i2c/trunk/RPM/i2c.spec @ 3472

Revision 3472, 2.6 KB (checked in by phil, 13 years ago)

(Phil) Updating Constantine's RPM specs for I2C.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1###The only customizable variables are prefix and kversion.
2###If you have used a custom tug in the vesrion of your
3###kernel rpm, you may need to adjust mversion as well.
4
5###This package IS relocatable (change prefix to relocate).
6
7%define prefix /usr/local
8
9#Distribution vendors who would like to integrate the package should
10#probably use: %define prefix /usr
11
12#WARNING!!! This package must be compiled for the the same kernel that will
13#run on the target machine. This implies the same kernel version and the
14#same kernel configuration. Thus, the binary packages can be provided by
15#distribution vendors only for their stock distribution kernels. If you use
16#a custom configured kernel, you must rebuild this package. To protect the
17#innocent, we define kversion and make the resulting package dependable
18#on the specific version of the kernel.
19
20#Define your kernel version here.
21%define kversion 2.2.14
22%define mversion %{kversion}
23
24#Another example for the above: %define kversion 2.2.14-SMP
25
26%define name kernel-i2c
27%define ver 2.5.0
28Summary: Updated i2c drivers
29Name: %{name}
30Version: %{ver}
31Release: 1
32Group: Base/Kernel
33
34#Latest RedHat distributions define a different Group: Group: System Environment/Kernel
35
36Copyright: GPL
37Source0: http://www.lm-sensors.nu/lm-sensors/archive/i2c-%{ver}.tar.gz
38Buildroot: /var/tmp/%{name}-%{ver}
39Docdir: %{prefix}/doc
40Url: http://www.netroedge.com/~lm78/
41Requires: kernel = %{kversion}
42#The new i2c code has been integrated into kernel 2.3.38
43Conflicts: kernel >= 2.3.38
44
45#For officially distributed packages, please sign below
46#Packager: Lm_sensors Group <lm78@stimpy.netroedge.com>
47
48%description
49This package contains the new i2c code and several bus drivers (algorithm
50and adapter drivers). The chip drivers are not included in this package.
51Most of the chip and bus drivers as well as additional basic code
52for SMBus emulation over i2c are included in the lm_sensors package.
53This package is required if you want to install programs which use the new
54i2c implementation. Lm_sensors and video4linux (latest versions of bttv
55driver) require the new i2c code.
56
57%prep
58%setup -n i2c-%{ver}
59
60%build
61#even for non-SMP systems parallel make will build faster
62make -j4
63
64%install
65rm -rf $RPM_BUILD_ROOT
66make install DESTDIR=$RPM_BUILD_ROOT LINUX_INCLUDE_DIR=%{prefix}/include/linux
67
68%post
69depmod -a || /bin/true
70
71%postun
72depmod -a || /bin/true
73
74%files
75%dir /lib/modules/%{mversion}
76%dir /lib/modules/%{mversion}/misc
77/lib/modules/%{mversion}/misc/*
78%dir %{prefix}/include/linux
79%{prefix}/include/linux/*.h
80%doc doc/* IMPORTANT_CHANGES INSTALL README TODO
81
82%clean
83rm -rf $RPM_BUILD_ROOT
84rm -rf $RPM_BUILD_DIR/i2c-%{ver}
Note: See TracBrowser for help on using the browser.