summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorohfp <1813007-ohfp@users.noreply.gitlab.com>2021-07-15 15:43:16 +0200
committerohfp <1813007-ohfp@users.noreply.gitlab.com>2021-07-15 15:43:16 +0200
commit2cc22dc7d21beec27c54766b6c866d1aba2c4033 (patch)
tree254ee5d717c9b625190bdc6d481cf84f1774a3a2
parentthis time, let us try it with including cbindgen in OBS instead (diff)
downloadlibrewolf-debian-2cc22dc7d21beec27c54766b6c866d1aba2c4033.tar.gz
librewolf-debian-2cc22dc7d21beec27c54766b6c866d1aba2c4033.tar.bz2
librewolf-debian-2cc22dc7d21beec27c54766b6c866d1aba2c4033.zip
cargo.toml needs to be separate, it seems
-rw-r--r--.gitlab-ci.yml1
-rw-r--r--cbindgen.patch13
-rwxr-xr-xscripts/prep-librewolf-dpkg.sh4
3 files changed, 16 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a2e73ab..5628f8b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,6 +18,7 @@ variables:
paths:
- "./**/librewolf*.dsc"
- "./**/librewolf*.xz"
+ - "./**/Cargo.toml"
.prepare_ubuntu: &prepare_ubuntu
variables:
diff --git a/cbindgen.patch b/cbindgen.patch
index 33af6fa..d6ba086 100644
--- a/cbindgen.patch
+++ b/cbindgen.patch
@@ -22,3 +22,16 @@ index b6acf1b..089cbf7 100644
%if DIST == stretch
nodejs-mozilla (>= 10),
%else
+diff --git a/rules b/rules
+index 117197e..f462e5a 100755
+--- a/rules
++++ b/rules
+@@ -81,7 +81,7 @@ LIB_DIR := /usr/lib/$($(PRODUCT))
+ SHARE_DIR := /usr/share/$($(PRODUCT))
+
+ # Work around https://github.com/rust-lang/cargo/issues/7147
+-export CARGO_HOME=$(CURDIR)/debian/.cargo
++export CARGO_HOME=$(CURDIR)/.cargo
+
+ ifneq (,$(filter stretch,$(DIST)))
+ ifneq (,$(filter amd64 i386,$(DEB_HOST_ARCH)))
diff --git a/scripts/prep-librewolf-dpkg.sh b/scripts/prep-librewolf-dpkg.sh
index ae3e3ef..dccf3c8 100755
--- a/scripts/prep-librewolf-dpkg.sh
+++ b/scripts/prep-librewolf-dpkg.sh
@@ -96,7 +96,7 @@ cd "${debian_dir}"
patch -Np1 -i "${CI_PROJECT_DIR}"/cbindgen.patch
cd "${work_dir}"
-cat <<'EOF' >> "${debian_dir}"/Cargo.toml
+cat <<'EOF' >> "${CI_PROJECT_DIR}"/Cargo.toml
[package]
name = "debian"
version = "0.1.0"
@@ -168,7 +168,7 @@ mk_add_options MOZ_SERVICES_HEALTHREPORT=0
mk_add_options MOZ_TELEMETRY_REPORTING=0
# workaround to use bundled cbindgen
-ac_add_options CBINDGEN=\$topsrcdir/debian/.cargo/bin/cbindgen
+ac_add_options CBINDGEN=\$topsrcdir/.cargo/bin/cbindgen
EOF
test "$( uname -p )" = "x86_64" && { echo "ac_add_options --disable-elf-hack" >> "${debian_dir}${_mozconfig}" ; }
bgstack15