2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[メモ] Debianソースにパッチを当てて、debパッケージ作成

2
Last updated at Posted at 2017-11-22

概要

Debianで、ソースをちょっといじって、パッケージを作りたいときに。
# テラテイルでの回答(asciijump というアプリが実行されない)にて、使用.

TL;DR

  1. debian/patches/フォルダにパッチファイルを入れる。
  2. debian/patches/seriesファイルにパッチファイル名を記述する。

手順 (例)

ラズパイにて
# aptでsourceのレポジトリを有効化
sudo sed -i -e 's/#deb-src/deb-src/g' /etc/apt/sources.list
sudo apt update
#
# deb作成用パッケージ
sudo apt install -y devscripts
#
# asciijumpのビルドに必要なパッケージ取得
sudo apt build-dep -y asciijump
#
# 作業フォルダへ移動
mkdir ~/asciijump
cd ~/asciijump
#
# ソース取得
apt source asciijump
cd asciijump-1.0.2~beta/
#
# パッチを入れる (作る)
wget https://gist.githubusercontent.com/mt08xx/9cdf4bebed3b04509253f8778620372b/raw/cf94da0d0debb80cf8b016636fca325acb3e452e/xfnc.c.patch -O ./debian/patches/xfnc.c.patch
echo xfnc.c.patch  >> debian/patches/series
#
# ビルド
debuild -us -uc
#
# できあがったパッケージ
# ls -1 ../*.deb
# ../asciijump_1.0.2~beta-7.1_armhf.deb
# ../asciijump-dbgsym_1.0.2~beta-7.1_armhf.deb
#
# asciijumpパッケージをインストールしてたら、削除する
sudo apt remove -y asciijump 
#
# 今回のつくったdebファイルを指定して、インストール
sudo apt install -y ../asciijump_1.0.2~beta-7.1_armhf.deb
#
# 実行
asciijump

その他

  • 配布時には、バージョンの記述などを変えないといけないと思う。(混同するよね?)
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?