diff --git a/Cargo.toml b/Cargo.toml index bc6b8a10..6840b711 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,11 @@ name = "proxmox-openid" version = "0.1.0" authors = ["Dietmar Maurer "] edition = "2018" +license = "AGPL-3" +exclude = [ + "build", + "debian", +] [lib] name = "proxmox_openid" diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..e108fb10 --- /dev/null +++ b/Makefile @@ -0,0 +1,45 @@ +.PHONY: all +all: check + +.PHONY: check +check: + cargo test --all-features + +.PHONY: dinstall +dinstall: deb + sudo -k dpkg -i build/librust-*.deb + +.PHONY: build +build: + rm -rf build + rm -f debian/control + mkdir build + debcargo package \ + --config "$(PWD)/debian/debcargo.toml" \ + --changelog-ready \ + --no-overlay-write-back \ + --directory "$(PWD)/build/proxmox-openid" \ + "proxmox-openid" \ + "$$(dpkg-parsechangelog -l "debian/changelog" -SVersion | sed -e 's/-.*//')" + echo system >build/rust-toolchain + rm -f build/proxmox-openid/Cargo.lock + find build/proxmox-openid/debian -name '*.hint' -delete + cp build/proxmox-openid/debian/control debian/control + +.PHONY: deb +deb: build + (cd build/proxmox-openid && CARGO=/usr/bin/cargo RUSTC=/usr/bin/rustc dpkg-buildpackage -b -uc -us) + lintian build/*.deb + +.PHONY: clean +clean: + rm -rf build *.deb *.buildinfo *.changes *.orig.tar.gz + cargo clean + +upload: deb + cd build; \ + dcmd --deb rust-proxmox-openid_*.changes \ + | grep -v '.changes$$' \ + | tar -cf "rust-proxmox-openid-debs.tar" -T-; \ + cat "rust-proxmox-openid-debs.tar" | ssh -X repoman@repo.proxmox.com upload --product devel --dist bullseye; \ + rm -f rust-proxmox-openid-debs.tar diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..ee45134e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +rust-proxmox-openid (0.1.0-1) devel; urgency=medium + + * initial release + + -- Proxmox Support Team Fri, 18 Jun 2021 16:05:49 +0200 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..efdaf0cb --- /dev/null +++ b/debian/control @@ -0,0 +1,54 @@ +Source: rust-proxmox-openid +Section: rust +Priority: optional +Build-Depends: debhelper (>= 12), + dh-cargo (>= 24), + cargo:native , + rustc:native , + libstd-rust-dev , + librust-anyhow-1+default-dev , + librust-curl-0.4+default-dev (>= 0.4.33-~~) , + librust-http-0.2+default-dev , + librust-nix-0.19+default-dev (>= 0.19.1-~~) , + librust-openidconnect-2+curl-dev , + librust-proxmox-0.11+api-macro-dev (>= 0.11.5-~~) , + librust-proxmox-0.11+default-dev (>= 0.11.5-~~) , + librust-proxmox-0.11+sortable-macro-dev (>= 0.11.5-~~) , + librust-serde-1+default-dev , + librust-serde-1+derive-dev , + librust-serde-json-1+default-dev , + librust-url-2+default-dev (>= 2.1-~~) +Maintainer: Proxmox Support Team +Standards-Version: 4.5.1 +Vcs-Git: +Vcs-Browser: +Rules-Requires-Root: no + +Package: librust-proxmox-openid-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-anyhow-1+default-dev, + librust-curl-0.4+default-dev (>= 0.4.33-~~), + librust-http-0.2+default-dev, + librust-nix-0.19+default-dev (>= 0.19.1-~~), + librust-openidconnect-2+curl-dev, + librust-proxmox-0.11+api-macro-dev (>= 0.11.5-~~), + librust-proxmox-0.11+default-dev (>= 0.11.5-~~), + librust-proxmox-0.11+sortable-macro-dev (>= 0.11.5-~~), + librust-serde-1+default-dev, + librust-serde-1+derive-dev, + librust-serde-json-1+default-dev, + librust-url-2+default-dev (>= 2.1-~~) +Provides: + librust-proxmox-openid+default-dev (= ${binary:Version}), + librust-proxmox-openid-0-dev (= ${binary:Version}), + librust-proxmox-openid-0+default-dev (= ${binary:Version}), + librust-proxmox-openid-0.1-dev (= ${binary:Version}), + librust-proxmox-openid-0.1+default-dev (= ${binary:Version}), + librust-proxmox-openid-0.1.0-dev (= ${binary:Version}), + librust-proxmox-openid-0.1.0+default-dev (= ${binary:Version}) +Description: Rust crate "proxmox-openid" - Rust source code + This package contains the source for the Rust proxmox-openid crate, packaged by + debcargo for use with cargo and dh-cargo. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..477c3058 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,16 @@ +Copyright (C) 2020-2021 Proxmox Server Solutions GmbH + +This software is written by Proxmox Server Solutions GmbH + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . diff --git a/debian/debcargo.toml b/debian/debcargo.toml new file mode 100644 index 00000000..703440fc --- /dev/null +++ b/debian/debcargo.toml @@ -0,0 +1,8 @@ +overlay = "." +crate_src_path = ".." +maintainer = "Proxmox Support Team " + +[source] +# TODO: update once public +vcs_git = "" +vcs_browser = ""