Add rudimentary, ugly Debian packaging

Someone should do this right, and upload the result to Debian.
This commit is contained in:
Lars Wirzenius 2022-07-15 16:57:23 +03:00
parent 39482d4768
commit f8d7ea86cc
No known key found for this signature in database
GPG key ID: CBADF5E2519EC824
9 changed files with 68 additions and 0 deletions

9
tools/debian/build-deb Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
set -euo pipefail
S="$(dpkg-parsechangelog -SSource)"
V="$(dpkg-parsechangelog -SVersion | sed 's/-[^-]*$//')"
git archive HEAD | gzip >"../${S}_${V}.orig.tar.gz"
dpkg-buildpackage -us -uc

View file

6
tools/debian/changelog Normal file
View file

@ -0,0 +1,6 @@
openpgp-card-tool (0.0.11-1) unstable; urgency=medium
* Initial packaging. This is not intended to be uploaded to Debian, so
not closing of an ITP bug.
-- Lars Wirzenius <liw@liw.fi> Thu, 30 Sep 2021 09:51:32 +0300

2
tools/debian/compat Normal file
View file

@ -0,0 +1,2 @@
10

23
tools/debian/control Normal file
View file

@ -0,0 +1,23 @@
Source: openpgp-card-tool
Maintainer: Heiko Schaefer <heiko@schaefer.name>
Uploaders: Lars Wirzenius <liw@liw.fi>
Section: admin
Priority: optional
Standards-Version: 4.2.0
Build-Depends:
debhelper (>= 10~),
dh-cargo,
libclang-dev,
libpcsclite-dev,
nettle-dev,
pkg-config,
Homepage: https://gitlab.com/openpgp-card/openpgp-card
Package: openpgp-card-tool
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
Built-Using: ${cargo:Built-Using}
Description: tool to manage OpenPGP hardware tokens
The opgpcard tool allows you to inspect, configure, administer,
factory reset, and generally manage OpenPGP cards (hardware tokens),
such as Gnuk, Yubikeys, Nitrokeys, and similar.

3
tools/debian/copyright Normal file
View file

@ -0,0 +1,3 @@
Copyright 2021-2022 Heiko Schaefer <heiko@schaefer.name>
# SPDX-License-Identifier: MIT OR Apache-2.0

1
tools/debian/docs Normal file
View file

@ -0,0 +1 @@
README.md

23
tools/debian/rules Executable file
View file

@ -0,0 +1,23 @@
#!/usr/bin/make -f
%:
dh $@ --buildsystem cargo
override_dh_auto_clean:
echo auto clean
override_dh_auto_configure:
echo auto configure
override_dh_auto_build:
cargo --version
rustc --version
cargo build --release
override_dh_auto_test:
true
override_dh_auto_install:
install -d debian/openpgp-card-tool/bin
cargo install --locked --path=. --root=debian/openpgp-card-tool
find debian -name ".crates*" -delete

View file

@ -0,0 +1 @@
3.0 (quilt)