ethercat.spec.in
author Florian Pose <fp@igh-essen.com>
Thu, 05 Jan 2012 16:53:08 +0100
branchstable-1.5
changeset 2197 53b92e797e64
parent 1818 deda3dc1d561
child 2421 bc2d4bf9cbe5
permissions -rw-r--r--
Allow gaps between SDO subindices when fetching dictionary.
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
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    43
BuildRequires: %kernel_module_package_buildreqs
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    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
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    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
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    80
    --with-linux-dir=/usr/src/linux-obj/%_target_cpu/default
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    81
make
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    82
mkdir obj
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    83
for flavor in %flavors_to_build; do
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    84
    target=obj/$flavor
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    85
    rm -rf $target
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    86
    mkdir $target
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    87
    cp -r config.h globals.h Kbuild master/ devices/ \
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    88
        examples/ tty/ include/ $target
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    89
    make -C /usr/src/linux-obj/%_target_cpu/$flavor modules M=$PWD/$target
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    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
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    93
for flavor in %flavors_to_build; do
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    94
	md5sum obj/$flavor/Module.symvers
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    95
done
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    96
make DESTDIR=${RPM_BUILD_ROOT} install
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    97
for flavor in %flavors_to_build; do
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    98
    target=obj/$flavor
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
    99
    make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
   100
        M=$PWD/$target INSTALL_MOD_PATH=${RPM_BUILD_ROOT} \
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
   101
        INSTALL_MOD_DIR=ethercat
b0be777fe972 Improved spec file.
Florian Pose <fp@igh-essen.com>
parents: 1810
diff changeset
   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
#----------------------------------------------------------------------------