使用cygport(Cygwin打包实用程序)将一些文件安装到/usr/share/中

使用cygport(Cygwin打包实用程序)将一些文件安装到/usr/share/中,cygwin,mintty,Cygwin,Mintty,我一直在对mintty进行黑客攻击,以使其支持主题。回购协议就在这里 我的代码更改已完成,但我无法使用cygport使打包工作。如果你查看回购协议,你会发现在根级别上存在 pkg.cygport # the cygport file themes/* # folder with lots of themes 这是完整的pkg.cygport文件 CATEGORY="Base Shells" DEPEND="gcc-core" HOMEPAGE="http://mintty.g

我一直在对mintty进行黑客攻击,以使其支持主题。回购协议就在这里

我的代码更改已完成,但我无法使用cygport使打包工作。如果你查看回购协议,你会发现在根级别上存在

pkg.cygport    # the cygport file
themes/*       # folder with lots of themes
这是完整的pkg.cygport文件

CATEGORY="Base Shells"
DEPEND="gcc-core"
HOMEPAGE="http://mintty.googlecode.com"
SRC_URI="http://mintty.googlecode.com/files/mintty-${PV}-src.tar.bz2"
SUMMARY="Terminal emulator with native Windows look and feel"
DESCRIPTION="\
Mintty is a terminal emulator for Cygwin. It is based on code
from PuTTY 0.60 by Simon Tatham and team.

Features include:
* Xterm-compatible terminal emulation.
* Full Unicode support.
* Native Windows user interface that tries to keep things simple.
* Graphical options dialog. Options stored in a text file.
* Themes.
* Drag & drop and copy & paste of text, files and folders.
* Extensive mouse support.
* Window transparency."

RESTRICT=postinst_doc

src_compile() {
  lndirs
  cd ${B}
  cygmake
}

src_install() {
  cd ${B}
  dobin mintty.exe
  doman docs/mintty.1
  dodoc COPYING LICENSE.Oxygen LICENSE.PuTTY

  # This fails with *** ERROR: file themes/* does not exist 
  # We appear to be in /c/Users/Phil/repos/mintty/mintty-1.3-alpha-1.3/build
  # during this step.
  insinto /usr/share/mintty/themes
  doins themes/*
}

最后两行insinto/doins是我添加的唯一两行,它们不起作用,因为此时我们似乎在另一个文件夹中-我猜cd${B}是罪魁祸首。但是如何修复呢?

您添加到.cygport文件中的内容看起来是正确的

我认为您的问题是因为您的主题文件不在
makepkg
makepkg制作的tarball中,该tarball然后由cygport解包以获取要构建和打包的源代码

将主题/目录添加到Makefile中的文件列表非常简单:

 src_files := $(wildcard Makefile *.c *.h *.rc *.mft COPYING LICENSE* INSTALL)
 src_files += $(wildcard docs/$(NAME).1 docs/readme*.html scripts/* icon/*)
+src_files += $(wildcard themes/*)

不幸的是,现在有些主题名称中有空格,但没有正确地转义。我重命名了这些文件以检查生成,但您可能更喜欢更优雅的解决方案。

您如何调用
cygport
来生成此文件?谢谢Jon,这正是解决此问题所需的。很明显,GNU Make在文件名中使用空格时根本就不存在了(也就是“不是设计用来处理它们的”),老实说,这有点让人吃惊,所以我将它们重命名了。