rpi-imager をソースコードからインストールする理由
ラズベリーパイ公式サイトからダウンロードできるOSイメージ書き込みアプリrpi-imagerはubuntuしか対応しておらず、Debianのリポジトリにもないので当初snapdで対応していた。
パッケージ管理はできればdpkg
aptで統一しておきたいことから、ソースからDebian用のdebパッケージを作りsnapd版のrpi-imagerの利用を止めることとした。
ラズベリーパイ ソフトウェア 公式サイト:https://www.raspberrypi.com/software/
rpi-imager をビルドするために必要なライブラリをインストールする
$ sudo apt install --no-install-recommends build-essential devscripts debhelper cmake git libarchive-dev libcurl4-gnutls-dev qtbase5-dev qtbase5-dev-tools qtdeclarative5-dev libqt5svg5-dev qttools5-dev libgnutls28-dev qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtquick-templates2 qml-module-qtquick-window2 qml-module-qtgraphicaleffects
ソースコードを入手する
$ git clone --depth 1 https://github.com/raspberrypi/rpi-imager
Debian パッケージをビルド、インストールする
$ cd rpi-imager
$ debuild -uc -us
正常にビルドが完了したら1つ上のディレクトリに rpi-imager rpi-imager-dbsym
の2つのdebパッケージが生成されるので、どちらもインストールする。
$ cd ../
$ sudo apt install ./rpi-imager*.debv
起動すると以下の画像のとおりになる。