Make it build as a standalone crate.

- Also remove the Makefile.  Having a Makefile raised wrong
    expectations.
This commit is contained in:
Justus Winter 2023-02-21 12:49:28 +01:00
parent b89c172c1d
commit 2ef356aa1c
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386
3 changed files with 3854 additions and 43 deletions

3847
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -25,14 +25,14 @@ edition = "2021"
rust-version = "1.60" rust-version = "1.60"
[badges] [badges]
gitlab = { repository = "sequoia-pgp/sequoia" } gitlab = { repository = "sequoia-pgp/sequoia-sq" }
maintenance = { status = "actively-developed" } maintenance = { status = "actively-developed" }
[dependencies] [dependencies]
buffered-reader = { path = "../buffered-reader", version = "1.0.0", default-features = false, features = ["compression-deflate"] } buffered-reader = { version = "1.0.0", default-features = false, features = ["compression-deflate"] }
sequoia-openpgp = { path = "../openpgp", version = "1.1", default-features = false, features = ["compression-deflate"] } sequoia-openpgp = { version = "1.1", default-features = false, features = ["compression-deflate"] }
sequoia-autocrypt = { path = "../autocrypt", version = "0.25", default-features = false, optional = true } sequoia-autocrypt = { version = "0.25", default-features = false, optional = true }
sequoia-net = { path = "../net", version = "0.26", default-features = false } sequoia-net = { version = "0.26", default-features = false }
anyhow = "1.0.18" anyhow = "1.0.18"
chrono = "0.4.10" chrono = "0.4.10"
clap = { version = "3", features = ["derive", "env", "wrap_help"] } clap = { version = "3", features = ["derive", "env", "wrap_help"] }
@ -50,8 +50,8 @@ anyhow = "1.0.18"
clap = { version = "3", features = ["derive", "wrap_help"] } clap = { version = "3", features = ["derive", "wrap_help"] }
clap_complete = "3" clap_complete = "3"
chrono = "0.4.10" chrono = "0.4.10"
sequoia-openpgp = { path = "../openpgp", version = "1.13", default-features = false } sequoia-openpgp = { version = "1.13", default-features = false }
sequoia-net = { path = "../net", version = "0.26", default-features = false } sequoia-net = { version = "0.26", default-features = false }
subplot-build = "0.5.0" subplot-build = "0.5.0"
cfg-if = "1" cfg-if = "1"

View File

@ -1,36 +0,0 @@
# Configuration.
CARGO_TARGET_DIR ?= $(shell pwd)/../target
# We currently only support absolute paths.
CARGO_TARGET_DIR := $(abspath $(CARGO_TARGET_DIR))
SQ ?= $(CARGO_TARGET_DIR)/debug/sq
# Tools.
CARGO ?= cargo
ifneq ($(filter Darwin %BSD,$(shell uname -s)),)
INSTALL ?= ginstall
else
INSTALL ?= install
endif
# Installation.
.PHONY: build-release
build-release:
CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
$(CARGO) build $(CARGO_FLAGS) --release --package sequoia-sq
$(MAKE) -C../store build-release
.PHONY: install
install: build-release
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
$(INSTALL) -t $(DESTDIR)$(PREFIX)/bin $(CARGO_TARGET_DIR)/release/sq
$(INSTALL) -d $(DESTDIR)$(PREFIX)/share/zsh/site-functions
$(INSTALL) -t $(DESTDIR)$(PREFIX)/share/zsh/site-functions \
$(CARGO_TARGET_DIR)/_sq
$(INSTALL) -d $(DESTDIR)$(PREFIX)/share/bash-completion/completions
$(INSTALL) $(CARGO_TARGET_DIR)/sq.bash \
$(DESTDIR)$(PREFIX)/share/bash-completion/completions/sq
$(INSTALL) -d $(DESTDIR)$(PREFIX)/share/fish/completions
$(INSTALL) -t $(DESTDIR)$(PREFIX)/share/fish/completions \
$(CARGO_TARGET_DIR)/sq.fish
$(MAKE) -C../store install