RFS: fix sha2-asm bug
kpcyrd
5 years ago
|
0 |
extern crate cc;
|
|
1 |
|
|
2 |
use std::env;
|
|
3 |
|
|
4 |
fn main() {
|
|
5 |
let (sha256_path, sha512_path) = if cfg!(target_arch = "x86") {
|
|
6 |
("src/sha256_x86.S", "src/sha512_x86.S")
|
|
7 |
} else if cfg!(target_arch = "x86_64") {
|
|
8 |
("src/sha256_x64.S", "src/sha512_x64.S")
|
|
9 |
} else {
|
|
10 |
panic!("Unsupported target architecture");
|
|
11 |
};
|
|
12 |
cc::Build::new()
|
|
13 |
.flag("-c")
|
|
14 |
.file(sha256_path)
|
|
15 |
.compile("libsha256.a");
|
|
16 |
cc::Build::new()
|
|
17 |
.flag("-c")
|
|
18 |
.file(sha512_path)
|
|
19 |
.compile("libsha512.a");
|
|
20 |
println!("dh-cargo:deb-built-using=sha256=0={}", env::var("CARGO_MANIFEST_DIR").unwrap());
|
|
21 |
}
|
|
0 |
rust-sha2-asm (0.5.1-2) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
|
|
1 |
|
|
2 |
* Package sha2-asm 0.5.1 from crates.io using debcargo 2.2.6
|
|
3 |
|
|
4 |
-- kpcyrd <git@rxv.cc> Sun, 26 Aug 2018 10:03:32 +0000
|
|
5 |
|
0 | 6 |
rust-sha2-asm (0.5.1-1) unstable; urgency=medium
|
1 | 7 |
|
2 | 8 |
* Package sha2-asm 0.5.1 from crates.io using debcargo 2.2.4
|
|
0 |
#!/usr/bin/make -f
|
|
1 |
include /usr/share/rustc/architecture.mk
|
|
2 |
%:
|
|
3 |
dh $@ --buildsystem cargo
|
|
4 |
|
|
5 |
override_dh_auto_configure:
|
|
6 |
cp -f debian/build.rs ./
|
|
7 |
dh_auto_configure
|
|
8 |
|
|
9 |
# Only x86 and x86_64 is supported
|
|
10 |
override_dh_auto_test:
|
|
11 |
case $(DEB_HOST_RUST_TYPE) in \
|
|
12 |
arm-*|x86-*|x86_64-*) \
|
|
13 |
dh_auto_test;; \
|
|
14 |
*) \
|
|
15 |
dh_auto_test || true;; \
|
|
16 |
esac
|
|
0 |
#!/usr/bin/make -f
|
|
1 |
%:
|
|
2 |
dh $@ --buildsystem cargo
|