$ cat postinst #!/bin/sh set -e # Automatically added by dh_installdocs if [ "$1" = "configure" ]; then if [ -d /usr/doc -a ! -e /usr/doc/parted -a -d /usr/share/doc/parted ]; then ln -sf ../share/doc/parted /usr/doc/parted fi fi # End automatically added section
$ cat prerm #!/bin/sh set -e # Automatically added by dh_installdocs if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/parted ]; then rm -f /usr/doc/parted fi # End automatically added section
而最後是最有趣的文件:
$ cat control Package: parted Version: 1.4.24-4 Section: admin Priority: optional Architecture: i386 Depends: e2fsprogs (>= 1.27-2), libc6 (>= 2.2.4-4), libncurses5 (>= \ 5.2.20020112a-1), libparted1.4 (>= 1.4.13+14pre1), libreadline4 (>= \ 4.2a-4), libuuid1 Suggests: parted-doc Conflicts: fsresize Replaces: fsresize Installed-Size: 76 Maintainer: Timshel Knoll Description: The GNU Parted disk partition resizing program GNU Parted is a program that allows you to create, destroy, resize, move and copy hard disk partitions. This is useful for creating space for new operating systems, reorganizing disk usage, and copying data to new hard disks. . This package contains the Parted binary and manual page. . Parted currently supports DOS, Mac, Sun, BSD, GPT and PC98 disklabels/partition tables, as well as a 'loop' (raw disk) type which allows use on RAID/LVM. Filesystems supported are ext2, ext3, FAT (FAT16 and FAT32) and linux-swap. Parted can also detect HFS (Mac OS), JFS, NTFS, ReiserFS, UFS and XFS filesystems, but cannot create/remove/resize/check these filesystems yet. . The nature of this software means that any bugs could cause massive data loss. While there are no known bugs at the moment, they could exist, so please back up all important files before running it, and do so at your own risk.
Package: linuxstatus Version: 1.1-1 Section: base Priority: optional Architecture: all Depends: bash (>= 2.05a-11), textutils (>= 2.0-12), awk, procps (>= \ 1:2.0.7-8), sed (>= 3.02-8), grep (>= 2.4.2-3), coreutils (>= 5.0-5) Maintainer: Chr. Clemens Lee Description: Linux system information This script provides a broad overview of different system aspects.
將control文件拷貝到另一個debian目錄下的名為DEBIAN的目錄。
$ mkdir -p debian/DEBIAN $ find ./debian -type d | xargs chmod 755 $ cp control debian/DEBIAN
4.2 dpkg-deb
現在已經基本上完成了。我們只需要輸入:
$ dpkg-deb --build debian dpkg-deb: building package `linuxstatus' in `debian.deb'. $ mv debian.deb linuxstatus_1.1-1_all.deb
The home page of linuxstatus is at: http://www.kclee.de/clemens/unix/index.html#linuxstatus
The entire code base may be distributed under the terms of the GNU General Public License (GPL), which appears immediately below. Alternatively, all of the source code as any code derived from that code may instead be distributed under the GNU Lesser General Public License (LGPL), at the choice of the distributor. The complete text of the LGPL appears at the bottom of this file.