Debianパッケージにpostinstファイルを追加するにはどうすればよいですか?

Debianパッケージにpostinstファイルを追加するにはどうすればよいですか?

以前のバージョンの残りの部分をクリーンアップするために、Debianパッケージに "postinst"スクリプトを追加しようとしています。

私はdebian /ディレクトリに "postinst"ファイルを作成しましたが、.debファイルには存在しません。

権限:

-rwxrwxr-x 1 kp kp 354 Sep 16 20:00 postinst*

コンテンツ:

#!/bin/sh

set -e
set -x

...

ベストアンサー1

postinstこのファイル(およびその他の類似ファイル)をパッケージ準備ディレクトリにコピーする必要があります。dh_make実行可能ファイルを使用する場合は、すべての操作を手動で実行する場合はdh_installdebもちろん含まれますdh install。ファイルをdebian/tmp/DEBIAN/準備debian/tmpディレクトリにコピーします。

おすすめ記事