build: Added unfinished build-deb.sh
This commit is contained in:
parent
66cbd23013
commit
0ab777d898
2 changed files with 25 additions and 1 deletions
23
build-deb.sh
Executable file
23
build-deb.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
cargo build --workspace --release
|
||||||
|
|
||||||
|
install -dvm755 target/release/dpkg/etc/squad_quest target/release/dpkg/usr/bin target/release/dpkg/DEBIAN target/release/dpkg/usr/share/doc/squad-quest
|
||||||
|
|
||||||
|
strip target/release/squad-quest-cli
|
||||||
|
strip target/release/squad-quest-discord
|
||||||
|
install -vm755 target/release/squad-quest-cli target/release/squad-quest-discord target/release/dpkg/usr/bin
|
||||||
|
|
||||||
|
install -vm 644 LICENSE target/release/dpkg/usr/share/doc/squad-quest/copyright
|
||||||
|
|
||||||
|
target/release/squad-quest-cli -qc nil init -i discord.toml -p target/release/dpkg/etc/squad_quest
|
||||||
|
cargo build --bin deb --release
|
||||||
|
target/release/deb > target/release/dpkg/DEBIAN/control
|
||||||
|
|
||||||
|
echo -n "" > target/release/dpkg/DEBIAN/conffiles
|
||||||
|
for file in $(ls target/release/dpkg/etc/squad_quest); do
|
||||||
|
if [ -f target/release/dpkg/etc/squad_quest/$file ]; then
|
||||||
|
echo "/etc/squad_quest/$file" >> target/release/dpkg/DEBIAN/conffiles
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
dpkg-deb --root-owner-group --build target/release/dpkg target/release/squad-quest.deb
|
||||||
|
|
@ -19,6 +19,7 @@ fn main() {
|
||||||
Section: misc\n\
|
Section: misc\n\
|
||||||
Priority: optional\n\
|
Priority: optional\n\
|
||||||
Homepage: {homepage}\n\
|
Homepage: {homepage}\n\
|
||||||
Description: Simple RPG-like system for hosting events\n\
|
Description: Simple RPG-like system for hosting events\n \
|
||||||
|
Includes discord bot and CLI\n\
|
||||||
Maintainer: Alexey Mirenkov <2ndbeam@disroot.org>");
|
Maintainer: Alexey Mirenkov <2ndbeam@disroot.org>");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue