7079362 removing CDDL from copies of source/text files delivered to the binary product - part2
authorjenda
Wed, 24 Aug 2011 22:46:04 +0200
changeset 707 dfbe6c035259
parent 706 ca594d31f781
child 708 c1db635f814b
7079362 removing CDDL from copies of source/text files delivered to the binary product - part2
iiim/build/build-install.sh
specs/ibus.spec
specs/imf-selector.spec
--- a/iiim/build/build-install.sh	Sat Aug 27 04:34:21 2011 +0900
+++ b/iiim/build/build-install.sh	Wed Aug 24 22:46:04 2011 +0200
@@ -100,7 +100,8 @@
 
 [ -d  ${RPM_BUILD_ROOT}/etc/X11/xinit/imf.d ] \
       || mkdir -p  ${RPM_BUILD_ROOT}/etc/X11/xinit/imf.d
-cp $BUILDROOT/imf_0020.iiim ${RPM_BUILD_ROOT}//etc/X11/xinit/imf.d/0020.iiim
+# filter out CDDL licence
+perl -ne 'print unless /CDDL HEADER START/ .. /CDDL HEADER END/' < $BUILDROOT/imf_0020.iiim > ${RPM_BUILD_ROOT}//etc/X11/xinit/imf.d/0020.iiim
 
 cd program/iiim-keyboard
 cp dist/VKB.jar $RPM_BUILD_ROOT/usr/lib/iiim/VKB.jar
--- a/specs/ibus.spec	Sat Aug 27 04:34:21 2011 +0900
+++ b/specs/ibus.spec	Wed Aug 24 22:46:04 2011 +0200
@@ -145,6 +145,9 @@
 find ${RPM_BUILD_ROOT} -name "*.a" -exec rm  {} \; -print
 find ${RPM_BUILD_ROOT} -name "*.la" -exec rm {} \; -print
 
+# removing CDDL from copies of source/text files delivered to the binary product
+(cd ${RPM_BUILD_ROOT}; ggrep -rlF 'CDDL HEADER START' . 2>/dev/null|xargs perl -i -ne 'print unless /CDDL HEADER START/ .. /CDDL HEADER END/')
+
 %post
 %include update-gtk-immodules.script
 
--- a/specs/imf-selector.spec	Sat Aug 27 04:34:21 2011 +0900
+++ b/specs/imf-selector.spec	Wed Aug 24 22:46:04 2011 +0200
@@ -43,6 +43,8 @@
 %install
 rm -rf ${RPM_BUILD_ROOT}
 DESTDIR=${RPM_BUILD_ROOT} make install
+# removing CDDL from copies of source/text files delivered to the binary product
+(cd ${RPM_BUILD_ROOT}; ggrep -rlF 'CDDL HEADER START' . 2>/dev/null|xargs perl -i -ne 'print unless /CDDL HEADER START/ .. /CDDL HEADER END/')
 
 #%post