红联Linux门户
Linux帮助
当前位置: 红联Linux门户 > Debian

生成debian包的时候自动加上svn版本号

发布时间:2008-05-08 00:12:49来源:红联作者:DsylRDH
下面是一个 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]
文章评论

共有 0 条评论