mkdistclean.spec
来自「coldfire MCF5445X基于unix平台的BSP」· SPEC 代码 · 共 63 行
SPEC
63 行
%define pfx /opt/freescale/rootfs/%{_target_cpu}%define __os_install_post %{nil} %define __check_files %{nil}Summary : Package used to clean out ltib rootfsName : mkdistcleanVersion : 1.0Release : 1License : GPLVendor : FreescalePackager : Stuart HughesGroup : Development/System#Source : %{name}-%{version}.tar.bz2BuildRoot : %{_tmppath}/%{name}Prefix : %{pfx}%Description%{summary}%Prep#%setup %Build%Install: ${DEV_IMAGE:?Please set the path to the area to remove}if [ ! -d $DEV_IMAGE ] ; then echo "$DEV_IMAGE is not a directory" exit 1fiif [ $DEV_IMAGE = '/' ] ; then echo "$DEV_IMAGE is not allowed" exit 1fiif [ $EUID = 0 ] ; then echo "root cannot run this" exit 1fiif [ ! -O $DEV_IMAGE ] ; then echo "you are not the owner of $DEV_IMAGE" exit 1firm -rf $RPM_BUILD_ROOTmkdir -p $RPM_BUILD_ROOT/%{pfx}cd $DEV_IMAGE(set +efind -type d -exec mkdir -p $RPM_BUILD_ROOT/%{pfx}/{} \;find . ! -type d -exec touch $RPM_BUILD_ROOT/%{pfx}/{} \;exit 0)mkdir -p $RPM_BUILD_ROOT/%{pfx}/root/.sshtouch $RPM_BUILD_ROOT/%{pfx}/root/.ssh/known_hoststouch $RPM_BUILD_ROOT/%{pfx}/.ash_history%Cleanrm -rf $RPM_BUILD_ROOT%Files%defattr(-,root,root)%{pfx}/.ash_history%{pfx}/*
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?