Skip to content
Snippets Groups Projects
Commit 5b776270 authored by Michael Aaron Murphy's avatar Michael Aaron Murphy
Browse files

Merge branch 'debian-packaging' into 'master'

Debian packaging support

See merge request redox-os/ion!869
parents 1ca34dff 62f552aa
No related branches found
No related tags found
1 merge request!869Debian packaging support
.*
!.cargo
!.travis
cachegrind.*
perf.*
target
manual/book
.cargo/config
vendor/
vendor.tar.xz
......@@ -27,7 +27,7 @@ redox:
- rustup default nightly-2018-07-18
- rustup target add x86_64-unknown-redox
script:
- cargo build --target x86_64-unknown-redox
- make REDOX=1
cache:
paths:
- cargo/
......
......@@ -30,7 +30,7 @@ version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -73,7 +73,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cfg-if"
version = "0.1.5"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
......@@ -259,7 +259,7 @@ name = "memchr"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
......@@ -320,17 +320,12 @@ name = "redox_syscall"
version = "0.1.40"
source = "git+https://gitlab.redox-os.org/redox-os/syscall.git?branch=relibc#739aef47b8e6b300874945c3c33bb9550414b5b8"
[[package]]
name = "redox_syscall"
version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "redox_termios"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (git+https://gitlab.redox-os.org/redox-os/syscall.git?branch=relibc)",
]
[[package]]
......@@ -416,7 +411,7 @@ version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (git+https://gitlab.redox-os.org/redox-os/syscall.git?branch=relibc)",
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
......@@ -526,7 +521,7 @@ source = "git+https://github.com/whitequark/rust-xdg#090afef2509d746e48d6bfa9b2e
"checksum bytecount 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f861d9ce359f56dbcb6e0c2a1cb84e52ad732cadb57b806adeb3c7668caccbd8"
"checksum calculate 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dfe3fe310e5858ba47beb9443acec7fb39b90ea5677d35636306fe7b495a547c"
"checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16"
"checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3"
"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"
"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e"
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
"checksum decimal 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e6458723bc760383275fbc02f4c769b2e5f3de782abaf5e7e0b9b7f0368a63ed"
......@@ -549,7 +544,6 @@ source = "git+https://github.com/whitequark/rust-xdg#090afef2509d746e48d6bfa9b2e
"checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372"
"checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db"
"checksum redox_syscall 0.1.40 (git+https://gitlab.redox-os.org/redox-os/syscall.git?branch=relibc)" = "<none>"
"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
"checksum regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2069749032ea3ec200ca51e4a31df41759190a88edca0d2d86ee8bedf7073341"
"checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d"
......
......@@ -63,3 +63,4 @@ panic = "abort"
[patch.crates-io]
liner = { git = "https://gitlab.redox-os.org/redox-os/liner" }
redox_syscall = { git = "https://gitlab.redox-os.org/redox-os/syscall.git", branch = "relibc" }
\ No newline at end of file
prefix ?= /usr/local
BINARY = $(shell echo $(prefix)/bin/ion | sed 's/\/\//\//g')
prefix ?= usr/local
BINARY = $(prefix)/bin/ion
RELEASE = debug
DEBUG ?= 0
all:
cargo build --release
ifeq (0, $(DEBUG))
ARGS += --release
RELEASE = release
endif
ifeq (1,$(REDOX))
ARGS += --target x86_64-unknown-redox
endif
.PHONY: all clean distclean install uninstall
all: .cargo/config
if [ -f vendor.tar.xz ]; \
then \
tar pxf vendor.tar.xz; \
cargo build $(ARGS) --frozen; \
else \
cargo build $(ARGS); \
fi
clean:
cargo clean
distclean:
rm -rf vendor vendor.tar.xz .cargo
tests:
cargo test --manifest-path members/braces/Cargo.toml
......@@ -12,12 +37,27 @@ tests:
cargo test
bash examples/run_examples.sh
install: update-shells
install -Dm0755 target/release/ion $(DESTDIR)/$(BINARY)
install:
install -Dm0755 target/$(RELEASE)/ion $(DESTDIR)/$(BINARY)
uninstall:
rm $(DESTDIR)/$(BINARY)
.cargo/config:
mkdir -p .cargo
if [ -f vendor.tar.xz ]; then \
cp vendor_config $@; \
else \
cp nonvendor_config $@; \
fi \
vendor.tar.xz:
cargo vendor
tar pcfJ vendor.tar.xz vendor
rm -rf vendor
vendor: .cargo/config vendor.tar.xz
update-shells:
if ! grep ion /etc/shells >/dev/null; then \
echo $(BINARY) >> /etc/shells; \
......
......@@ -28,27 +28,29 @@ The manual is located [here](https://doc.redox-os.org/ion-manual/) on Redox OS's
also included in the source code for Ion, within the **manual** directory, which you may build
with **mdbook**.
# Compile / Install Instructions
# Build dependencies
Rust nightly is required for compiling Ion. Simplest way to obtain Rust/Cargo is by
installing the [Rustup toolchain manager](https://rustup.rs/), in the event that your OS does
not ship Rust natively, or if you want more flexibility in Rust compilation capabilities.
Those who are developing software with Rust should install the [Rustup toolchain manager](https://rustup.rs/).
After installing rustup, run `rustup default 1.28.0` to set your Rust toolchain to the version that Ion is
targeting at the moment. To build for Redox OS, `rustup default nightly` is required to build the Redox
dependencies.
Then, it's just a matter of performing one of the following methods:
> Distribution packagers must ensure that their distribution has packaged both cargo and rustc 1.28.0.
> Distribution packagers should also currently build Ion from git. Release tarballs have not been made yet
> due to the shell being incomplete in a few remaining areas.
## Install Direct From Git
```sh
cargo +nightly install --git https://gitlab.redox-os.org/redox-os/ion/ ion-shell
```
## Build Locally
# Compile instructions
```sh
git clone https://gitlab.redox-os.org/redox-os/ion/
cd ion && make && sudo make install prefix=/usr
cd ion
make
sudo make install prefix=/usr
sudo make update-shells
```
> To compile in DEBUG mode, pass `DEBUG=1` as an argument to `make`
# Vim/NeoVim Syntax Highlighting Plugin
We do have an [officially-supported syntax highlighting plugin](https://gitlab.redox-os.org/redox-os/ion-vim) for all the
......
ion-shell (1.0.0~alpha0) cosmic; urgency=medium
* Initial release
-- Michael Aaron Murphy <michael@system76.com> Sat, 20 Oct 2018 12:12:12 -0600
9
Source: ion-shell
Section: admin
Priority: optional
Maintainer: Michael Aaron Murphy <michael@system76.com>
Build-Depends: debhelper (>=9), cargo
Standards-Version: 4.1.4
Homepage: https://gitlab.redox-os.org/redox-os/ion
Package: ion-shell
Architecture: any
Depends: ${shlibs:Depends}
Description: A next generation system shell, written for Redox in Rust.
A next generation system shell, written for Redox in Rust.
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ion
Source: https://gitlab.redox-os.org/redox-os/ion
Files: *
Copyright: Copyright 2018 Redox OS
License: MIT
ion-shell-dbgsym_1.0.0~alpha0_amd64.ddeb debug optional
ion-shell_1.0.0~alpha0_amd64.buildinfo admin optional
ion-shell_1.0.0~alpha0_amd64.deb admin optional
#!/bin/sh
if ! grep ion /etc/shells >/dev/null; then
echo $(BINARY) >> /etc/shells;
else
shell=$(shell grep ion /etc/shells);
if [ $$shell != $(BINARY) ]; then
before=$$(echo $$shell | sed 's/\//\\\//g');
after=$$(echo $(BINARY) | sed 's/\//\\\//g');
sed -i -e "s/$$before/$$after/g" /etc/shells;
fi
fi
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_clean:
make clean
make vendor
override_dh_auto_install:
dh_auto_install -- prefix=/usr
3.0 (native)
This diff is collapsed.
File moved
[target.x86_64-unknown-redox]
linker = "x86_64-unknown-redox-gcc"
[source.crates-io]
replace-with = "vendored-sources"
[source."https://github.com/whitequark/rust-xdg"]
git = "https://github.com/whitequark/rust-xdg"
branch = "master"
replace-with = "vendored-sources"
[source."https://gitlab.redox-os.org/redox-os/liner"]
git = "https://gitlab.redox-os.org/redox-os/liner"
branch = "master"
replace-with = "vendored-sources"
[source."https://gitlab.redox-os.org/redox-os/small"]
git = "https://gitlab.redox-os.org/redox-os/small"
branch = "master"
replace-with = "vendored-sources"
[source."https://gitlab.redox-os.org/redox-os/syscall.git"]
git = "https://gitlab.redox-os.org/redox-os/syscall.git"
branch = "relibc"
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment