From b699af4be4ed4df4693b1b4615913aec7a0b290b Mon Sep 17 00:00:00 2001 From: Riey Date: Tue, 19 Jan 2021 03:38:49 +0900 Subject: [PATCH] Using dpkg-deb in script --- pkg/control.in | 10 ++++++++++ pkg/install.sh | 12 ++++++------ pkg/release-deb.sh | 21 ++++++++++++++------- pkg/release.sh | 2 +- 4 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 pkg/control.in diff --git a/pkg/control.in b/pkg/control.in new file mode 100644 index 00000000..8bc48647 --- /dev/null +++ b/pkg/control.in @@ -0,0 +1,10 @@ +Package: kime +Version: %VER% +Maintainer: Riey +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 + diff --git a/pkg/install.sh b/pkg/install.sh index 15723904..0e8d71b1 100755 --- a/pkg/install.sh +++ b/pkg/install.sh @@ -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" diff --git a/pkg/release-deb.sh b/pkg/release-deb.sh index 94cfabd5..2c0eae71 100755 --- a/pkg/release-deb.sh +++ b/pkg/release-deb.sh @@ -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 diff --git a/pkg/release.sh b/pkg/release.sh index 58a68e41..53dc1935 100755 --- a/pkg/release.sh +++ b/pkg/release.sh @@ -2,7 +2,7 @@ set -e -cd $(dirname $0)/.. +cd $(readlink -f $(dirname $0))/.. cargo build --release