Debian Packages

Prerequisites

Install the following developer tools:

sudo apt install \
  devscripts \
  lintian \
  -y

Build the package

  1. Change into the build directory.

     cd deb/build
    
  2. Build the package.

     dpkg-deb --root-owner-group --build etc-driver-ic705
    
  3. Validate the package.

    lintian etc-driver-ic705.deb
    

Package Cheat Sheet

Command Description
sudo dpkg -i <package>.deb Install package
apt list --installed | grep <package> Check if package is installed
apt show <package> Get information about a package
dpkg -s <package> Get information about a package
dpkg -c <package> List package contents
dpkg -S </path/to/file> Find a package by file system path
sudo apt purge <package> Remove package and configuration
sudo apt remove <package> Remove package and keep configuration

Install package

sudo dpkg -i etc-driver-ic705.deb

Output:

Selecting previously unselected package etc-driver-ic705.
(Reading database ... 197379 files and directories currently installed.)
Preparing to unpack etc-driver-ic705.deb ...
Unpacking etc-driver-ic705 (0.0.1) ...
Setting up etc-driver-ic705 (0.0.1) ...

Check if package is installed

apt list --installed | grep etc-driver-ic705

Output:

etc-driver-ic705/now 0.0.1 all [installed,local]

Get information about a package

apt show etc-driver-ic705

Output:

Package: etc-driver-ic705
Version: 0.0.1
Status: install ok installed
Priority: optional
Section: universe/hamradio
Maintainer: Gaston Gonzalez <info@thetechprepper.com>
Installed-Size: unknown
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: IC-705 plug-and-play support for EmComm Tools
 Provides udev rules for setting up the CAT control and audio interfaces
 for the IC-705 when the USB cable is connected.

The dpkg command can also be used to get information about a package.

dpkg -s etc-driver-ic705

Output:

Package: etc-driver-ic705
Status: install ok installed
Priority: optional
Section: universe/hamradio
Maintainer: Gaston Gonzalez <info@thetechprepper.com>
Architecture: all
Version: 0.0.1
Description: IC-705 plug-and-play support for EmComm Tools
 Provides udev rules for setting up the CAT control and audio interfaces
 for the IC-705 when the USB cable is connected.

List package contents

dpkg -c etc-driver-ic705.deb

Output:

drwxr-xr-x root/root         0 2024-03-09 05:12 ./
drwxr-xr-x root/root         0 2024-03-09 05:12 ./etc/
drwxr-xr-x root/root         0 2024-03-09 04:58 ./etc/udev/
drwxr-xr-x root/root         0 2024-03-09 05:10 ./etc/udev/rules.d/
-rw-r--r-- root/root       810 2024-03-09 05:10 ./etc/udev/rules.d/90-ic705.rules
drwxr-xr-x root/root         0 2024-03-07 15:33 ./opt/
drwxr-xr-x root/root         0 2024-03-07 15:33 ./opt/emcomm-tools-server/
drwxr-xr-x root/root         0 2024-03-07 15:33 ./opt/emcomm-tools-server/bin/
drwxr-xr-x root/root         0 2024-03-09 05:12 ./usr/
drwxr-xr-x root/root         0 2024-03-09 04:47 ./usr/share/
drwxr-xr-x root/root         0 2024-03-09 04:47 ./usr/share/doc/
drwxr-xr-x root/root         0 2024-03-09 05:12 ./usr/share/doc/etc-driver-ic705/
-rw-r--r-- root/root       172 2024-03-09 05:12 ./usr/share/doc/etc-driver-ic705/changelog.gz

Find a package by file system path

dpkg -S /etc/udev/rules.d/90-ic705.rules

Output:

etc-driver-ic705: /etc/udev/rules.d/90-ic705.rules

Remove package and configuration

sudo apt purge etc-driver-ic705

Output:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  etc-driver-ic705*
0 upgraded, 0 newly installed, 1 to remove and 234 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 197384 files and directories currently installed.)
Removing etc-driver-ic705 (0.0.1) ...

Remove package and keep configuration

sudo apt remove etc-driver-ic705

Copyright © 2024 The Tech Prepper, LLC