mirror of
https://git.proxmox.com/git/proxmox-offline-mirror
synced 2025-04-28 21:31:43 +00:00
add packaging
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
92745fd2c1
commit
8cddc92d00
69
Makefile
Normal file
69
Makefile
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
include /usr/share/dpkg/pkg-info.mk
|
||||||
|
include /usr/share/dpkg/architecture.mk
|
||||||
|
|
||||||
|
PACKAGE=proxmox-offline-mirror
|
||||||
|
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
|
||||||
|
BUILDDIR_TMP ?= $(BUILDDIR).tmp
|
||||||
|
|
||||||
|
DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_BUILD_ARCH).deb
|
||||||
|
LIB_DEB=librust-$(PACKAGE)-dev_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_BUILD_ARCH).deb
|
||||||
|
DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION_UPSTREAM_REVISION)_$(DEB_BUILD_ARCH).deb
|
||||||
|
DSC=rust-$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
|
||||||
|
|
||||||
|
ifeq ($(BUILD_MODE), release)
|
||||||
|
CARGO_BUILD_ARGS += --release
|
||||||
|
COMPILEDIR := target/release
|
||||||
|
else
|
||||||
|
COMPILEDIR := target/debug
|
||||||
|
endif
|
||||||
|
|
||||||
|
all: cargo-build $(SUBDIRS)
|
||||||
|
|
||||||
|
.PHONY: cargo-build
|
||||||
|
cargo-build:
|
||||||
|
cargo build $(CARGO_BUILD_ARGS)
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
build:
|
||||||
|
rm -rf $(BUILDDIR) $(BUILDDIR_TMP); mkdir $(BUILDDIR_TMP)
|
||||||
|
rm -f debian/control
|
||||||
|
debcargo package \
|
||||||
|
--config debian/debcargo.toml \
|
||||||
|
--changelog-ready \
|
||||||
|
--no-overlay-write-back \
|
||||||
|
--directory $(BUILDDIR_TMP) \
|
||||||
|
$(PACKAGE) \
|
||||||
|
$(shell dpkg-parsechangelog -l debian/changelog -SVersion | sed -e 's/-.*//')
|
||||||
|
cp $(BUILDDIR_TMP)/debian/control debian/control
|
||||||
|
rm -f $(BUILDDIR_TMP)/Cargo.lock
|
||||||
|
find $(BUILDDIR_TMP)/debian -name "*.hint" -delete
|
||||||
|
mv $(BUILDDIR_TMP) $(BUILDDIR)
|
||||||
|
|
||||||
|
.PHONY: deb
|
||||||
|
deb: $(DEB)
|
||||||
|
$(DEB): build
|
||||||
|
cd $(BUILDDIR); dpkg-buildpackage -b -us -uc --no-pre-clean
|
||||||
|
lintian $(DEB)
|
||||||
|
|
||||||
|
.PHONY: dsc
|
||||||
|
dsc: $(DSC)
|
||||||
|
$(DSC): build
|
||||||
|
cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d -nc
|
||||||
|
lintian $(DSC)
|
||||||
|
|
||||||
|
.PHONY: dinstall
|
||||||
|
dinstall: $(DEB)
|
||||||
|
dpkg -i $(DEB) $(DBG_DEB) $(LIB_DEB)
|
||||||
|
|
||||||
|
.PHONY: upload
|
||||||
|
upload: $(DEB)
|
||||||
|
tar cf - $(DEB) $(DBG_DEB) $(LIB_DEB) | ssh -X repoman@repo.proxmox.com -- upload --product devel --dist bullseye --arch $(DEB_BUILD_ARCH)
|
||||||
|
|
||||||
|
.PHONY: distclean
|
||||||
|
distclean: clean
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
cargo clean
|
||||||
|
rm -rf *.deb *.buildinfo *.changes *.dsc rust-$(PACKAGE)_*.tar.?z $(BUILDDIR) $(BUILDDIR_TMP)
|
||||||
|
find . -name '*~' -exec rm {} ';'
|
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
rust-proxmox-offline-mirror (0.1.0-1) stable; urgency=medium
|
||||||
|
|
||||||
|
* initial release
|
||||||
|
|
||||||
|
-- Proxmox Support Team <support@proxmox.com> Thu, 21 Jul 2022 14:49:12 +0200
|
120
debian/control
vendored
Normal file
120
debian/control
vendored
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
Source: rust-proxmox-offline-mirror
|
||||||
|
Section: rust
|
||||||
|
Priority: optional
|
||||||
|
Build-Depends: debhelper (>= 12),
|
||||||
|
dh-cargo (>= 25),
|
||||||
|
cargo:native,
|
||||||
|
rustc:native,
|
||||||
|
libstd-rust-dev,
|
||||||
|
librust-anyhow-1+default-dev,
|
||||||
|
librust-base64-0.13+default-dev,
|
||||||
|
librust-bzip2-0.4+default-dev,
|
||||||
|
librust-flate2-1+default-dev (>= 1.0.22-~~),
|
||||||
|
librust-hex-0.4+default-dev (>= 0.4.3-~~),
|
||||||
|
librust-hyper-0.14+default-dev,
|
||||||
|
librust-lazy-static-1+default-dev (>= 1.4-~~),
|
||||||
|
librust-nix-0.24+default-dev,
|
||||||
|
librust-openssl-0.10+default-dev,
|
||||||
|
librust-proxmox-apt-0.9+default-dev,
|
||||||
|
librust-proxmox-async-0.4+default-dev,
|
||||||
|
librust-proxmox-http-0.6+client-dev (>= 0.6.3-~~),
|
||||||
|
librust-proxmox-http-0.6+client-trait-dev (>= 0.6.3-~~),
|
||||||
|
librust-proxmox-http-0.6+default-dev (>= 0.6.3-~~),
|
||||||
|
librust-proxmox-http-0.6+proxmox-async-dev (>= 0.6.3-~~),
|
||||||
|
librust-proxmox-router-1+cli-dev (>= 1.1-~~),
|
||||||
|
librust-proxmox-router-1+default-dev (>= 1.1-~~),
|
||||||
|
librust-proxmox-schema-1+api-macro-dev (>= 1.1-~~),
|
||||||
|
librust-proxmox-schema-1+default-dev (>= 1.1-~~),
|
||||||
|
librust-proxmox-section-config-1+default-dev,
|
||||||
|
librust-proxmox-serde-0.1+default-dev,
|
||||||
|
librust-proxmox-subscription-0.2+api-types-dev,
|
||||||
|
librust-proxmox-subscription-0.2+default-dev,
|
||||||
|
librust-proxmox-sys-0.3+default-dev,
|
||||||
|
librust-proxmox-time-1+default-dev (>= 1.1.3-~~),
|
||||||
|
librust-regex-1+default-dev (>= 1.5.5-~~),
|
||||||
|
librust-sequoia-openpgp-1+default-dev (>= 1.7-~~),
|
||||||
|
librust-serde-1+default-dev,
|
||||||
|
librust-serde-1+derive-dev,
|
||||||
|
librust-serde-json-1+default-dev,
|
||||||
|
librust-ureq-2+default-dev (>= 2.4.0-~~),
|
||||||
|
librust-ureq-2+native-certs-dev (>= 2.4.0-~~),
|
||||||
|
librust-walkdir-2+default-dev (>= 2.3.1-~~),
|
||||||
|
librust-xz2-0.1+default-dev
|
||||||
|
Maintainer: Proxmox Support Team <support@proxmox.com>
|
||||||
|
Standards-Version: 4.5.1
|
||||||
|
Vcs-Git: git://git.proxmox.com/git/proxmox-offline-mirror.git
|
||||||
|
Vcs-Browser: https://git.proxmox.com/?p=proxmox-offline-mirror.git
|
||||||
|
Rules-Requires-Root: no
|
||||||
|
|
||||||
|
Package: librust-proxmox-offline-mirror-dev
|
||||||
|
Architecture: any
|
||||||
|
Multi-Arch: same
|
||||||
|
Depends:
|
||||||
|
${misc:Depends},
|
||||||
|
librust-anyhow-1+default-dev,
|
||||||
|
librust-base64-0.13+default-dev,
|
||||||
|
librust-bzip2-0.4+default-dev,
|
||||||
|
librust-flate2-1+default-dev (>= 1.0.22-~~),
|
||||||
|
librust-hex-0.4+default-dev (>= 0.4.3-~~),
|
||||||
|
librust-hyper-0.14+default-dev,
|
||||||
|
librust-lazy-static-1+default-dev (>= 1.4-~~),
|
||||||
|
librust-nix-0.24+default-dev,
|
||||||
|
librust-openssl-0.10+default-dev,
|
||||||
|
librust-proxmox-apt-0.9+default-dev,
|
||||||
|
librust-proxmox-async-0.4+default-dev,
|
||||||
|
librust-proxmox-http-0.6+client-dev (>= 0.6.3-~~),
|
||||||
|
librust-proxmox-http-0.6+client-trait-dev (>= 0.6.3-~~),
|
||||||
|
librust-proxmox-http-0.6+default-dev (>= 0.6.3-~~),
|
||||||
|
librust-proxmox-http-0.6+proxmox-async-dev (>= 0.6.3-~~),
|
||||||
|
librust-proxmox-router-1+cli-dev (>= 1.1-~~),
|
||||||
|
librust-proxmox-router-1+default-dev (>= 1.1-~~),
|
||||||
|
librust-proxmox-schema-1+api-macro-dev (>= 1.1-~~),
|
||||||
|
librust-proxmox-schema-1+default-dev (>= 1.1-~~),
|
||||||
|
librust-proxmox-section-config-1+default-dev,
|
||||||
|
librust-proxmox-serde-0.1+default-dev,
|
||||||
|
librust-proxmox-subscription-0.2+api-types-dev,
|
||||||
|
librust-proxmox-subscription-0.2+default-dev,
|
||||||
|
librust-proxmox-sys-0.3+default-dev,
|
||||||
|
librust-proxmox-time-1+default-dev (>= 1.1.3-~~),
|
||||||
|
librust-regex-1+default-dev (>= 1.5.5-~~),
|
||||||
|
librust-sequoia-openpgp-1+default-dev (>= 1.7-~~),
|
||||||
|
librust-serde-1+default-dev,
|
||||||
|
librust-serde-1+derive-dev,
|
||||||
|
librust-serde-json-1+default-dev,
|
||||||
|
librust-ureq-2+default-dev (>= 2.4.0-~~),
|
||||||
|
librust-ureq-2+native-certs-dev (>= 2.4.0-~~),
|
||||||
|
librust-walkdir-2+default-dev (>= 2.3.1-~~),
|
||||||
|
librust-xz2-0.1+default-dev
|
||||||
|
Provides:
|
||||||
|
librust-proxmox-offline-mirror+default-dev (= ${binary:Version}),
|
||||||
|
librust-proxmox-offline-mirror-0-dev (= ${binary:Version}),
|
||||||
|
librust-proxmox-offline-mirror-0+default-dev (= ${binary:Version}),
|
||||||
|
librust-proxmox-offline-mirror-0.1-dev (= ${binary:Version}),
|
||||||
|
librust-proxmox-offline-mirror-0.1+default-dev (= ${binary:Version}),
|
||||||
|
librust-proxmox-offline-mirror-0.1.0-dev (= ${binary:Version}),
|
||||||
|
librust-proxmox-offline-mirror-0.1.0+default-dev (= ${binary:Version})
|
||||||
|
Description: Proxmox offline repository mirror and subscription key manager - Rust source code
|
||||||
|
This package contains the source for the Rust proxmox-offline-mirror crate,
|
||||||
|
packaged by debcargo for use with cargo and dh-cargo.
|
||||||
|
|
||||||
|
Package: proxmox-offline-mirror
|
||||||
|
Architecture: any
|
||||||
|
Multi-Arch: allowed
|
||||||
|
Section: FIXME-(packages."(name)".section)
|
||||||
|
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: Proxmox offline repository mirror and subscription key manager
|
||||||
|
This package contains the following binaries built from the Rust crate
|
||||||
|
"proxmox-offline-mirror":
|
||||||
|
- proxmox-apt-repo
|
||||||
|
- proxmox-offline-mirror
|
16
debian/copyright
vendored
Normal file
16
debian/copyright
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Copyright (C) 2022 Proxmox Server Solutions GmbH
|
||||||
|
|
||||||
|
This software is written by Proxmox Server Solutions GmbH <support@proxmox.com>
|
||||||
|
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
10
debian/debcargo.toml
vendored
Normal file
10
debian/debcargo.toml
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
overlay = "."
|
||||||
|
crate_src_path = ".."
|
||||||
|
maintainer = "Proxmox Support Team <support@proxmox.com>"
|
||||||
|
|
||||||
|
[source]
|
||||||
|
vcs_git = "git://git.proxmox.com/git/proxmox-offline-mirror.git"
|
||||||
|
vcs_browser = "https://git.proxmox.com/?p=proxmox-offline-mirror.git"
|
||||||
|
|
||||||
|
[packages.bin]
|
||||||
|
section = "admin"
|
Loading…
Reference in New Issue
Block a user