我可以找到的所有Debian打包示例都假设用户从上游构建重新打包,因此它解压缩源tar包,配置,重建和重新打包.我正在尝试为自己的库构建一个包,它是使用autotools构建的.我尝试了几种不同的方法,我最近的尝试看起来像这样:
DH_PACKAGE_NAME=`echo $(PACKAGE_NAME) | sed s/_/-/g`
dist-hook:
cd $(distdir) ; \
export DEBFULLNAME="Some One" ; \
export DEBEMAIL="someone@foo.com" ; \
echo -e "\n" | dh_make --copyright blank --library --native \
--packagename $(DH_PACKAGE_NAME)
mv $(distdir)/debian $(distdir)/DEBIAN
dpkg-deb --build $(distdir)
Run Code Online (Sandbox Code Playgroud)
为此dpkg-deb抱怨dh_makes控制文件.我有一个问题,解决方案更简单了吗?
我有一个大型的autoconf/automake项目,使用AC_CONFIG_SUBDIRS分解成组件.有没有办法让autoconf/configure运行得更快?也许并行进行子目录,或缓存可重用的结果?
我可以轻松地编写一个可以并行构建组件的构建脚本,但更愿意不添加构建结构维护的辅助点.
学习Jenkins,并试图让它构建一个我的构建脚本是用python编写的项目.
./build.py -i
Run Code Online (Sandbox Code Playgroud)
我尝试过使用'执行脚本'和'执行Python脚本'.脚本的第一行是
#!/usr/bin/python
Run Code Online (Sandbox Code Playgroud)
Jenkins没有抱怨任何一次尝试,它似乎忽略了设置,一旦代码签出就宣布构建成功.
我读过一些旧的邮件列表,暗示我必须编写一个bash脚本(build.sh)并让它调用python脚本.我希望这不是答案.
作为一个简单的例子,在用户foo的〜/ .bashrc中有一个别名;
alias ll='ls -l'
Run Code Online (Sandbox Code Playgroud)
使用sudo我可以看到别名已设置;
bar@laptop:~$ sudo -u foo -i alias ll
alias ll=`ls -l'
Run Code Online (Sandbox Code Playgroud)
但是,我实际上不能使用别名;
bar@laptop:~$ sudo -u foo -i ll
-bash: ll: command not found
Run Code Online (Sandbox Code Playgroud)
作为bash函数的命令工作正常.有没有办法让别名也起作用?
我在 ubuntu lucid 上使用 libtool 2.2.6b,在 ubuntu precision 上使用 libtool 2.4.2。清醒时,我的项目将正确链接。准确地说,它无法链接。这是演示我的问题的示例代码;
配置文件
AC_INIT([ltp], [0.0.1], [someone])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([.m4])
AC_CONFIG_FILES([Makefile foo/Makefile bar/Makefile wah/Makefile])
AC_PROG_CXX
AC_PROG_LIBTOOL
AM_SANITY_CHECK
AC_LANG_CPLUSPLUS
AC_OUTPUT
Run Code Online (Sandbox Code Playgroud)
生成文件
SUBDIRS = foo bar wah
ACLOCAL_AMFLAGS = -I .m4
Run Code Online (Sandbox Code Playgroud)
foo/foo.h
#ifndef FOO_FOO_H_
#define FOO_FOO_H_
namespace Foo
{
class Foo
{
public:
Foo(long l);
private:
long l;
};
}
#endif
Run Code Online (Sandbox Code Playgroud)
foo/foo.cpp
#include "foo/Foo.h"
namespace Foo
{
Foo::Foo(long l) : l(l) {}
}
Run Code Online (Sandbox Code Playgroud)
foo/Makefile.am
lib_LTLIBRARIES = libfoo.la
libfoo_la_SOURCES = Foo.cpp
libfoo_la_CPPFLAGS =
libfoo_la_LDFLAGS = …Run Code Online (Sandbox Code Playgroud) 我正在将旧数据集转换为schema/xml.它包含一些具有默认值的数组元素.我接近xs:list的解决方案;
<xs:element name="pressure"
default="0.22 0.33 0.44 0.55 0.66 0.77 0.88 0.88 0.88 0.88">
<xs:simpleType>
<xs:list>
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minInclusive value="0.0" />
<xs:maxInclusive value="2.0" />
</xs:restriction>
</xs:simpleType>
</xs:list>
</xs:simpleType>
</xs:element>
Run Code Online (Sandbox Code Playgroud)
如何将列表的长度限制为10?也就是说,我会把它放在哪里
<xs:length value="10">?
Run Code Online (Sandbox Code Playgroud)