From f9a530c76fc6da291d34484babe95c58901a7729 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 13 May 2018 15:41:10 -0400 Subject: 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. --- 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.: +# * +# * +# * +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}/" -- cgit v0.9.1