Skip to content

Commit

Permalink
Using dpkg-deb in script
Browse files Browse the repository at this point in the history
  • Loading branch information
Riey committed Jan 18, 2021
1 parent 2d13e4a commit b699af4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 14 deletions.
10 changes: 10 additions & 0 deletions pkg/control.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Package: kime
Version: %VER%
Maintainer: Riey <[email protected]>
Description: Korean IME
Homepage: https://github.com/Riey/kime
Section: utils
Priority: optional
Architecture: amd64
Depends: libpango1.0-dev libcairo2-dev libgtk-3-dev libglib2.0 libxcb1

12 changes: 6 additions & 6 deletions pkg/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

set -e

cd $(dirname "$0")/../build/out
cd $(readlink -f $(dirname $0))/../build/out

install -Dm755 kime-xim -t "/usr/bin"
install -Dm755 im-kime.so -t "/usr/lib/gtk-3.0/3.0.0/immodules"
install -Dm755 libkime_engine.so -t "/usr/lib"
install -Dm644 kime_engine.h -t "/usr/include/kime"
install -Dm644 config.yaml -t "/etc/kime"
install -Dm755 kime-xim -t "$PREFIX/usr/bin"
install -Dm755 im-kime.so -t "$PREFIX/usr/lib/gtk-3.0/3.0.0/immodules"
install -Dm755 libkime_engine.so -t "$PREFIX/usr/lib"
install -Dm644 kime_engine.h -t "$PREFIX/usr/include/kime"
install -Dm644 config.yaml -t "$PREFIX/etc/kime"

21 changes: 14 additions & 7 deletions pkg/release-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@

set -e

cd $(dirname $0)/..
cd $(readlink -f $(dirname $0))/..

cargo build --release
VER=$(grep '^version =' gtk3/Cargo.toml|head -n1|cut -d\" -f2)

mkdir -pv build/deb
mkdir -pv build/deb/kime/DEBIAN

cargo deb -p kime-engine-capi
cargo deb -p kime-gtk3
cargo deb -p kime-xim
sed "s/%VER%/${VER}/" pkg/control.in > build/deb/kime/DEBIAN/control

PREFIX=$PWD/build/deb/kime pkg/install.sh

cd build/deb

dpkg-deb --build kime

mv kime.deb "kime_${VER}_amd64.deb"

rm -rf kime

cp target/debian/* build/deb
2 changes: 1 addition & 1 deletion pkg/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

cd $(dirname $0)/..
cd $(readlink -f $(dirname $0))/..

cargo build --release

Expand Down

0 comments on commit b699af4

Please sign in to comment.