On Sun, Mar 18, 2018 at 11:39:22PM +0100, Steinar H. Gunderson wrote:
> As mentioned on pkg-chromium-browser@, it would be useful if chromium-browser
> shipped a chromium-browser source package; it would allow packaging and 
> building
> CEF (Chromium Embedded Framework) against Debian's (patched) sources instead 
> of
> off some random git checkout. I've added a patch.

Patch updated for Chromium 66 (trivial; really just unfuzzed).

There's an issue in that chromium/BUILD.gn:749 has an assignment which
according to gn “had no effect”, though.

/* Steinar */
-- 
Homepage: https://www.sesse.net/
diff -Nru chromium-browser-66.0.3359.117/debian/changelog chromium-browser-66.0.3359.117/debian/changelog
--- chromium-browser-66.0.3359.117/debian/changelog	2018-04-26 03:27:39.000000000 +0200
+++ chromium-browser-66.0.3359.117/debian/changelog	2018-04-28 18:15:53.000000000 +0200
@@ -1,3 +1,10 @@
+chromium-browser (66.0.3359.117-1+nmu1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add a chromium-source binary package. 
+
+ -- Steinar H. Gunderson <se...@debian.org>  Sat, 28 Apr 2018 18:15:53 +0200
+
 chromium-browser (66.0.3359.117-1) unstable; urgency=medium
 
   * New upstream stable release.
diff -Nru chromium-browser-66.0.3359.117/debian/chromium-source.install chromium-browser-66.0.3359.117/debian/chromium-source.install
--- chromium-browser-66.0.3359.117/debian/chromium-source.install	1970-01-01 01:00:00.000000000 +0100
+++ chromium-browser-66.0.3359.117/debian/chromium-source.install	2018-04-28 18:14:18.000000000 +0200
@@ -0,0 +1,3 @@
+out/chromium-src.tar.xz /usr/src/chromium
+out/chromium-src.flags /usr/src/chromium
+
diff -Nru chromium-browser-66.0.3359.117/debian/control chromium-browser-66.0.3359.117/debian/control
--- chromium-browser-66.0.3359.117/debian/control	2018-04-23 01:48:23.000000000 +0200
+++ chromium-browser-66.0.3359.117/debian/control	2018-04-28 18:14:18.000000000 +0200
@@ -189,3 +189,12 @@
  .
  This package contains resources that are in common to different chromium
  packages.
+
+Package: chromium-source
+Architecture: all
+Recommends: xz-utils
+Description: web browser - source code
+ Web browser that aims to build a safer, faster, and more stable internet
+ browsing experience.
+ .
+ This package contains the patched source code used to build the packages.
diff -Nru chromium-browser-66.0.3359.117/debian/rules chromium-browser-66.0.3359.117/debian/rules
--- chromium-browser-66.0.3359.117/debian/rules	2018-04-09 00:07:41.000000000 +0200
+++ chromium-browser-66.0.3359.117/debian/rules	2018-04-28 18:14:18.000000000 +0200
@@ -129,6 +129,14 @@
 	./out/Release/gn gen out/Release --args="$(defines)"
 	ninja -j$(njobs) -C out/Release packed_resources
 	rm -f out/Release/locales/en-US.pak
+	echo "$(defines)" | sed 's/host_cpu=[^ ]*//' > $(CURDIR)/out/chromium-src.flags
+	find . '(' -path ./debian -or -path ./out ')' -prune -or -print0 | \
+		LC_ALL=C sort -z | \
+			tar -c -vv -J --null --no-recursion --transform 's,^\./,chromium/,' -T - \
+			--mode=go=rX,u+rw,a-s \
+			--clamp-mtime --mtime "@$(SOURCE_DATE_EPOCH)" \
+			--owner=root --group=root --numeric-owner \
+			-f $(CURDIR)/out/chromium-src.tar.xz
 
 override_dh_auto_install-arch:
 	dh_auto_install

Reply via email to