$ apt-get source apt
$ mv apt-1.8.2 apt
$ tar -c -f apt_1.8.2.orig.tar.gz -a apt
apt_1.8.2.orig.tar.gz 这个文件 表示上游的原始内容,里面有一个apt文件夹。
应用patch或者手工修改。
$ cd apt
$ patch -p1 < $smartmirror.patch
把 debian/source/format 的内容改成 3.0 (quilt)
$ dch -v 1.8.2-1 update
再修改一下 debian/changelog
$ dpkg-source --commit
输入一个以 .patch 结尾的名称,比如 deepin-smartmirror.patch。
$ dpkg-source -b .
会生成 apt_1.8.2-1.debian.tar.xz 的 apt_1.8.2-1.dsc 文件。*.dsc
是个描述性的文本文件,*.debian.tar.gz
是 debian 文件的压缩。
就完成了。