SPECS (AC-branch): kernel24.spec - use sed
glen
glen at pld-linux.org
Sat Apr 12 19:45:57 CEST 2008
Author: glen Date: Sat Apr 12 17:45:57 2008 GMT
Module: SPECS Tag: AC-branch
---- Log message:
- use sed
---- Files affected:
SPECS:
kernel24.spec (1.793.2.11 -> 1.793.2.12)
---- Diffs:
================================================================
Index: SPECS/kernel24.spec
diff -u SPECS/kernel24.spec:1.793.2.11 SPECS/kernel24.spec:1.793.2.12
--- SPECS/kernel24.spec:1.793.2.11 Sat Apr 12 19:39:14 2008
+++ SPECS/kernel24.spec Sat Apr 12 19:45:52 2008
@@ -945,17 +945,16 @@
rm -rf linux
# Remove -g from drivers/atm/Makefile and net/ipsec/Makefile
-echo -e ',s/EXTRA_CFLAGS.*-g//g\n,w' | ed net/ipsec/Makefile
+sed -i -e 's/EXTRA_CFLAGS.*-g//g' net/ipsec/Makefile
# Fix EXTRAVERSION and CC in main Makefile
-#echo -e ',s/EXTRAVERSION =.*/EXTRAVERSION = %{postver}-%{release}/g\n,w' | ed Makefile
-echo -e ',s/EXTRAVERSION =.*/EXTRAVERSION = -%{release}/g\n,w' | ed Makefile
+sed -i -e 's/EXTRAVERSION =.*/EXTRAVERSION = -%{release}/g' Makefile
%ifarch %{ix86} %{x8664} alpha sparc ppc
-echo -e ',s#CC.*$(CROSS_COMPILE)gcc#CC = %{__cc}#g\n,w' | ed Makefile
+sed -i -e 's#CC.*$(CROSS_COMPILE)gcc#CC = %{__cc}#g' Makefile
%endif
%ifarch sparc64
-echo -e ',s#CC.*$(CROSS_COMPILE)gcc#CC = sparc64-pld-linux-gcc#g\n,w' | ed Makefile
-echo -e ',s#sparc64-linux#sparc64-pld-linux#g\n,w' | ed arch/sparc64/Makefile
+sed -i -e 's#CC.*$(CROSS_COMPILE)gcc#CC = sparc64-pld-linux-gcc#g' Makefile
+sed -i -e 's#sparc64-linux#sparc64-pld-linux#g' arch/sparc64/Makefile
%endif
%if %{with um}
@@ -997,8 +996,7 @@
[ "$1" = "BOOT" -o "$2" = "BOOT" ] && BOOT=yes
[ "$1" = "smp" -o "$2" = "smp" ] && smp=yes
# Fix EXTRAVERSION in main Makefile
-# echo -e ",s/EXTRAVERSION =.*/EXTRAVERSION = %{postver}-%{release}$1/g\n,w" | ed Makefile
- echo -e ",s/EXTRAVERSION =.*/EXTRAVERSION = -%{release}$1/g\n,w" | ed Makefile
+ sed -i -e "s/EXTRAVERSION =.*/EXTRAVERSION = -%{release}$1/g" Makefile
%if %{with um}
if [ "$smp" = "yes" ]; then
Config="um-smp"
@@ -1052,8 +1050,8 @@
cat %{SOURCE1001} >> arch/%{base_arch}/defconfig
%ifarch sparc64
- echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
- ed arch/%{base_arch}/defconfig
+ sed -i -e 's/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g' | \
+ arch/%{base_arch}/defconfig
%endif
if [ "$BOOT" = "yes" ] ; then
@@ -1061,8 +1059,8 @@
else
:;
%if %{with grsec}
- echo -e ',s/CONFIG_CRYPTO_SHA256=m/CONFIG_CRYPTO_SHA256=y/g\n,w' | \
- ed arch/%{base_arch}/defconfig
+ sed -i -e 's/CONFIG_CRYPTO_SHA256=m/CONFIG_CRYPTO_SHA256=y/g' | \
+ arch/%{base_arch}/defconfig
cat %{SOURCE1002} >> arch/%{base_arch}/defconfig
%endif
fi
@@ -1071,8 +1069,8 @@
%endif
%ifarch i386 i486
- echo -e ',s/# CONFIG_MATH_EMULATION is not set/CONFIG_MATH_EMULATION=y/g\n,w' | \
- ed arch/%{base_arch}/defconfig
+ sed -i -e 's/# CONFIG_MATH_EMULATION is not set/CONFIG_MATH_EMULATION=y/g' | \
+ arch/%{base_arch}/defconfig
%endif
%{__make} $Opts mrproper
@@ -1156,7 +1154,7 @@
/sbin/depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer -r $KernelVer || echo
}
-KERNEL_BUILD_DIR=`pwd`
+KERNEL_BUILD_DIR=$(pwd)
KERNEL_INSTALL_DIR=$KERNEL_BUILD_DIR-installed
rm -rf $KERNEL_INSTALL_DIR
install -d $KERNEL_INSTALL_DIR
@@ -1170,7 +1168,7 @@
# SMP KERNEL
%{?with_smp:BuildKernel smp}
-%if ! %{with up} && ! %{with smp}
+%if %{without up} && %{without smp}
# We need include/asm created somewhere
%{__make} $Opts symlinks
%endif
@@ -1201,14 +1199,14 @@
install -d $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version}
-KERNEL_BUILD_DIR=`pwd`
+KERNEL_BUILD_DIR=$(pwd)
KERNEL_BUILD_INSTALL=no
%{?with_up:KERNEL_BUILD_INSTALL=yes}
%{?with_smp:KERNEL_BUILD_INSTALL=yes}
[ "$KERNEL_BUILD_INSTALL" = "yes" ] && cp -a $KERNEL_BUILD_DIR-installed/* $RPM_BUILD_ROOT
-for i in "" smp ; do
+for i in "" smp; do
install -d $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i/misc
if [ -e $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i ] ; then
rm -f $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i/build
@@ -1218,8 +1216,7 @@
done
ln -sf linux-%{version} $RPM_BUILD_ROOT%{_prefix}/src/linux-2.4
-#echo -e ',s/EXTRAVERSION =.*/EXTRAVERSION = %{postver}-%{release}/g\n,w' | ed Makefile
-echo -e ',s/EXTRAVERSION =.*/EXTRAVERSION = -%{release}/g\n,w' | ed Makefile
+sed -i -e ',s/EXTRAVERSION =.*/EXTRAVERSION = -%{release}/g' Makefile
%if %{with source}
cp -a . $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version}
%else
@@ -1293,8 +1290,8 @@
%{?with_grsec:cat %{SOURCE1002} >> .config}
%ifarch sparc64
- echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
- ed .config
+ sed -i -e 's/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g' | \
+ .config
%endif
%ifarch %{ix86}
@@ -1341,8 +1338,8 @@
%{?with_grsec:cat %{SOURCE1002} >> .config}
%ifarch sparc64
- echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
- ed .config
+ sed -i -e 's/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g' | \
+ .config
%endif
%ifarch %{ix86}
@@ -1365,7 +1362,6 @@
# well include the depends stuff as well
%{__make} $Opts symlinks
%{__make} $Opts include/linux/version.h
-#%{__make} $Opts "`pwd`/include/linux/modversions.h"
%endif
rm -f include/linux/modversions.h
echo "#include <linux/modsetver.h>" > include/linux/modversions.h
@@ -1375,8 +1371,7 @@
%if %{with source}
%{__make} $Opts depend
-find $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version} -name ".*depend" \
- -exec /bin/sh -c "echo -e \",s|$RPM_BUILD_ROOT||g\n,w\" | ed {}" \;
+find $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version} -name ".*depend" | xargs sed -i -e "s|$RPM_BUILD_ROOT||g"
%{__make} $Opts clean
rm -f scripts/mkdep
@@ -1724,6 +1719,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.793.2.12 2008-04-12 17:45:52 glen
+- use sed
+
Revision 1.793.2.11 2008-04-12 17:39:14 glen
- 2.4.36.2
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/kernel24.spec?r1=1.793.2.11&r2=1.793.2.12&f=u
More information about the pld-cvs-commit
mailing list