Suppose that we want to install a library like libsystemd-login0. The directory tree for that package is as follows:
Code: Select all
libsystemd-login0
├── DEBIAN
│ ├── control
│ └── md5sums
├── lib
│ └── x86_64-linux-gnu
│ ├── liblogin.so
│ ├── libsystemd-login.so.0 -> ./liblogin.so
│ └── libsystemd-login.so.0.2.1 -> ./liblogin.so
└── usr
└── share
└── libsystemd-login0
├── changelog
└── copyright
6 directories, 7 files
Code: Select all
find usr -type f -exec md5sum {} \; > DEBIAN/mdsums
a) man deb-control
b) critically view, ie study, the control files of existing packages to get an idea of how the various fields in the file are used
You will also need to add a changelog file. This file also follows a set of predefined rules. Consult other packages' changelog files to get an idea. The same thing applies for the copyright file. Follow the existing formats.
When your tree is ready, become root, cd to the tree's root parent directory and issue this chown command. Be careful when you are root using chown in this way as it can ruin your entire installation. Now you are warned. Like a paranoid on the most powerful antiparanoid pills, make sure that you are really at the parent directory of the root of your package's tree. Then, issue the command:
Code: Select all
chown -R root:root tree-root
Code: Select all
dpkg -b tree-root your-package-name-in-conformity-to-debian-rules.deb