⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 swang-poc.spec

📁 coldfire MCF5445X基于unix平台的BSP
💻 SPEC
字号:
%define base %(echo %{_prefix} | sed -e s,/usr.*$,,)%define pfx /opt/freescale/rootfs/%{_target_cpu}%define __os_install_post %{nil}Summary         : Small Wan Gateway Proof of Concept SoftwareName            : swang-pocVersion         : 1.0Release         : 1License         : GPLVendor          : FreescalePackager        : Lee NipperGroup           : Applications/TestSource          : %{name}-%{version}.tar.gzPatch0          : swang-poc-1.0-fix-install.patchBuildRoot       : %{_tmppath}/%{name}Prefix          : %{pfx}%Description%{summary}This package includes the applications and kernel modules forthe Wan Gateway Proof-of-Concept Demonstration S/W.The purpose of this software is to demonstrate port-to-portforwarding by lower level hardware which supports port interworking.This software makes use of an older version of the conntrack-tools fromthis location: http://www.netfilter.org/projects/conntrack-tools/index.htmlNotes:You need to have a built unpacked kernel source tree availablevia $RPM_BUILD_DIR/linux.We build spoofed, so gcc == the cross compiler%Prep%setup%patch0 -p0%Build# Build the kernel modules firstif [ ! -f $RPM_BUILD_DIR/linux/Makefile ]then    cat <<TXTYou need a built unpacked kernel source tree in:$RPM_BUILD_DIR/linux/Makefileto build kernel modulesTXT    exit 1fi# Allow spoofed environment to selected toolchain to take precedence over user environmentexport CROSS_COMPILE=""(cd kernel/ipc; make KERNELDIR=$RPM_BUILD_DIR/linux)(cd kernel/iptables_fsl; make KERNELDIR=$RPM_BUILD_DIR/linux)# Build the applications(cd applications/conntrack; make)(cd applications/ipdaemon; make)%Install# Install the kernel modulesrm -rf $RPM_BUILD_ROOTKVER="`perl -e '$/ = ""; $_ = <>; m,VERSION\s*=\s*(\d)\s*PATCHLEVEL\s*=\s*(\d+)\s*SUBLEVEL\s*=\s*(\d+)\s*,ms; print  "$1.$2.$3$4"' $RPM_BUILD_DIR/linux/Makefile`"mkdir -p $RPM_BUILD_ROOT/%{pfx}/%{base}/lib/modules/$KVER/swang/cp kernel/ipc/*.ko kernel/iptables_fsl/*.ko $RPM_BUILD_ROOT/%{pfx}/%{base}/lib/modules/$KVER/swang/# Install the applications(cd applications/conntrack; make install BIN_DIR=/usr/local/bin DESTDIR=$RPM_BUILD_ROOT/%{pfx})(cd applications/ipdaemon;  make install BIN_DIR=/usr/local/bin DESTDIR=$RPM_BUILD_ROOT/%{pfx})(cd tools;  make install BIN_DIR=/usr/local/bin DESTDIR=$RPM_BUILD_ROOT/%{pfx})%Cleanrm -rf $RPM_BUILD_ROOT%Files%defattr(-,root,root)%{pfx}/*

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -