From fd8b48dceb756a1241909840d41d17fc4b18e299 Mon Sep 17 00:00:00 2001 From: robot9001 Date: Fri, 22 Oct 2021 22:17:21 +0200 Subject: [PATCH 1/5] Overhaul `Cargo.toml` crate data --- Cargo.toml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 046f15a..c7e4bb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,18 +1,20 @@ [package] - name = "magic-sys" -description = "Declarations for `libmagic`" -readme = "README.md" +description = "Declarations for the `libmagic` C library" keywords = [ "magic", "file", + "ffi", + "bindings", +] +categories = [ + "external-ffi-bindings", ] repository = "https://github.com/robo9k/rust-magic-sys.git" license = "MIT/Apache-2.0" version = "0.2.1" -authors = ["robo9k "] +authors = ["robo9k "] links = "magic" -build = "build.rs" exclude = [ ".gitignore", ".gitattributes", @@ -24,6 +26,9 @@ exclude = [ ] rust-version = "1.38" +[badges] +maintenance = { status = "passively-maintained" } + [features] default = ["v5-38"] v5-04 = [] @@ -53,7 +58,7 @@ rev = "078f3e5" dependencies = ["libmagic"] [package.metadata.vcpkg.target] -x86_64-pc-windows-msvc = { triplet="x64-windows-static-md" } +x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md" } [package.metadata] msrv = "1.38.0" From c92dfcdb371de4a3fdf9748ceb1a430c81c7a214 Mon Sep 17 00:00:00 2001 From: robot9001 Date: Fri, 22 Oct 2021 22:20:25 +0200 Subject: [PATCH 2/5] Exclude `cargo deny` config file from published crate --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index c7e4bb9..87e117b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,7 @@ exclude = [ "rust-toolchain.toml", "shell.nix", "nix/", + "deny.toml", ] rust-version = "1.38" From 24218c421dc9f490049ee7fa4a9a9fe3288698e6 Mon Sep 17 00:00:00 2001 From: robot9001 Date: Fri, 22 Oct 2021 22:26:46 +0200 Subject: [PATCH 3/5] Use current `libc` crate without `std` default features --- Cargo.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 87e117b..59b0fc4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,8 +47,9 @@ v5-35 = ["v5-32"] v5-38 = ["v5-35"] v5-40 = ["v5-38"] -[dependencies] -libc = "0.2.13" +[dependencies.libc] +version = "0.2.104" +default-features = false [build-dependencies] vcpkg = "0.2.15" From 7054c5c8a4c62c1c3b2ffe1eacc9b364a28f9156 Mon Sep 17 00:00:00 2001 From: robot9001 Date: Fri, 22 Oct 2021 22:35:47 +0200 Subject: [PATCH 4/5] Update URLs --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7c0e92d..cd4e8d6 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ rust-magic-sys [![linux build status](https://github.com/robo9k/rust-magic-sys/actions/workflows/linux.yml/badge.svg)](https://github.com/robo9k/rust-magic-sys/actions/workflows/linux.yml) [![windows build status](https://github.com/robo9k/rust-magic-sys/actions/workflows/windows.yml/badge.svg)](https://github.com/robo9k/rust-magic-sys/actions/workflows/windows.yml) [![mac build status](https://github.com/robo9k/rust-magic-sys/actions/workflows/mac.yml/badge.svg)](https://github.com/robo9k/rust-magic-sys/actions/workflows/mac.yml) ============== -[Rust](http://www.rust-lang.org/) declarations for [libmagic](http://darwinsys.com/file/). +[Rust](https://www.rust-lang.org/f) declarations for [libmagic](https://www.darwinsys.com/file/). --- -This [cargo -sys package](http://doc.crates.io/build-script.html#*-sys-packages) provides `libmagic` declarations for e.g. the [`magic` binding](https://github.com/robo9k/rust-magic). +This [cargo -sys package](https://doc.rust-lang.org/cargo/reference/build-scripts.html) provides `libmagic` declarations for e.g. the [`magic` binding](https://crates.io/crates/magic). # Usage @@ -44,7 +44,7 @@ sudo apt-get install libmagic1 libmagic-dev On RHEL/Cent OS, Gentoo and others you will need to install the `file` package. -On Mac OS X you can use [Homebrew](http://brew.sh/): +On Mac OS X you can use [Homebrew](https://brew.sh/): ```sh brew install libmagic ``` @@ -87,8 +87,8 @@ If you do not use `cargo vcpkg build`, you will have to either # License Licensed under either of - * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) - * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) + * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0) + * MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT) at your option. From 07cf1a50922224abb9808a8ab8cf5017dc7bf2ad Mon Sep 17 00:00:00 2001 From: robot9001 Date: Fri, 22 Oct 2021 22:39:45 +0200 Subject: [PATCH 5/5] Update crate version --- Cargo.toml | 10 +++++----- README.md | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 59b0fc4..5b61b45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ categories = [ ] repository = "https://github.com/robo9k/rust-magic-sys.git" license = "MIT/Apache-2.0" -version = "0.2.1" +version = "0.3.0-alpha.1" authors = ["robo9k "] links = "magic" exclude = [ @@ -47,10 +47,6 @@ v5-35 = ["v5-32"] v5-38 = ["v5-35"] v5-40 = ["v5-38"] -[dependencies.libc] -version = "0.2.104" -default-features = false - [build-dependencies] vcpkg = "0.2.15" @@ -59,6 +55,10 @@ git = "https://github.com/microsoft/vcpkg" rev = "078f3e5" dependencies = ["libmagic"] +[dependencies.libc] +version = "0.2.104" +default-features = false + [package.metadata.vcpkg.target] x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md" } diff --git a/README.md b/README.md index cd4e8d6..626db28 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This [cargo -sys package](https://doc.rust-lang.org/cargo/reference/build-script ```toml [dependencies] -magic-sys = "0.2.0" +magic-sys = "0.3" ``` The `rustdoc` is available on [docs.rs](https://docs.rs/magic-sys). @@ -28,7 +28,7 @@ Each API version has a crate feature like "v5-38" (v5.38 is also the default), s If you use a different version of `libmagic`, adjust your configuration: ```toml [dependencies.magic-sys] -version = "0.2.1" +version = "0.3" default-features = false features = ["v5-41"] ```