How to create a simply debian package (just compress/extract sources or any files with debian packaging)

若如初见. 提交于 2019-12-03 08:55:01
Gigamegs

First off you need to create a build folder and an archive of your files: tar czvf data.tar.gz files

Then in the build folder you must create a control file with some wanted informations:

 Package: xxxxxx
 Version: 0.0.1
 Section: user/hidden 
 Priority: optional
 Architecture: armel
 Installed-Size: `du -ks usr|cut -f 1`
 Maintainer: xxx@xxx.xx>

Then you can add independently preinst, postint, prerm and postrm shell scripts to control pre and post install and pre and post remove behaviour of the .deb file and then you can create the control archive with tar: tar czvf control.tar.gz control preinst postinst prerm postrm

Then you need a debian-binary file: echo 2.0 > debian-binary. In your build folder you should have now these files: debian-binary control.tar.gz and data.tar.gz.

Finally you need ar package to create the .deb file: ar -r xxx.deb debian-binary control.tar.gz data.tar.gz

Source: https://unix.stackexchange.com/questions/30303/how-to-create-a-deb-file-manually/30330#30330

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!