1 Star 0 Fork 11

脚踏实地/ethercat-igh

forked from src-openEuler/ethercat-igh 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ethercat-igh.spec 3.58 KB
一键复制 编辑 原始数据 按行查看 历史
wobuchiyu 提交于 2023-02-22 17:23 +08:00 . 1,add ethercat-igh-xeno-00.patch
Name: ethercat-igh
Version: 1.5.2
Release: 5
Summary: IgH EtherCAT Master for Linux
License: LGPLv2.1
Group: Development/Other
Url: https://www.etherlab.org/en/ethercat/index.php
Source0: ethercat-%{version}.tar.bz2
Packager: Anton Midyukov <[email protected]>
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: patchelf
BuildRequires: kernel-headers, kernel-devel
Patch0: ethercat-igh-xeno-00.patch
%description
This is an open-source EtherCAT master implementation for Linux.
%prep
%setup -q -n ethercat-%{version}
%patch0 -p1
CPPFLAGS="${CPPFLAGS} -Doff64_t=__off64_t";export CPPFLAGS;
./bootstrap
arch=`arch`
enable_cycles_value="no"
if [ $arch == "x86_64" ] ; then
enable_cycles_value="yes"
fi
echo $enable_cycles_value
%configure --with-linux-dir=/usr/src/kernels/`ls /usr/src/kernels/ | awk -F' ' '{ print $1 }' | sed -n '1p'` --enable-generic=yes --enable-8139too=no --enable-e100=no --enable-e1000=no --enable-ccat=no --enable-igb=no --enable-debug-if=no --enable-eoe=yes --enable-cycles=$enable_cycles_value --enable-hrtimer=yes --enable-regalias=yes --enable-tool=yes --enable-userlib=yes --enable-tty=no --enable-wildcards=yes --enable-sii-assign=yes --enable-wildcards=yes --enable-static --enable-shared
%build
%make_build
make modules
%install
make modules_install INSTALL_MOD_PATH=${RPM_BUILD_ROOT} INSTALL_MOD_DIR=ethercat
mkdir -p $RPM_BUILD_ROOT/usr/include/
install -c -m 644 include/ecrt.h include/ectty.h $RPM_BUILD_ROOT/usr/include/
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -c script/init.d/ethercat $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
install -c -m 644 script/sysconfig/ethercat $RPM_BUILD_ROOT/etc/sysconfig
install -c -m 644 script/ethercat.conf $RPM_BUILD_ROOT/etc
mkdir -p $RPM_BUILD_ROOT/sbin
install -c script/ethercatctl $RPM_BUILD_ROOT/sbin
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
install -c script/ethercat.service $RPM_BUILD_ROOT/lib/systemd/system
mkdir -p $RPM_BUILD_ROOT/bin
install -c tool/ethercat $RPM_BUILD_ROOT/bin/
install -c mailbox_gateway/ethercat_mbg $RPM_BUILD_ROOT/bin/
mkdir -p $RPM_BUILD_ROOT/usr/lib64
install -c lib/.libs/libethercat.so.1.1.0 $RPM_BUILD_ROOT/usr/lib64/libethercat.so.1.1.0
install -c lib/.libs/libethercat.la $RPM_BUILD_ROOT/usr/lib64/libethercat.la
install -c lib/.libs/libethercat.a $RPM_BUILD_ROOT/usr/lib64/libethercat.a
chmod 644 $RPM_BUILD_ROOT/usr/lib64/libethercat.a
ranlib $RPM_BUILD_ROOT/usr/lib64/libethercat.a
(cd $RPM_BUILD_ROOT/usr/lib64 && { ln -s -f libethercat.so.1.1.0 libethercat.so.1 || { rm -f libethercat.so.1 && ln -s libethercat.so.1.1.0 libethercat.so.1; }; })
(cd $RPM_BUILD_ROOT/usr/lib64 && patchelf --set-soname libethercat.so.1 libethercat.so.1.1.0)
(cd $RPM_BUILD_ROOT/usr/lib64 && { ln -s -f libethercat.so.1.1.0 libethercat.so || { rm -f libethercat.so && ln -s libethercat.so.1.1.0 libethercat.so; }; })
%postun
kerName2=`uname -r`
if [ -d /lib/modules/$kerName2/ethercat_gpos ]
then
rm /lib/modules/$kerName2/ethercat_gpos -rf
fi
if [ -d /lib/modules/ethercat_gpos ]
then
rm /lib/modules/ethercat_gpos -rf
fi
depmod -a
%files
/bin/ethercat
/bin/ethercat_mbg
/etc/ethercat.conf
/etc/init.d/ethercat
/etc/sysconfig/ethercat
/lib/systemd/system/ethercat.service
/sbin/ethercatctl
/usr/include/ecrt.h
/usr/include/ectty.h
/usr/lib64/libethercat.so.1.1.0
/usr/lib64/libethercat.la
/usr/lib64/libethercat.a
/usr/lib64/libethercat.so
/usr/lib64/libethercat.so.1
%exclude /lib/modules/*/modules.*
/lib/modules/*/ethercat/*
%changelog
* Wed Feb 22 2023 zhangyuanhang <[email protected]> - 1.5.2-5
- add ethercat-igh-xeno-00.patch
- remove 8139too,e100,e1000,ccat,igb
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chengzhixingnihao/ethercat-igh.git
[email protected]:chengzhixingnihao/ethercat-igh.git
chengzhixingnihao
ethercat-igh
ethercat-igh
master

搜索帮助