こちらのサンプルと同様のことを行いました。
Debianパッケージを作成してみた
debパッケージ作成方法をステップバイステップでまとめました
どちらの例も、
debian/compat
を加える必要があります。
ファイル構成
$ tree testpkg
testpkg
├── debian
│ ├── changelog
│ ├── compat
│ ├── control
│ ├── copyright
│ └── rules
└── testpkg
copyright は空のファイルです。
testpkg/debian/changelog
testpkg (0.1) unstable; urgency=low
* initial release
-- User <sample@sample.com> Mon, 04 Dec 2017 06:15:27 +0900
testpkg/debian/compat
9
testpkg/debian/control
Source: testpkg
Maintainer: ekzemplaro <sample@example.com>
Build-Depends: cdbs, debhelper
Standards-Version: 0.1
Package: testpkg
Architecture: all
Description: sample
testpkg/debian/rules
# !/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
install/testpkg::
install -d $(DEB_DESTDIR)/usr/bin
install -pm 755 testpkg $(DEB_DESTDIR)/usr/bin
testpkg/testpkg
# ! /bin/bash
echo 'Hello World!'
echo 'Good Afternoon!'
echo 'Mar/27/2021 PM 13:20'
パッケージの作成
debuild -uc -us
パッケージのインストール
sudo dpkg -i testpkg_0.1_all.deb
インストールされたプログラムの実行
$ testpkg
Hello World!
Good Afternoon!
Mar/27/2021 PM 13:20
パッケージのアンインストール
$ sudo dpkg --remove testpkg
(Reading database ... 101209 files and directories currently installed.)
Removing testpkg (0.1) ...