Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42:branches:home:Tomcat42
moxa-npreal2
moxa-npreal2.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File moxa-npreal2.spec of Package moxa-npreal2
# # spec file for package moxa-npreal2-kmp (Kernel Module Package) # and moxa-npreal2-utils (daemons, init script and other tools) # # TODO: the installation path is hardcoded in the source (nport.h) # for the moment this package ignores the standards and installs in DRIVERPATH %define NPPATH /usr/lib/npreal2 %define DRIVERPATH %{NPPATH}/driver # on SLE12 SP3 the "rc\%{NAME}" does not work..., so we defein it directly %define RCFILE rcmoxa-npreal2 %define UNITFILE moxa-npreal2.service Name: moxa-npreal2 BuildRequires: kernel-syms kmod BuildRequires: binutils BuildRequires: kernel-default BuildRequires: gcc BuildRequires: gawk BuildRequires: gzip BuildRequires: libopenssl-devel BuildRequires: make BuildRequires: openssl-devel License: GPL-2.0 Group: System/Kernel Summary: Driver modules for MOXA NPort Real TTY Version: 5.3 Release: 1%{?dist} #Release: lp155.52.1 Source0: moxa-real-tty-linux-kernel-5.x-driver-v5.3.tgz Source1: npreal2.conf Source2: moxa.conf.modules-load Source3: moxa-npreal2.service Source4: preamble BuildRoot: %{_tmppath}/%{name}-%{version}-build #Url: https://www.moxa.com/Moxa/media/PDIM/S100000200/moxa-nport-5200-series-linux-kernel-3.x.x-driver-v1.19.tgz Recommends: moxa-npreal-utils >= 1.19 %kernel_module_package -x debug -x trace -p %_sourcedir/preamble %description Kernel module for MOXA NPort devices The kernel module handles the /dev/ttyr* device files and needs the moxa-npreal2d daemon provided in the utils package. %package utils Summary: Utils and daemon for MOXA NPort Real TTY driver Group: System/Kernel Requires: moxa-npreal2-kmp >= 1.19 #Url: https://www.moxa.com/Moxa/media/PDIM/S100000200/moxa-nport-5200-series-linux-kernel-3.x.x-driver-v1.19.tgz %description utils systemd service, daemon and cofiguration utils for MOXA NPort Real TTY. The purpose of this driver is to map NPort serial port to host ttyr port Using this driver, you can use NPort serial port as local tty port. this packade needs a adequate kernel module loaded. %prep # the source archive has only the "moxa" directory, so we have to tell setup it's name. %setup -n moxa # we need all the provided files in a "source" dir... set -- * mkdir source mv "$@" source/ # ... and an "obj" dir to build the target. mkdir obj cp %{SOURCE4} source/ %build for flavor in %flavors_to_build; do rm -rf obj/$flavor cp -r source obj/$flavor make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor done # compile moxa configuration tools mkdir -p %{%_builddir}/%{_sysconfdir}/moxa mkdir -p %{%_builddir}/%{_unitdir}/ cp %{SOURCE3} %{%_builddir}/%{_unitdir}/ cp %{SOURCE4} source/ cp %{SOURCE1} source/ ln -s %{_sbindir}/service source/%{RCFILE} make -C source npreal2d npreal2d_redund tools %install mkdir -p %{buildroot}%{_unitdir}/ mkdir -p %{buildroot}%{_sysconfdir}/moxa/ mkdir -p %{buildroot}%{_sbindir} export INSTALL_MOD_PATH=$RPM_BUILD_ROOT export INSTALL_MOD_DIR=updates for flavor in %flavors_to_build; do make -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor done # install moxa configuration programs %{__install} -D -m 0755 source/npreal2d_redund %{buildroot}%{DRIVERPATH}/npreal2d_redund %{__install} -D -m 0755 source/npreal2d %{buildroot}%{DRIVERPATH}/npreal2d %{__install} -D -m 0755 source/%{RCFILE} %{buildroot}%{_sbindir}/%{RCFILE} # install moxa configuration scripts # install moxa configuration file(s) %{__install} -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/moxa/ %{__install} -D -m 0644 source/npreal2d.cf %{buildroot}%{_sysconfdir}/moxa/npreal2d.cf # install modules-load configuration to load module on boot time # for more details see: man modules-load.d %{__install} -D -m 0644 %{SOURCE2} %{buildroot}%{_libexecdir}/modules-load.d/moxa-npreal2.conf # install moxa-npreal2 systemd unit script %{__install} -p -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/ %pre utils %service_add_pre %{UNITFILE} %post utils %service_add_post %{UNITFILE} %postun utils %service_del_postun %{UNITFILE} %preun utils %service_del_preun %{UNITFILE} # Remove npreal2d.log file - the log file should not be placed there # but npreal2d does it, so we have no choice and clean it. Ideally logs should # be placed in something like /var/log. if [ -f %{DRIVERPATH}/npreal2d.log ]; then rm %{DRIVERPATH}/npreal2d.log fi %files utils %defattr(-,root,root) %{_sbindir}/%{RCFILE} %dir %{_sysconfdir}/modprobe.d %config %{_sysconfdir}/modprobe.d/moxa-npreal2.conf %dir %{_sysconfdir}/moxa/ %config %{_sysconfdir}/moxa/npreal2.conf %config %{_sysconfdir}/moxa/npreal2d.cf %{_libexecdir}/modules-load.d/moxa-npreal2.conf %{_unitdir}/moxa-npreal2.service %dir %{NPPATH} %dir %{DRIVERPATH} %{DRIVERPATH}/* %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor