【问题标题】:MacPorts: violation of the ports-filesystem hierarchy in the destroot phaseMacPorts:在 destroot 阶段违反了端口文件系统层次结构
【发布时间】:2012-06-29 21:11:33
【问题描述】:

我正在为我的应用程序开发 Portfile,但在 destroot 阶段遇到了问题。根据MacPorts guide,destroot阶段执行如下命令:

make install DESTDIR=${destroot}

我想我可能误解了它应该如何在 Makefile 中工作。我的应用很简单,安装规则只需要复制几个目录到DESTDIR,所以指定如下:

install:
    cp -R bin $(DESTDIR)/bin
    cp -R lib $(DESTDIR)/lib
    cp -R cfg $(DESTDIR)/cfg

但是,当我尝试对我的应用程序进行 MacPort 安装时,我收到以下警告:

--->  Staging test into destroot
Warning: violation by /bin
Warning: violation by /lib
Warning: violation by /cfg
Warning: test violates the layout of the ports-filesystems!

我该如何解决这个问题?我是否误解了 DESTDIR 变量在安装规则中的使用方式或完全遗漏了什么?

【问题讨论】:

    标签: makefile installation macports


    【解决方案1】:

    目录需要放在 DESTDIR 下,就好像您从 /. 开始一样,例如,您应该使用 $(DESTDIR)/$(PREFIX)/bin 而不是使用 $(DESTDIR)/bin - 其中 $(PREFIX)/opt/local 或其他。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多