添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
博学的汤圆  ·  Empty Mat returned ...·  9 小时前    · 
没有腹肌的香菇  ·  How to build OpenCV ...·  9 小时前    · 
千年单身的肉夹馍  ·  New MacOS and Xcode ...·  21 小时前    · 
痴情的毛衣  ·  Xcode update policy - ...·  21 小时前    · 
想出国的钥匙扣  ·  cytoscape vs ...·  昨天    · 
逃跑的松鼠  ·  QRadar: "Unable to ...·  1 月前    · 
乖乖的皮带  ·  [SOLVED] System ...·  2 月前    · 
眼睛小的鸭蛋  ·  推特福利姬可可幂 ...·  5 月前    · 

This page describes how I build packages for personal use. Others can copy this method for their own use, and use it on sources written by me for programs that are not (yet) included in Debian.

This page does not describe how to create the contents of the debian/ directory; only how to build a package.

Build procedure

A Debian package is built using dpkg-buildpackage. I normally use the debuild wrapper, which is in the devscripts package. It needs several components:

  • The sources of what's being packaged, of course
  • A debian/ directory in there, with package building information
  • An original source tarball
  • The idea is that you take a piece of software from the web, unpack it, add a debian/ directory, and build a package out of it. When doing that, it is clear where all those pieces come from, and which pieces you have write as part of packaging this software (everything in debian/, nothing else).

    The problem

    But I want to create packages from my own software. And more specifically, I want to create them as part of testing the software. That means I don't want to prepare a release before every package build. The debian/ directory can simply be part of my source. But where do I get my original source tarball?

    The solution

    The answer is simple: Technically, I do make a release before every build. I wrote a script which does the following:

  • Make a copy of the source
  • Run fakeroot debian/rules clean in it
  • Remove *.swp, CVS, .git, .svn
  • Remove the debian/ directory
  • Pack this directory into an appropriately named original source tarball
  • Copy the debian/ directory back
  • Run debuild
  • After running this script, the resulting package files are in /tmp. They can be installed by running dpkg --install /tmp/packagename.deb as root.

    The script

    If you want to use this method, the script is available for download. Put it in your path for convenience.

    Security considerations