下面是一个 debian/rules 的例子,生成的debian包名字就可能叫itcc_0.8.1.svn468M_amd64.deb[code]#!/usr/bin/make -f
# to re-generate debian/control, invoke
# fakeroot debian/rules debian/control DEB_AUTO_UPDATE_DEBIAN_CONTROL:=yes
#
export DH_ALWAYS_EXCLUDE=.svn
DEB_PYTHON_SYSTEM = pycentral
VDEF := $(strip $(shell dpkg-parsechangelog | awk -F: ‘/^Version:/ {print $$NF}’))
VSVN := $(shell if which svnversion > /dev/null; then svnversion | sed s/^.*:// \
| sed s/^/.svn/ | sed s/.svnexported// ; fi)
DEB_DH_GENCONTROL_ARGS = -u-v$(VDEF)$(VSVN)
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk[/code]