equal
deleted
inserted
replaced
38 |
38 |
39 Provides: @PACKAGE@ |
39 Provides: @PACKAGE@ |
40 Source: %{name}-%{version}.tar.bz2 |
40 Source: %{name}-%{version}.tar.bz2 |
41 BuildRoot: /tmp/%{name}-%{version} |
41 BuildRoot: /tmp/%{name}-%{version} |
42 |
42 |
|
43 BuildRequires: %kernel_module_package_buildreqs |
|
44 |
43 #---------------------------------------------------------------------------- |
45 #---------------------------------------------------------------------------- |
44 # Main Package |
46 # Main Package |
45 #---------------------------------------------------------------------------- |
47 #---------------------------------------------------------------------------- |
46 |
48 |
47 Summary: IgH EtherCAT Master |
49 Summary: IgH EtherCAT Master |
50 %description |
52 %description |
51 This is an open-source EtherCAT master implementation for Linux 2.6. See the |
53 This is an open-source EtherCAT master implementation for Linux 2.6. See the |
52 FEATURES file for a list of features. For more information, see |
54 FEATURES file for a list of features. For more information, see |
53 http://etherlab.org/en/ethercat. |
55 http://etherlab.org/en/ethercat. |
54 |
56 |
55 #---------------------------------------------------------------------------- |
57 %kernel_module_package |
56 # Kernel module package |
|
57 #---------------------------------------------------------------------------- |
|
58 |
|
59 %package kmp-rt |
|
60 |
|
61 Summary: Realtime kernel modules for the EtherCAT master. |
|
62 Group: EtherLab |
|
63 |
|
64 Requires: kernel-rt |
|
65 |
|
66 BuildRequires: kernel-rt-devel |
|
67 BuildRequires: linux-kernel-headers |
|
68 |
|
69 %description kmp-rt |
|
70 This is an open-source EtherCAT master implementation for Linux 2.6. See the |
|
71 FEATURES file for a list of features. For more information, see |
|
72 http://etherlab.org/en/ethercat. |
|
73 |
58 |
74 #---------------------------------------------------------------------------- |
59 #---------------------------------------------------------------------------- |
75 # Development package |
60 # Development package |
76 #---------------------------------------------------------------------------- |
61 #---------------------------------------------------------------------------- |
77 |
62 |
89 |
74 |
90 %prep |
75 %prep |
91 %setup |
76 %setup |
92 |
77 |
93 %build |
78 %build |
94 %configure --enable-tty --enable-generic |
79 %configure --enable-tty --enable-generic \ |
95 make all modules |
80 --with-linux-dir=/usr/src/linux-obj/%_target_cpu/default |
|
81 make |
|
82 mkdir obj |
|
83 for flavor in %flavors_to_build; do |
|
84 target=obj/$flavor |
|
85 rm -rf $target |
|
86 mkdir $target |
|
87 cp -r config.h globals.h Kbuild master/ devices/ \ |
|
88 examples/ tty/ include/ $target |
|
89 make -C /usr/src/linux-obj/%_target_cpu/$flavor modules M=$PWD/$target |
|
90 done |
96 |
91 |
97 %install |
92 %install |
98 make DESTDIR=${RPM_BUILD_ROOT} install modules_install |
93 for flavor in %flavors_to_build; do |
|
94 md5sum obj/$flavor/Module.symvers |
|
95 done |
|
96 make DESTDIR=${RPM_BUILD_ROOT} install |
|
97 for flavor in %flavors_to_build; do |
|
98 target=obj/$flavor |
|
99 make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \ |
|
100 M=$PWD/$target INSTALL_MOD_PATH=${RPM_BUILD_ROOT} \ |
|
101 INSTALL_MOD_DIR=ethercat |
|
102 done |
99 |
103 |
100 %clean |
104 %clean |
101 rm -rf ${RPM_BUILD_ROOT} |
105 rm -rf ${RPM_BUILD_ROOT} |
102 |
106 |
103 %files |
107 %files |
114 /etc/init.d/ethercat |
118 /etc/init.d/ethercat |
115 /etc/sysconfig/ethercat |
119 /etc/sysconfig/ethercat |
116 /usr/bin/ethercat |
120 /usr/bin/ethercat |
117 /usr/lib/libethercat.so* |
121 /usr/lib/libethercat.so* |
118 |
122 |
119 %files kmp-rt |
|
120 %defattr(-,root,root) |
|
121 /lib/modules/*/ethercat/*.ko |
|
122 /usr/share/@PACKAGE@/@LINUX_SYMVERS@ |
|
123 |
|
124 %files devel |
123 %files devel |
125 %defattr(-,root,root) |
124 %defattr(-,root,root) |
126 /usr/include/*.h |
125 /usr/include/*.h |
127 /usr/lib/libethercat.a |
126 /usr/lib/libethercat.a |
128 /usr/lib/libethercat.la |
127 /usr/lib/libethercat.la |