1
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 3 years have passed since last update.

debuild の使い方

Last updated at Posted at 2021-03-27

こちらのサンプルと同様のことを行いました。
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) ...
1
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
1
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?