author | Florian Pose <fp@igh-essen.com> |
Sun, 02 May 2010 08:03:05 +0200 | |
changeset 1919 | df2b21f15939 |
parent 1818 | deda3dc1d561 |
child 2421 | bc2d4bf9cbe5 |
permissions | -rw-r--r-- |
1810
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
1 |
#---------------------------------------------------------------------------- |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
2 |
# |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
3 |
# $Id$ |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
4 |
# |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
5 |
# Copyright (C) 2006-2010 Florian Pose, Ingenieurgemeinschaft IgH |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
6 |
# |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
7 |
# This file is part of the IgH EtherCAT Master. |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
8 |
# |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
9 |
# The IgH EtherCAT Master is free software; you can redistribute it and/or |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
10 |
# modify it under the terms of the GNU General Public License version 2, as |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
11 |
# published by the Free Software Foundation. |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
12 |
# |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
13 |
# The IgH EtherCAT Master is distributed in the hope that it will be useful, |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
14 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
15 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
16 |
# Public License for more details. |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
17 |
# |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
18 |
# You should have received a copy of the GNU General Public License along |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
19 |
# with the IgH EtherCAT Master; if not, write to the Free Software |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
20 |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
21 |
# |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
22 |
# --- |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
23 |
# |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
24 |
# The license mentioned above concerns the source code only. Using the |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
25 |
# EtherCAT technology and brand is only permitted in compliance with the |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
26 |
# industrial property and similar rights of Beckhoff Automation GmbH. |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
27 |
# |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
28 |
# vim: tw=78 |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
29 |
# |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
30 |
#---------------------------------------------------------------------------- |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
31 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
32 |
Name: @PACKAGE@ |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
33 |
Version: @VERSION@ |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
34 |
Release: 1 |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
35 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
36 |
License: GPL |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
37 |
URL: http://etherlab.org/en/ethercat |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
38 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
39 |
Provides: @PACKAGE@ |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
40 |
Source: %{name}-%{version}.tar.bz2 |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
41 |
BuildRoot: /tmp/%{name}-%{version} |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
42 |
|
1816 | 43 |
BuildRequires: %kernel_module_package_buildreqs |
44 |
||
1810
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
45 |
#---------------------------------------------------------------------------- |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
46 |
# Main Package |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
47 |
#---------------------------------------------------------------------------- |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
48 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
49 |
Summary: IgH EtherCAT Master |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
50 |
Group: EtherLab |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
51 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
52 |
%description |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
53 |
This is an open-source EtherCAT master implementation for Linux 2.6. See the |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
54 |
FEATURES file for a list of features. For more information, see |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
55 |
http://etherlab.org/en/ethercat. |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
56 |
|
1816 | 57 |
%kernel_module_package |
1810
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
58 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
59 |
#---------------------------------------------------------------------------- |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
60 |
# Development package |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
61 |
#---------------------------------------------------------------------------- |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
62 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
63 |
%package devel |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
64 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
65 |
Summary: Development files for applications that use the EtherCAT master. |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
66 |
Group: EtherLab |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
67 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
68 |
%description devel |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
69 |
This is an open-source EtherCAT master implementation for Linux 2.6. See the |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
70 |
FEATURES file for a list of features. For more information, see |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
71 |
http://etherlab.org/en/ethercat. |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
72 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
73 |
#---------------------------------------------------------------------------- |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
74 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
75 |
%prep |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
76 |
%setup |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
77 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
78 |
%build |
1818
deda3dc1d561
Added e100 to specfile config.
Florian Pose <fp@igh-essen.com>
parents:
1816
diff
changeset
|
79 |
%configure --enable-tty --enable-generic --enable-e100 \ |
1816 | 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 |
|
1810
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
91 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
92 |
%install |
1816 | 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 |
|
1810
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
103 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
104 |
%clean |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
105 |
rm -rf ${RPM_BUILD_ROOT} |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
106 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
107 |
%files |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
108 |
%defattr(-,root,root) |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
109 |
%doc AUTHORS |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
110 |
%doc COPYING |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
111 |
%doc COPYING.LESSER |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
112 |
%doc ChangeLog |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
113 |
%doc FEATURES |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
114 |
%doc INSTALL |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
115 |
%doc NEWS |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
116 |
%doc README |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
117 |
%doc README.EoE |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
118 |
/etc/init.d/ethercat |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
119 |
/etc/sysconfig/ethercat |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
120 |
/usr/bin/ethercat |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
121 |
/usr/lib/libethercat.so* |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
122 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
123 |
%files devel |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
124 |
%defattr(-,root,root) |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
125 |
/usr/include/*.h |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
126 |
/usr/lib/libethercat.a |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
127 |
/usr/lib/libethercat.la |
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
128 |
|
a352f3e4f95d
Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
129 |
#---------------------------------------------------------------------------- |