LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File moxa.spec of Package moxa (Project hardware)

#
# spec file for package moxa
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           moxa
BuildRequires:  dos2unix
BuildRequires:  kernel-source
BuildRequires:  kernel-syms
BuildRequires:  module-init-tools
BuildRequires:  udev
Summary:        Kernel modules for MOXA UPort devices
License:        GPL-2.0
Group:          System/Kernel
%define vers 1.2.5
%define builddate 13040314
Version:        %{vers}_%{builddate}
Release:        0
Source0:        driv_linux_uport_v%{vers}_build_%{builddate}.tgz
Source1:        99-moxa_uport.rules
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://www.moxa.com/support/sarch_result.aspx?type=soft&prod_id=381&type_id=9

%suse_kernel_module_package kdump um

%description
This package contains the kernel modules to support MOXA UPort servers.

%package KMP
Summary:        Kernel modules for MOXA UPort devices
Group:          System/Kernel

%description KMP
This package contains the kernel modules to support MOXA UPort servers.

%prep
%setup -n mxuport
mkdir obj
dos2unix version.txt

%build
for flavor in %flavors_to_build; do
    rm -rf obj/$flavor
    cp -r driver obj/$flavor
    make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
	M=$PWD/obj/$flavor
done

%install
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
    make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \
	 M=$PWD/obj/$flavor
done
mkdir -p %{buildroot}/etc/udev/rules.d
cp %{SOURCE1} %{buildroot}/etc/udev/rules.d/99-moxa_uport.rules.template

%files
%defattr(-,root,root)
%doc readme.txt version.txt
/etc/udev/rules.d/*

%changelog