# template = kernel-common.tmpl %define pfx /opt/freescale/rootfs/%{_target_cpu} %define buildsubdir %{name}-%{version} Summary : Linux kernel (core of the Linux operating system) Name : kernel Version : svn Release : 1 License : GPL Vendor : Logic Product Development Packager : Peter Barada Group : System Environment/Kernel BuildRoot : %{_tmppath}/%{name} Prefix : %{pfx} %Description %{summary} %Prep #set -x if [ ! -d %{buildsubdir} ] then echo "Checking out %{name} source from SCM via SVN" svn co ${KERNEL_REPOSITORY} %{buildsubdir} else if [ "$KERNEL_SCM_SKIP_UPDATE" = "y" ]; then echo "Skipping SVN update of %{name} source" else curr_svn_url=`svn info %{buildsubdir} | grep '^URL:' | sed -e 's/URL: //'` if [ "$curr_svn_url" != "${KERNEL_REPOSITORY}" ]; then echo "SVN URL changed; removing %{name} source directory" echo "Checking out %{name} source from SCM via SVN" rm -rf %{buildsubdir} svn co ${KERNEL_REPOSITORY} %{buildsubdir} else echo "Updating %{name} source from SCM via SVN" cd %{buildsubdir} svn update fi fi fi