Skip to content

Commit

Permalink
chore(package): add crate metadata and configure cargo-deb for packag…
Browse files Browse the repository at this point in the history
…ing (#1)

* add crate metadata and configure cargo-deb for packaging
* add license file
  • Loading branch information
maxjoehnk authored Dec 11, 2020
1 parent 83d667f commit 82eab88
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ jobs:
with:
name: Linux Client
path: target/release/desktop2mqtt
- name: Install cargo-deb
uses: actions-rs/install@v0.1
with:
crate: cargo-deb
version: latest
use-tool-cache: true
- name: Build deb package
uses: actions-rs/cargo@v1
with:
command: deb
- uses: actions/upload-artifact@v2
with:
name: Debian Package
path: target/debian/*
- name: Annotate commit with clippy warnings
uses: actions-rs/clippy-check@v1
with:
Expand Down
15 changes: 15 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[package]
name = "desktop2mqtt"
description = "A daemon to integrate any pc into your home automation system."
version = "0.1.0"
authors = ["Max Jöhnk <maxjoehnk@gmail.com>"]
edition = "2018"
readme = "README.md"
license = "MIT"

[dependencies]
log = "0.4"
Expand All @@ -15,3 +18,15 @@ serde_json = "1"
serde_yaml = "0.8"
anyhow = "1"
futures-util = "0.3"

[package.metadata.deb]
section = "utility"
priority = "optional"
assets = [
["target/release/desktop2mqtt", "usr/bin/", "755"],
["README.md", "usr/share/doc/desktop2mqtt/README", "644"],
]
depends = "$auto"
extended-description = """\
A daemon to integrate any pc into your home automation system.\
Primarily intended for [Home Assistant](https://home-assistant.io)."""
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Max Jöhnk

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

0 comments on commit 82eab88

Please sign in to comment.