summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2018-05-13 15:41:10 (EDT)
committer P. J. McDermott <pj@pehjota.net>2018-05-16 16:56:30 (EDT)
commitf9a530c76fc6da291d34484babe95c58901a7729 (patch)
tree0b3447e5ea83b9062b08ab9cf571133309175282
parenta0edcf80c0d14c0ead76ba5d75c02618f98a1fc9 (diff)
downloadicecat-f9a530c76fc6da291d34484babe95c58901a7729.zip
icecat-f9a530c76fc6da291d34484babe95c58901a7729.tar.gz
icecat-f9a530c76fc6da291d34484babe95c58901a7729.tar.bz2
gnuzilla/build: Fix mountpoint, deps, version, and search plugins
* Set the mountpoint's user and group IDs instead of making an intermediate temporary directory (mostly reverting commit a0edcf8). * Drop hardening-wrapper from Build-Depends. * Remove "-" from package version. * Fix multiple "Google" search plugins. * Uncomment mk-build-deps and dpkg-buildpackage.
-rwxr-xr-xgnuzilla/build40
1 files changed, 27 insertions, 13 deletions
diff --git a/gnuzilla/build b/gnuzilla/build
index 42cd931..8fc0fa2 100755
--- a/gnuzilla/build
+++ b/gnuzilla/build
@@ -38,32 +38,46 @@ uscan --package icecat --upstream-version '0' --watchfile "${0%/*}/watch" \
header 'Unpack Package'
# Create package directory and mount a temporary file system on it.
-mkdir 'tmpfs/'
-sudo mount -t 'tmpfs' 'tmpfs' 'tmpfs/'
-cd 'tmpfs/'
+mkdir "icecat-${upstream_version}/"
+sudo mount -t 'tmpfs' -o "uid=$(id -u),gid=$(id -g)" \
+ 'tmpfs' "icecat-${upstream_version}/"
# Unpack package.
-tar -xjf "../icecat-${version}.tar.bz2"
+tar -xjf "icecat-${version}.tar.bz2"
+
+# hardening-wrapper was deprecated and removed.
+sed -i '/^\thardening-wrapper,$/d;' \
+ "icecat-${upstream_version}/debian/control" \
+ "icecat-${upstream_version}/debian/control.in"
+
+# "3.0 (native)" source packages may not have a revision.
+sed -i '1s/-gnu/~gnu/;' "icecat-${upstream_version}/debian/changelog"
+
+# Since 2017-11-11, there are two search plugins matching "google*.xml":
+# google.xml and google-2018.xml. debian/install-distribution-searchplugins.py
+# throws an error: "More than one search plugin found for 'Google'".
+# Cf.:
+# * <https://hg.mozilla.org/mozilla-central/log/tip/browser/locales/searchplugins/google-2018.xml>
+# * <https://bugzilla.mozilla.org/show_bug.cgi?id=1416484>
+# * <https://bazaar.launchpad.net/~mozillateam/firefox/firefox-trunk.head/revision/2155/debian/config/searchplugins.conf>
+sed -i 's/google\*\.xml/google.xml/' \
+ "icecat-${upstream_version}/debian/config/searchplugins.conf"
header 'Install Build Dependencies'
# Make sure build dependencies are installed.
-#mk-build-deps -i -t "${MKBUILDDEPS_TOOL}" -r -s sudo \
-# "icecat-${upstream_version}/debian/control"
+mk-build-deps -i -t "${MKBUILDDEPS_TOOL}" -r -s sudo \
+ "icecat-${upstream_version}/debian/control"
header 'Build Package'
# Build source and binary packages.
cd "icecat-${upstream_version}/"
-#dpkg-buildpackage -us -uc
-bash
+dpkg-buildpackage -j4 -us -uc
cd '../'
header 'Clean Up'
# Unmount and remove package directory.
-rm -Rf "icecat-${upstream_version}/"
-mv * '../'
-cd '../'
-sudo umount 'tmpfs/'
-rmdir 'tmpfs/'
+sudo umount "icecat-${upstream_version}/"
+rmdir "icecat-${upstream_version}/"