summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:39:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:39:07 +0000
commitc3aed8de4c3eaeaa5341b0811b8052d316c789f8 (patch)
treecd182dcb96819dfc9328b7f724ebaaf10de56c58
parentAdding upstream version 0.26.0. (diff)
downloadrust-cbindgen-debian.tar.xz
rust-cbindgen-debian.zip
Adding debian version 0.26.0-3.debian/0.26.0-3debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--debian/cargo-checksum.json1
-rw-r--r--debian/cbindgen.manpages2
-rw-r--r--debian/changelog284
-rw-r--r--debian/compat1
-rw-r--r--debian/control118
-rw-r--r--debian/copyright24
-rw-r--r--debian/copyright.debcargo.hint30
-rw-r--r--debian/debcargo.toml42
-rw-r--r--debian/librust-cbindgen+clap-dev.lintian-overrides1
-rw-r--r--debian/patches/fix-tests-permission-denied.patch12
-rw-r--r--debian/patches/relax-dep.diff22
-rw-r--r--debian/patches/series3
-rw-r--r--debian/patches/use-cython3-for-tests.patch13
-rwxr-xr-xdebian/rules13
-rwxr-xr-xdebian/rules.debcargo.hint3
-rw-r--r--debian/source/format1
-rw-r--r--debian/tests/control19
-rw-r--r--debian/watch4
18 files changed, 593 insertions, 0 deletions
diff --git a/debian/cargo-checksum.json b/debian/cargo-checksum.json
new file mode 100644
index 0000000..b5623be
--- /dev/null
+++ b/debian/cargo-checksum.json
@@ -0,0 +1 @@
+{"package":"Could not get crate checksum","files":{}}
diff --git a/debian/cbindgen.manpages b/debian/cbindgen.manpages
new file mode 100644
index 0000000..3fc8097
--- /dev/null
+++ b/debian/cbindgen.manpages
@@ -0,0 +1,2 @@
+debian/cbindgen.1
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..9623151
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,284 @@
+rust-cbindgen (0.26.0-3) unstable; urgency=medium
+
+ * Team upload.
+ * Package cbindgen 0.26.0 from crates.io using debcargo 2.6.1
+ * Relax depenency on indexmap.
+
+ -- Peter Michael Green <plugwash@debian.org> Sun, 11 Feb 2024 02:08:44 +0000
+
+rust-cbindgen (0.26.0-2) unstable; urgency=medium
+
+ * Team upload.
+ * Package cbindgen 0.26.0 from crates.io using debcargo 2.6.0
+ * Fix tests failing with permission denied error.
+
+ -- Peter Michael Green <plugwash@debian.org> Thu, 28 Sep 2023 06:09:17 +0000
+
+rust-cbindgen (0.26.0-1) unstable; urgency=medium
+
+ * Package cbindgen 0.26.0 from crates.io using debcargo 2.6.0
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Wed, 27 Sep 2023 09:23:43 +0200
+
+rust-cbindgen (0.24.5-1) unstable; urgency=medium
+
+ * Team upload.
+ * Package cbindgen 0.24.5 from crates.io using debcargo 2.6.0
+ * Further relax dev-dependency on serial-test.
+
+ -- Peter Michael Green <plugwash@debian.org> Sun, 06 Aug 2023 12:55:01 +0000
+
+rust-cbindgen (0.24.3-2) unstable; urgency=medium
+
+ * Team upload.
+ * Package cbindgen 0.24.3 from crates.io using debcargo 2.6.0
+ * Relax dev-dependency on serial-test.
+
+ -- Peter Michael Green <plugwash@debian.org> Thu, 17 Nov 2022 20:11:36 +0000
+
+rust-cbindgen (0.24.3-1) unstable; urgency=medium
+
+ * Package cbindgen 0.24.3 from crates.io using debcargo 2.5.0
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sat, 25 Jun 2022 15:27:28 +0200
+
+rust-cbindgen (0.23.0-1) unstable; urgency=medium
+
+ * Package cbindgen 0.23.0 from crates.io using debcargo 2.5.0
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Fri, 03 Jun 2022 11:20:37 +0200
+
+rust-cbindgen (0.19.0-1) experimental; urgency=medium
+
+ * Package cbindgen 0.19.0 from crates.io using debcargo 2.4.4-alpha.0
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Thu, 27 May 2021 17:55:15 +0200
+
+rust-cbindgen (0.18.0-1) experimental; urgency=medium
+
+ * Package cbindgen 0.18.0 from crates.io using debcargo 2.4.4-alpha.0
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Fri, 05 Mar 2021 17:23:20 +0100
+
+rust-cbindgen (0.17.0-4) unstable; urgency=medium
+
+ * Team upload.
+ * Package cbindgen 0.17.0 from crates.io using debcargo 2.4.4
+ * Add test dependencies on gcc and g++
+
+ -- Peter Michael Green <plugwash@debian.org> Fri, 12 Feb 2021 16:33:26 +0000
+
+rust-cbindgen (0.17.0-3) unstable; urgency=medium
+
+ * Team upload.
+ * Package cbindgen 0.17.0 from crates.io using debcargo 2.4.4
+ * Change build and test dependencies from cython to cython3
+ * Use cython3 for tests
+ * Use tmpdir for tests rather than crate dir to fix permission
+ denied errors.
+
+ -- Peter Michael Green <plugwash@debian.org> Fri, 12 Feb 2021 01:41:20 +0000
+
+rust-cbindgen (0.17.0-2) unstable; urgency=medium
+
+ * Team upload.
+ * Package cbindgen 0.17.0 from crates.io using debcargo 2.4.4
+ * Fix very old timestamps (Closes: #982130)
+ * Remove old and broken override of debian/tests/control
+ * Add cython to the autopkgtest dependencies too.
+ * Mark test for no-features case as broken
+ * Mark other testcases as not broken.
+
+ -- Peter Michael Green <plugwash@debian.org> Thu, 11 Feb 2021 18:44:43 +0000
+
+rust-cbindgen (0.17.0-1) unstable; urgency=medium
+
+ * Package cbindgen 0.17.0 from crates.io using debcargo 2.4.4-alpha.0
+ (Closes: #982022)
+ * Add cython to the build dep for the tests
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sat, 06 Feb 2021 16:15:06 +0100
+
+rust-cbindgen (0.15.0-1) unstable; urgency=medium
+
+ * Package cbindgen 0.15.0 from crates.io using debcargo 2.4.3
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Fri, 16 Oct 2020 15:21:12 +0200
+
+rust-cbindgen (0.14.6-1) unstable; urgency=medium
+
+ * Package cbindgen 0.14.6 from crates.io using debcargo 2.4.2
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sat, 26 Sep 2020 10:06:03 +0200
+
+rust-cbindgen (0.14.4-1) unstable; urgency=medium
+
+ * Package cbindgen 0.14.4 from crates.io using debcargo 2.4.3
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sat, 29 Aug 2020 12:05:03 +0200
+
+rust-cbindgen (0.14.3-1) unstable; urgency=medium
+
+ * Package cbindgen 0.14.3 from crates.io using debcargo 2.4.3
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sun, 28 Jun 2020 20:52:42 +0200
+
+rust-cbindgen (0.14.2-1) unstable; urgency=medium
+
+ * Package cbindgen 0.14.2 from crates.io using debcargo 2.4.2
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sun, 10 May 2020 13:48:47 +0200
+
+rust-cbindgen (0.14.1-1) unstable; urgency=medium
+
+ * Package cbindgen 0.14.1 from crates.io using debcargo 2.4.2
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sun, 12 Apr 2020 17:53:22 +0200
+
+rust-cbindgen (0.14.0-3) unstable; urgency=medium
+
+ * Package cbindgen 0.14.0 from crates.io using debcargo 2.4.0
+ * Only run the testssuite on the binary
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Mon, 06 Apr 2020 18:54:29 +0200
+
+rust-cbindgen (0.14.0-2) unstable; urgency=medium
+
+ * Don't run autopkgtest for now. It needs g++ and I cannot
+ add it as dep as debcargo doesn't manage that yet.
+ WIP https://salsa.debian.org/rust-team/debcargo/-/merge_requests/24
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Mon, 06 Apr 2020 12:04:43 +0200
+
+rust-cbindgen (0.14.0-1) unstable; urgency=medium
+
+ * Package cbindgen 0.14.0 from crates.io using debcargo 2.4.0
+ * Cherry-pick upstream page to fix autopkgtest
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sun, 05 Apr 2020 15:07:16 +0200
+
+rust-cbindgen (0.13.1-2) unstable; urgency=medium
+
+ * Package cbindgen 0.13.1 from crates.io using debcargo 2.4.0
+ * Upload to unstable. Still blocked by NEW.
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Thu, 12 Mar 2020 10:48:38 +0100
+
+rust-cbindgen (0.13.1-1) experimental; urgency=medium
+
+ * Team upload.
+ * Package cbindgen 0.13.1 from crates.io using debcargo 2.4.2
+
+ -- Fabian Grünbichler <f.gruenbichler@proxmox.com> Sun, 01 Mar 2020 19:14:03 +0100
+
+rust-cbindgen (0.12.1-1) unstable; urgency=medium
+
+ * Package cbindgen 0.12.1 from crates.io using debcargo 2.4.0
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Tue, 31 Dec 2019 11:20:57 +0100
+
+rust-cbindgen (0.12.0-1) unstable; urgency=medium
+
+ * Package cbindgen 0.12.0 from crates.io using debcargo 2.4.0
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Mon, 23 Dec 2019 12:48:14 +0100
+
+rust-cbindgen (0.11.1-1) unstable; urgency=medium
+
+ * Package cbindgen 0.11.1 from crates.io using debcargo 2.4.0
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Mon, 09 Dec 2019 17:44:34 +0100
+
+rust-cbindgen (0.11.0-1) unstable; urgency=medium
+
+ * Package cbindgen 0.11.0 from crates.io using debcargo 2.4.0
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sun, 08 Dec 2019 11:10:24 +0100
+
+rust-cbindgen (0.10.0-1) unstable; urgency=medium
+
+ * Package cbindgen 0.10.0 from crates.io using debcargo 2.4.0
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Mon, 25 Nov 2019 09:02:36 +0100
+
+rust-cbindgen (0.9.1-1) unstable; urgency=medium
+
+ * Package cbindgen 0.9.1 from crates.io using debcargo 2.4.0
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Wed, 02 Oct 2019 16:41:57 +0200
+
+rust-cbindgen (0.9.0-1) unstable; urgency=medium
+
+ * Package cbindgen 0.9.0 from crates.io using debcargo 2.3.1-alpha.0
+ * Remove testsuite-fix.patch (merged upstream)
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sat, 03 Aug 2019 17:37:33 +0200
+
+rust-cbindgen (0.8.7-1) unstable; urgency=medium
+
+ * Upload to unstable (needed for fx)
+ * Package cbindgen 0.8.7 from crates.io using debcargo 2.2.10
+ * fix-tests.diff: Backport a patch to build with c++11 to fix
+ tests issues
+ * testsuite-fix.patch: Fix an issue with the test execution
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Thu, 30 May 2019 10:11:50 +0200
+
+rust-cbindgen (0.8.4-1) UNRELEASED; urgency=medium
+
+ * Package cbindgen 0.8.4 from crates.io using debcargo 2.2.10
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Fri, 3 May 2019 14:21:52 +0200
+
+rust-cbindgen (0.8.3-1) experimental; urgency=medium
+
+ * Package cbindgen 0.8.3 from crates.io using debcargo 2.2.10
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sun, 31 Mar 2019 20:28:14 +0200
+
+rust-cbindgen (0.8.2-1) experimental; urgency=medium
+
+ * Package cbindgen 0.8.2 from crates.io using debcargo 2.2.10
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sun, 10 Mar 2019 17:29:56 +0100
+
+rust-cbindgen (0.8.0-1) unstable; urgency=medium
+
+ * Package cbindgen 0.8.0 from crates.io using debcargo 2.2.10
+ * Remove relax-serde-dep.diff as it isn't necessary anymore
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Mon, 18 Feb 2019 19:27:48 +0100
+
+rust-cbindgen (0.7.1-1) unstable; urgency=medium
+
+ * Package cbindgen 0.7.1 from crates.io using debcargo 2.2.10
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Tue, 29 Jan 2019 09:03:04 +0100
+
+rust-cbindgen (0.6.8-1) unstable; urgency=medium
+
+ * Package cbindgen 0.6.8 from crates.io using debcargo 2.2.9
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sat, 12 Jan 2019 12:37:52 +0100
+
+rust-cbindgen (0.6.7-2) unstable; urgency=medium
+
+ * Package cbindgen 0.6.7 from crates.io using debcargo 2.2.9
+ * Import a patch from Emilio to build with sync 0.15 (Closes: #917317)
+ * Run the testsuite
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sat, 29 Dec 2018 16:19:25 +0100
+
+rust-cbindgen (0.6.7-1) unstable; urgency=medium
+
+ * Package cbindgen 0.6.7 from crates.io using debcargo 2.2.8
+ * relax the syn dep to accept 0.15 (Closes: #915005)
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sun, 02 Dec 2018 09:43:15 -0800
+
+rust-cbindgen (0.6.6-1) unstable; urgency=medium
+
+ * Package cbindgen 0.6.6 from crates.io using debcargo 2.2.8
+ (Closes: #908312)
+
+ -- Sylvestre Ledru <sylvestre@debian.org> Sat, 20 Oct 2018 13:33:34 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..48082f7
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+12
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..987307b
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,118 @@
+Source: rust-cbindgen
+Section: utils
+Priority: optional
+Build-Depends: debhelper (>= 12),
+ dh-cargo (>= 25),
+ cargo:native,
+ rustc:native (>= 1.64),
+ libstd-rust-dev,
+ librust-clap-3+default-dev (>= 3.1-~~),
+ librust-heck-0.4+default-dev,
+ librust-indexmap+default-dev (>= 1-~~),
+ librust-log-0.4+default-dev,
+ librust-proc-macro2-1+default-dev (>= 1.0.60-~~),
+ librust-quote-1+default-dev,
+ librust-serde-1+derive-dev (>= 1.0.103-~~),
+ librust-serde-json-1+default-dev,
+ librust-syn-1+clone-impls-dev (>= 1.0.88-~~),
+ librust-syn-1+extra-traits-dev (>= 1.0.88-~~),
+ librust-syn-1+fold-dev (>= 1.0.88-~~),
+ librust-syn-1+full-dev (>= 1.0.88-~~),
+ librust-syn-1+parsing-dev (>= 1.0.88-~~),
+ librust-syn-1+printing-dev (>= 1.0.88-~~),
+ librust-tempfile-3+default-dev,
+ librust-toml-0.5+default-dev,
+ help2man,
+ librust-serial-test-dev,
+ cython3
+Maintainer: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+Uploaders:
+ Sylvestre Ledru <sylvestre@debian.org>
+Standards-Version: 4.6.2
+Vcs-Git: https://salsa.debian.org/rust-team/debcargo-conf.git [src/cbindgen]
+Vcs-Browser: https://salsa.debian.org/rust-team/debcargo-conf/tree/master/src/cbindgen
+X-Cargo-Crate: cbindgen
+Rules-Requires-Root: no
+
+Package: librust-cbindgen-dev
+Architecture: any
+Multi-Arch: same
+Depends:
+ ${misc:Depends},
+ librust-heck-0.4+default-dev,
+ librust-indexmap+default-dev (>= 1-~~),
+ librust-log-0.4+default-dev,
+ librust-proc-macro2-1+default-dev (>= 1.0.60-~~),
+ librust-quote-1+default-dev,
+ librust-serde-1+derive-dev (>= 1.0.103-~~),
+ librust-serde-json-1+default-dev,
+ librust-syn-1+clone-impls-dev (>= 1.0.88-~~),
+ librust-syn-1+extra-traits-dev (>= 1.0.88-~~),
+ librust-syn-1+fold-dev (>= 1.0.88-~~),
+ librust-syn-1+full-dev (>= 1.0.88-~~),
+ librust-syn-1+parsing-dev (>= 1.0.88-~~),
+ librust-syn-1+printing-dev (>= 1.0.88-~~),
+ librust-tempfile-3+default-dev,
+ librust-toml-0.5+default-dev
+Recommends:
+ librust-cbindgen+clap-dev (= ${binary:Version})
+Provides:
+ librust-cbindgen-0-dev (= ${binary:Version}),
+ librust-cbindgen-0.26-dev (= ${binary:Version}),
+ librust-cbindgen-0.26.0-dev (= ${binary:Version})
+Description: Generating C bindings to Rust code - Rust source code
+ Source code for Debianized Rust crate "cbindgen"
+
+Package: librust-cbindgen+clap-dev
+Architecture: any
+Multi-Arch: same
+Depends:
+ ${misc:Depends},
+ librust-cbindgen-dev (= ${binary:Version}),
+ librust-clap-3+default-dev (>= 3.1-~~)
+Provides:
+ librust-cbindgen+default-dev (= ${binary:Version}),
+ librust-cbindgen-0+clap-dev (= ${binary:Version}),
+ librust-cbindgen-0+default-dev (= ${binary:Version}),
+ librust-cbindgen-0.26+clap-dev (= ${binary:Version}),
+ librust-cbindgen-0.26+default-dev (= ${binary:Version}),
+ librust-cbindgen-0.26.0+clap-dev (= ${binary:Version}),
+ librust-cbindgen-0.26.0+default-dev (= ${binary:Version})
+Description: Generating C bindings to Rust code - feature "clap" and 1 more
+ This metapackage enables feature "clap" for the Rust cbindgen crate, by pulling
+ in any additional dependencies needed by that feature.
+ .
+ Additionally, this package also provides the "default" feature.
+
+Package: cbindgen
+Architecture: any
+Multi-Arch: allowed
+Section: utils
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+ ${cargo:Depends}
+Recommends:
+ ${cargo:Recommends}
+Suggests:
+ ${cargo:Suggests}
+Provides:
+ ${cargo:Provides}
+Built-Using: ${cargo:Built-Using}
+XB-X-Cargo-Built-Using: ${cargo:X-Cargo-Built-Using}
+Description: Generates C bindings from Rust code
+ cbindgen can be used to generate C bindings for Rust code.
+ It is currently being developed to support creating bindings for
+ WebRender (by Mozilla for Firefox), but has been designed to support
+ any project.
+ .
+ Features:
+ .
+ * Builds bindings for a crate, its mods, its dependent crates, and their mods
+ * Only the necessary types for exposed functions are given bindings
+ * Can specify annotations for controlling some aspects of binding
+ * Support for generic structs and unions
+ * Support for exporting constants and statics
+ * Customizable formatting, can be used in C or C++ projects
+ * Support for generating #ifdef's for #[cfg] attributes
+ * Support for #[repr(sized)] tagged enum's
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..27e81be
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,24 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: cbindgen
+Upstream-Contact:
+ Jeff Muizelaar <jmuizelaar@mozilla.com>
+ Kartikaya Gupta <kats@mozilla.com>
+ Ryan Hunt <rhunt@eqrion.net>
+Source: https://github.com/eqrion/cbindgen/
+
+Files: *
+Copyright:
+ 2018-2023 Emilio Cobos Álvarez <emilio@crisal.io>
+ 2017-2019 Jeff Muizelaar <jmuizelaar@mozilla.com>
+ 2017-2020 Kartikaya Gupta <kats@mozilla.com>
+ 2017-2019 Ryan Hunt <rhunt@eqrion.net>
+License: MPL-2.0
+
+Files: debian/*
+Copyright:
+ 2018-2024 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+ 2018 Sylvestre Ledru <sylvestre@debian.org>
+License: MPL-2.0
+
+License: MPL-2.0
+ Debian systems provide the MPL 2.0 in /usr/share/common-licenses/MPL-2.0
diff --git a/debian/copyright.debcargo.hint b/debian/copyright.debcargo.hint
new file mode 100644
index 0000000..c37e397
--- /dev/null
+++ b/debian/copyright.debcargo.hint
@@ -0,0 +1,30 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: cbindgen
+Upstream-Contact:
+ Emilio Cobos Álvarez <emilio@crisal.io>
+ Jeff Muizelaar <jmuizelaar@mozilla.com>
+ Kartikaya Gupta <kats@mozilla.com>
+ Ryan Hunt <rhunt@eqrion.net>
+Source: https://github.com/mozilla/cbindgen
+
+Files: *
+Copyright:
+ FIXME (overlay) UNKNOWN-YEARS Emilio Cobos Álvarez <emilio@crisal.io>
+ FIXME (overlay) UNKNOWN-YEARS Jeff Muizelaar <jmuizelaar@mozilla.com>
+ FIXME (overlay) UNKNOWN-YEARS Kartikaya Gupta <kats@mozilla.com>
+ FIXME (overlay) UNKNOWN-YEARS Ryan Hunt <rhunt@eqrion.net>
+License: MPL-2.0
+Comment:
+ FIXME (overlay): Since upstream copyright years are not available in
+ Cargo.toml, they were extracted from the upstream Git repository. This may not
+ be correct information so you should review and fix this before uploading to
+ the archive.
+
+Files: debian/*
+Copyright:
+ 2018-2024 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
+ 2018-2024 Sylvestre Ledru <sylvestre@debian.org>
+License: MPL-2.0
+
+License: MPL-2.0
+ Debian systems provide the MPL 2.0 in /usr/share/common-licenses/MPL-2.0
diff --git a/debian/debcargo.toml b/debian/debcargo.toml
new file mode 100644
index 0000000..ae4df43
--- /dev/null
+++ b/debian/debcargo.toml
@@ -0,0 +1,42 @@
+overlay = "."
+uploaders = ["Sylvestre Ledru <sylvestre@debian.org>"]
+excludes = ["tests/expectations/**"]
+
+[source]
+section = "utils"
+build_depends = ["help2man", "librust-serial-test-dev", "cython3"]
+
+[packages.bin]
+summary = "Generates C bindings from Rust code"
+section = "utils"
+
+description = """
+cbindgen can be used to generate C bindings for Rust code.
+It is currently being developed to support creating bindings for
+WebRender (by Mozilla for Firefox), but has been designed to support
+any project.
+
+Features:
+
+ * Builds bindings for a crate, its mods, its dependent crates, and their mods
+ * Only the necessary types for exposed functions are given bindings
+ * Can specify annotations for controlling some aspects of binding
+ * Support for generic structs and unions
+ * Support for exporting constants and statics
+ * Customizable formatting, can be used in C or C++ projects
+ * Support for generating #ifdef's for #[cfg] attributes
+ * Support for #[repr(sized)] tagged enum's
+"""
+
+[packages.lib]
+test_depends = ["gcc","g++","cython3"]
+test_is_broken = true
+
+[packages."lib+clap"]
+test_is_broken = false
+
+[packages."lib+default"]
+test_is_broken = false
+
+[packages."lib+@"]
+test_is_broken = false
diff --git a/debian/librust-cbindgen+clap-dev.lintian-overrides b/debian/librust-cbindgen+clap-dev.lintian-overrides
new file mode 100644
index 0000000..a71b8a8
--- /dev/null
+++ b/debian/librust-cbindgen+clap-dev.lintian-overrides
@@ -0,0 +1 @@
+librust-cbindgen+clap-dev binary: empty-rust-library-declares-provides * \ No newline at end of file
diff --git a/debian/patches/fix-tests-permission-denied.patch b/debian/patches/fix-tests-permission-denied.patch
new file mode 100644
index 0000000..4eb44d4
--- /dev/null
+++ b/debian/patches/fix-tests-permission-denied.patch
@@ -0,0 +1,12 @@
+--- rust-cbindgen-0.26.0.orig/tests/tests.rs
++++ rust-cbindgen-0.26.0/tests/tests.rs
+@@ -204,6 +204,9 @@ fn run_compile_test(
+ let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
+ let tests_path = Path::new(&crate_dir).join("tests");
+ let mut generated_file = tests_path.join("expectations");
++ if let Some(cargo_target_tmpdir) = option_env!("CARGO_TARGET_TMPDIR") {
++ generated_file = Path::new(cargo_target_tmpdir).join("expectations");
++ }
+ fs::create_dir_all(&generated_file).unwrap();
+
+ let style_ext = style
diff --git a/debian/patches/relax-dep.diff b/debian/patches/relax-dep.diff
new file mode 100644
index 0000000..c321b12
--- /dev/null
+++ b/debian/patches/relax-dep.diff
@@ -0,0 +1,22 @@
+Index: cbindgen/Cargo.toml
+===================================================================
+--- cbindgen.orig/Cargo.toml
++++ cbindgen/Cargo.toml
+@@ -53,7 +53,7 @@ optional = true
+ version = "0.4"
+
+ [dependencies.indexmap]
+-version = "1"
++version = ">= 1"
+
+ [dependencies.log]
+ version = "0.4"
+@@ -91,7 +91,7 @@ version = "3"
+ version = "0.5"
+
+ [dev-dependencies.serial_test]
+-version = "0.5.0"
++version = ">= 0.5.0, < 3"
+
+ [features]
+ default = ["clap"]
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..587c4c0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+use-cython3-for-tests.patch
+relax-dep.diff
+fix-tests-permission-denied.patch
diff --git a/debian/patches/use-cython3-for-tests.patch b/debian/patches/use-cython3-for-tests.patch
new file mode 100644
index 0000000..7ba5269
--- /dev/null
+++ b/debian/patches/use-cython3-for-tests.patch
@@ -0,0 +1,13 @@
+Index: build/cbindgen/tests/tests.rs
+===================================================================
+--- cbindgen/tests/tests.rs
++++ cbindgen/tests/tests.rs
+@@ -71,7 +71,7 @@ fn compile(
+ let cc = match language {
+ Language::Cxx => env::var("CXX").unwrap_or_else(|_| "g++".to_owned()),
+ Language::C => env::var("CC").unwrap_or_else(|_| "gcc".to_owned()),
+- Language::Cython => env::var("CYTHON").unwrap_or_else(|_| "cython".to_owned()),
++ Language::Cython => env::var("CYTHON").unwrap_or_else(|_| "cython3".to_owned()),
+ };
+
+ let file_name = cbindgen_output
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..fe19b82
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+%:
+ dh $@ --buildsystem cargo
+
+override_dh_auto_test:
+ dh_auto_test -- test --all
+
+override_dh_installman:
+ help2man debian/cbindgen/usr/bin/cbindgen > debian/cbindgen.1
+ dh_installman -O--buildsystem=cargo
+
+execute_after_dh_testdir:
+ find . ! -newermt "jan 01, 2000" -exec touch {} +
diff --git a/debian/rules.debcargo.hint b/debian/rules.debcargo.hint
new file mode 100755
index 0000000..044c1c2
--- /dev/null
+++ b/debian/rules.debcargo.hint
@@ -0,0 +1,3 @@
+#!/usr/bin/make -f
+%:
+ dh $@ --buildsystem cargo
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..c810d6b
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,19 @@
+Test-Command: /usr/share/cargo/bin/cargo-auto-test cbindgen 0.26.0 --all-targets --all-features
+Features: test-name=rust-cbindgen:@
+Depends: dh-cargo (>= 18), gcc, g++, cython3, librust-serial-test-2+default-dev | librust-serial-test-1+default-dev | librust-serial-test-0+default-dev (>= 0.5.0-~~), @
+Restrictions: allow-stderr, skip-not-installable
+
+Test-Command: /usr/share/cargo/bin/cargo-auto-test cbindgen 0.26.0 --all-targets --no-default-features
+Features: test-name=librust-cbindgen-dev:
+Depends: dh-cargo (>= 18), gcc, g++, cython3, librust-serial-test-2+default-dev | librust-serial-test-1+default-dev | librust-serial-test-0+default-dev (>= 0.5.0-~~), @
+Restrictions: allow-stderr, skip-not-installable, flaky
+
+Test-Command: /usr/share/cargo/bin/cargo-auto-test cbindgen 0.26.0 --all-targets
+Features: test-name=librust-cbindgen+clap-dev:default
+Depends: dh-cargo (>= 18), gcc, g++, cython3, librust-serial-test-2+default-dev | librust-serial-test-1+default-dev | librust-serial-test-0+default-dev (>= 0.5.0-~~), @
+Restrictions: allow-stderr, skip-not-installable
+
+Test-Command: /usr/share/cargo/bin/cargo-auto-test cbindgen 0.26.0 --all-targets --no-default-features --features clap
+Features: test-name=librust-cbindgen+clap-dev:clap
+Depends: dh-cargo (>= 18), gcc, g++, cython3, librust-serial-test-2+default-dev | librust-serial-test-1+default-dev | librust-serial-test-0+default-dev (>= 0.5.0-~~), @
+Restrictions: allow-stderr, skip-not-installable
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..351e249
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=4
+opts=filenamemangle=s/.*\/(.*)\/download/cbindgen-$1\.tar\.gz/g,\
+uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/ \
+https://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=crates.io/cbindgen .*/crates/cbindgen/@ANY_VERSION@/download