Deb 套件包含 DEBIAN 控制目錄與安裝目錄樹(etc, usr, opt, tmp 等)。DEBIAN 至少含 control 檔,選用 postinst, postrm, preinst, prerm, copyright, changelog, conffiles 等。
Package:套件名稱Version:版本Description:描述Section:類別(utils, net, mail, text, x11...)Priority:重要性(required, standard, optional, extra)Essential:是否核心套件(yes/no),不可移除Architecture:架構(i386, amd64, arm...)Depends:依賴套件(逗號分隔)Pre-Depends:安裝前必須滿足的依賴Recommends/Suggests:推薦/建議安裝Package: bioinfoserv-arb
Version: 2007_14_08
Section: BioInfoServ
Priority: optional
Depends: bioinfoserv-base-directories (>= 1.0-1), xviewg (>= 3.2p1.4), xfig (>= 1:3), libstdc++2.10-glibc2.2
Suggests: fig2ps
Architecture: i386
Installed-Size: 26104
Maintainer: Mingwei Liu
Provides: bioinfoserv-arb
Description: The ARB software is a graphically oriented package comprising various tools for sequence database handling and data analysis.
If you want to print your graphs you probably need to install the suggested fig2ps package.
# 解壓檔案部份
dpkg -x bioinfoserv-base-directories_1.1-22_i386.deb bioinfoserv-base-directories
# 解壓控制資訊
dpkg -e bioinfoserv-base-directories_1.1-22_i386.deb bioinfoserv-base-directories/DEBIAN
# 編輯 DEBIAN/control 等檔案
# 重新打包
dpkg -b bioinfoserv-base-directories bioinfoserv-base-directories_1.1-22_i386.deb
參考 Debian 官方打包指南(dh_make, debuild 流程)。
/var/www/Version1.1-Xubuntu6.06。dpkg-scanpackages Version1.1-Xubuntu6.06 /dev/null | gzip -9c > Packages.gzgzip -d Packages.gznano Packages → 移除路徑前綴 Version1.1-Xubuntu6.06/ → 存檔gzip Packages → 放回目標目錄/etc/apt/sources.list:deb file:///var/www/Version1.1-Xubuntu6.06/ /deb https://your.domain.com/Path/To/Repo/ /apt-get update 後即可 apt-get install 套件名 安裝。