PACKAGING.md
44 lines · 1806 bytes
1# Notes For Package Maintainers
2
3## Linking Against System Packages
4
5The default Cargo features for __iamb__ will bundle SQLite. Package maintainers
6may want to link against the system's native SQLite instead. To do so, you'll
7want to build without the default features, and explicitly add back in `desktop`
8(assuming you want notifications and clipboard support):
9
10```
11% cargo build --release --no-default-features --features=desktop
12```
13
14## Enabling LTO
15
16Enabling LTO can result in smaller binaries. There is a separate profile to
17enable it when building:
18
19```
20% cargo build --profile release-lto
21```
22
23Note that this [can fail][ring-lto] in some build environments if both Clang
24and GCC are present.
25
26## Documentation
27
28In addition to the compiled binary, there are other files in the repo that
29you'll want to install as part of a package:
30
31<!-- Please keep in sync w/ the `deb`/`generate-rpm` sections of `Cargo.toml` -->
32| Repository Path | Installed Path (may vary per OS) |
33| ----------------------- | ----------------------------------------------- |
34| /iamb.desktop | /usr/share/applications/iamb.desktop |
35| /config.example.toml | /usr/share/iamb/config.example.toml |
36| /docs/iamb-256x256.png | /usr/share/icons/hicolor/256x256/apps/iamb.png |
37| /docs/iamb-512x512.png | /usr/share/icons/hicolor/512x512/apps/iamb.png |
38| /docs/iamb.svg | /usr/share/icons/hicolor/scalable/apps/iamb.svg |
39| /docs/iamb.1 | /usr/share/man/man1/iamb.1 |
40| /docs/iamb.5 | /usr/share/man/man5/iamb.5 |
41| /docs/iamb.metainfo.xml | /usr/share/metainfo/iamb.metainfo.xml |
42
43[ring-lto]: https://github.com/briansmith/ring/issues/1444
44[rustls]: https://crates.io/crates/rustls