0
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.

簡単な Deb パッケージの作成

Last updated at Posted at 2021-03-26

次のページと同様のことを行いました。
[メモ] 最小限の手間で、debパッケージ作成 (非推奨)

ソースコード

$ tree hellodeb_1.0-1_amd64
hellodeb_1.0-1_amd64
├── DEBIAN
│   ├── changelog
│   ├── control
│   ├── copyright
│   └── rules
└── usr
    └── local
        └── bin
            └── hellodeb.sh

作成する必要のあるファイルは、control と hellodeb.sh です。
changelog copyright rules は空です。

$ ls -al hellodeb_1.0-1_amd64/DEBIAN/
合計 12
drwxrwxr-x 2 uchida uchida 4096 3月 26 13:19 .
drwxrwxr-x 4 uchida uchida 4096 3月 26 13:15 ..
-rw-rw-r-- 1 uchida uchida 0 3月 26 13:12 changelog
-rw-rw-r-- 1 uchida uchida 98 3月 26 13:19 control
-rw-rw-r-- 1 uchida uchida 0 3月 26 13:12 copyright
-rw-rw-r-- 1 uchida uchida 0 3月 26 13:12 rules


```text:hellodeb_1.0-1_amd64/DEBIAN/control
Package: hellodeb
Version: 1.0.1
Architecture: all
Maintainer: ekzemplaro
Description: Hello Deb!
hellodeb_1.0-1_amd64/usr/local/bin/hellodeb.sh
#! /bin/bash
#
echo 'Hello Everybody!'
echo 'Mar/26/2021'

パッケージの作成

dpkg-deb --build hellodeb_1.0-1_amd64

hellodeb_1.0-1_amd64.deb というファイルができます。

パッケージのインストール

dpkg -i hellodeb_1.0-1_amd64.deb

インストールされたプログラムを実行

/usr/local/bin/hellodeb.sh

実行結果

$ /usr/local/bin/hellodeb.sh
Hello Everybody!
Mar/26/2021
0
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
0
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?