[packages/chromium-browser/DEVEL] discard src subdir from tarball

glen glen at pld-linux.org
Sun Mar 17 16:07:33 CET 2013


commit 75f96a390b9617266ab29aa08955a84333253024
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Mar 17 17:07:05 2013 +0200

    discard src subdir from tarball

 chromium-browser.spec | 56 +++++++++++++++++++++++----------------------------
 get-source.sh         |  8 +++-----
 nacl-no-untar.patch   |  4 ++--
 3 files changed, 30 insertions(+), 38 deletions(-)
---
diff --git a/chromium-browser.spec b/chromium-browser.spec
index 955af37..4b19154 100644
--- a/chromium-browser.spec
+++ b/chromium-browser.spec
@@ -3,7 +3,7 @@
 %bcond_without	cups			# with cups
 %bcond_without	debuginfo		# disable debuginfo creation (it is huge)
 %bcond_without	gconf			# with GConf
-%bcond_without	kerberos		# build with kerberos support (dlopened if support compiled, library names in src/net/http/http_auth_gssapi_posix.cc)
+%bcond_without	kerberos		# build with kerberos support (dlopened if support compiled, library names in net/http/http_auth_gssapi_posix.cc)
 %bcond_without	keyring 		# with keyring support (gnome-keyring dlopened, kwalletd via dbus)
 %bcond_with		gps 			# with gps support (linked), if enabled must use exactly same gpsd as shm structures may change leading to unexpected results (crash)
 %bcond_without	libjpegturbo	# use libjpeg-turbo features
@@ -74,7 +74,7 @@ Version:	%{branch}.%{patchver}
 %else
 Version:	%{branch}.%{basever}
 %endif
-Release:	0.33
+Release:	0.34
 License:	BSD, LGPL v2+ (ffmpeg)
 Group:		X11/Applications/Networking
 Source0:	http://carme.pld-linux.org/~glen/chromium-browser/src/beta/%{name}-%{branch}.%{basever}.tar.gz
@@ -254,37 +254,36 @@ cd %{name}-%{branch}.%{basever}
 %patch0 -p1
 cd ..
 %endif
-mv %{name}-%{branch}.%{basever}/src .
+mv %{name}-%{branch}.%{basever}/* .
 
 # Google's versioning is interesting. They never reset "BUILD", which is how we jumped
 # from 3.0.201.0 to 4.0.202.0 as they moved to a new major branch
-. ./src/chrome/VERSION
+. ./chrome/VERSION
 ver=$MAJOR.$MINOR.$BUILD.$PATCH
 test "$ver" = %{version}
 
-gyp_rev=$(grep googlecode_url.*gyp src/DEPS | cut -d'"' -f6 | cut -d@ -f2)
+gyp_rev=$(grep googlecode_url.*gyp DEPS | cut -d'"' -f6 | cut -d@ -f2)
 test "$gyp_rev" = %{gyp_rev} || :
 
-v8_ver=$(awk 'NR=1 {print $NF; exit}' src/v8/ChangeLog || :)
+v8_ver=$(awk 'NR=1 {print $NF; exit}' v8/ChangeLog || :)
 
 # add chromium and pld to useragent
 %define pld_version %(echo %{pld_release} | sed -e 'y/[at]/[AT]/')
 sed -e 's/@BUILD_DIST@/PLD %{pld_version}/g' \
 	-e 's/@BUILD_DIST_NAME@/PLD/g' \
 	-e 's/@BUILD_DIST_VERSION@/%{pld_version}/g' \
-	< %{PATCH8} | %{__patch} -p1
+	< %{PATCH8} | %{__patch} -p2
 
 %{__sed} -e 's, at localedir@,%{_libdir}/%{name},' %{SOURCE5} > find-lang.sh
-ln -s %{SOURCE7} src
-
-%patch1 -p1
-%patch3 -p1
-%patch4 -p1
-%patch6 -p1
-%patch7 -p1
-%patch10 -p1
-%patch15 -p1
-cd src
+ln -s %{SOURCE7} .
+
+%patch1 -p2
+%patch3 -p2
+%patch4 -p3
+%patch6 -p2
+%patch7 -p2
+%patch10 -p2
+%patch15 -p2
 %patch9 -p0
 #%patch2 -p1
 %{!?with_libjpegturbo:%patch11 -p0}
@@ -293,14 +292,11 @@ cd src
 %patch19 -p2
 %patch27 -p1
 %patch28 -p1
-cd ..
-%patch25 -p1
-%patch18 -p1
-%patch24 -p1
-%patch26 -p1
-%patch29 -p1
-
-cd src
+%patch25 -p2
+%patch18 -p2
+%patch24 -p2
+%patch26 -p2
+%patch29 -p2
 
 sh -x clean-source.sh \
 	%{!?with_nacl:nacl=0} \
@@ -314,8 +310,6 @@ sh -x clean-source.sh \
 	%{nil}
 
 %build
-cd src
-
 %if %{with nacl}
 rm -rf native_client/toolchain/linux_x86_newlib
 if [ ! -d native_client/toolchain/linux_x86_newlib ]; then
@@ -360,7 +354,7 @@ test -e Makefile || \
 	CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
 %{__python} build/gyp_chromium \
 	--format=make \
-	-Goutput_dir=../out \
+	--depth=. \
 	build/all.gyp \
 %ifarch %{ix86}
 	-Dtarget_arch=ia32 \
@@ -445,7 +439,7 @@ test -e Makefile || \
 	CXX.host="%{__cxx}" \
 	LDFLAGS.host="%{rpmldflags} -fuse-ld=gold" \
 
-cd ../out/%{!?debug:Release}%{?debug:Debug}
+cd out/%{!?debug:Release}%{?debug:Debug}
 MANWIDTH=80 man ./chrome.1 > man.out
 %{__sed} -e '1,/OPTIONS/d; /ENVIRONMENT/,$d' man.out > options.txt
 
@@ -491,7 +485,7 @@ install -p nacl_irt_x86_32.nexe $RPM_BUILD_ROOT%{_libdir}/%{name}
 
 cd -
 
-for icon in src/chrome/app/theme/chromium/product_logo_[0-9]*.png; do
+for icon in chrome/app/theme/chromium/product_logo_[0-9]*.png; do
 	size=${icon##*/product_logo_}
 	size=${size%.png}
 
@@ -529,7 +523,7 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc src/{AUTHORS,LICENSE}
+%doc AUTHORS LICENSE
 %{_browserpluginsconfdir}/browsers.d/%{name}.*
 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
 %dir %{_sysconfdir}/%{name}
diff --git a/get-source.sh b/get-source.sh
index 9e78c7c..daeb5ea 100755
--- a/get-source.sh
+++ b/get-source.sh
@@ -55,15 +55,13 @@ set -x
 	# repackage cleaned up tarball
 	test -d $PACKAGE_NAME-$VERSION || {
 		tar xvf $srctarball
-		install -d $PACKAGE_NAME-$VERSION
-		# relocate to src dir (needed to workaround some gyp bug)
-		mv chromium-$VERSION $PACKAGE_NAME-$VERSION/src
+		mv chromium-$VERSION $PACKAGE_NAME-$VERSION
 	}
 
 	ls -lh $srctarball
 	rm $srctarball
 
-	cd $PACKAGE_NAME-$VERSION/src
+	cd $PACKAGE_NAME-$VERSION
 	du -sh .
 
 	awk 'NR=1 {print $NF; exit}' v8/ChangeLog | tee -a v8.txt
@@ -81,7 +79,7 @@ set -x
 	svnver=$(wget -qO - "$CHANNELS_URL?os=linux&channel=$CHANNEL" | awk -F, 'NR > 1{print $8}')
 	echo "$svnver" > build/LASTCHANGE.in
 
-	cd ../..
+	cd ..
 
 	tarball=$PACKAGE_NAME-$VERSION.tar.$EXT
 	# xz -9 OOM's on carme
diff --git a/nacl-no-untar.patch b/nacl-no-untar.patch
index e9ad5c6..a53953c 100644
--- a/nacl-no-untar.patch
+++ b/nacl-no-untar.patch
@@ -1,5 +1,5 @@
---- chromium-browser-24.0.1312.14/./src/native_client/build/untrusted.gypi~	2012-11-14 04:37:51.000000000 +0200
-+++ chromium-browser-24.0.1312.14/./src/native_client/build/untrusted.gypi	2012-11-16 22:01:20.476042441 +0200
+--- chromium-browser-24.0.1312.14/src/native_client/build/untrusted.gypi~	2012-11-14 04:37:51.000000000 +0200
++++ chromium-browser-24.0.1312.14/src/native_client/build/untrusted.gypi	2012-11-16 22:01:20.476042441 +0200
 @@ -162,7 +162,7 @@
                   'action': [
                     '>(python_exe)',
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/chromium-browser.git/commitdiff/75f96a390b9617266ab29aa08955a84333253024



More information about the pld-cvs-commit mailing list