我需要一些帮助来解决以下问题:
我有一个每天使用 Launchpad 的食谱功能构建的 debian 包。版本名称(和源目录的名称)是自动生成的,包括当前的修订号。我想修改 debian/rules 文件以提取修订号并将其传递给 CMake。
到目前为止它不起作用 - 似乎将一个空字符串传递给 CMake。我不知道问题出在我的 make 代码中还是其他问题上。
规则文件:
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
%:
dh $@ --parallel --list-missing
# Try to detect the Bazaar revision number from the directory name
ifneq ($(findstring bzr,$(PWD)),)
COMPONENTS := $(PWD)
COMPONENTSL := $(subst -,' ',COMPONENTS)
COMPONENTSLL := $(subst ~,' ',COMPONENTSL)
BZRVER := $(filter bzr%,COMPONENTSLL)
BZRVERN := $(subst bzr,,$(BZRVER))
override_dh_auto_configure:
dh_auto_configure -- -DRELEASE_BUILD=0 -DBZR_REVISION=$(BZRVERN)
endif
构建日志的相关部分:
make[1]: Entering directory `/build/buildd/stellarium-0.11.2~bzr5066'
dh_auto_configure -- -DRELEASE_BUILD=0 -DBZR_REVISION=
mkdir -p obj-i686-linux-gnu
cd obj-i686-linux-gnu
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DRELEASE_BUILD=0 -DBZR_REVISION=
有任何想法吗?