MSYS2/MinGW64 makepkg将软件包安装在错误的目录中.PKGBUILD错误



我创建了一个PKGBUILD文件来构建"bgfx"库并创建MSYS2/MinGW-64包。构建进行得很顺利,包也已创建,但包安装在错误的目录中。我希望安装在c:\/msys64/mingw64中,但它是在c:\/mys64中完成的,*.exe文件安装在c:\msys64/bin中。应该如何安装到c:\msys64/mingw64?

我的PKGBUILD文件:

# Maintainer: https://github.com/cppfever/bgfx-pkgbuild.git
_realname=bgfx
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.115.7933
pkgrel=1
pkgdesc="Cross-platform rendering library"
url=https://github.com/bkaradzic/bgfx.cmake.git
license=(BSD-2-Clause License)
arch=('any')
mingw_arch=('mingw64')
groups=()
depends=()
makedepends=("git" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-ninja")
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("${_realname}::git+https://github.com/bkaradzic/bgfx.cmake.git#tag=v1.115.7933-417f8b8")
noextract=()
md5sums=('SKIP')
validpgpkeys=()
prepare()
{
cd ${srcdir}/${_realname}
git submodule update --init --recursive
}
build() {
cmake -S ${_realname} -B build -DCMAKE_BUILD_TYPE='Release' -G"Ninja"
cmake --build build
}
package() {
cmake --install ${srcdir}/build --prefix=${pkgdir} --strip
}

我的环境变量:

# printenv
ProgramFiles(x86)=C:Program Files (x86)
CommonProgramFiles(x86)=C:Program Files (x86)Common Files
SHELL=/usr/bin/bash
NUMBER_OF_PROCESSORS=4
PROCESSOR_LEVEL=6
TERM_PROGRAM_VERSION=3.5.0
MINGW_PREFIX=/mingw64
PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
USERDOMAIN_ROAMINGPROFILE=mans
HOSTNAME=mans
PROGRAMFILES=C:Program Files
MSYSTEM=MINGW64
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
ORIGINAL_TEMP=/c/Users/man/AppData/Local/Temp
MINGW_CHOST=x86_64-w64-mingw32
OS=Windows_NT
HOMEDRIVE=C:
MSYSTEM_CARCH=x86_64
windows_tracing_flags=3
USERDOMAIN=mans
VS100COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 10.0Common7Tools
PWD=/d/doc/cpp/bgfx/pkgbuild/bgfx.cmake/Release
USERPROFILE=C:Usersman
MANPATH=/mingw64/local/man:/mingw64/share/man:/usr/local/man:/usr/share/man:/usr/man:/share/man
PRINTER=Microsoft XPS Document Writer
VS140COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 14.0Common7Tools
TZ=Asia/Novosibirsk
MINGW_PACKAGE_PREFIX=mingw-w64-x86_64
tmp=C:UsersmanAppDataLocalTemp
ALLUSERSPROFILE=C:ProgramData
ORIGINAL_PATH=/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/
CommonProgramW6432=C:Program FilesCommon Files
HOME=/home/man
USERNAME=man
VBOX_MSI_INSTALL_PATH=C:Program FilesOracleVirtualBox
COMSPEC=C:Windowssystem32cmd.exe
APPDATA=C:UsersmanAppDataRoaming
SYSTEMROOT=C:Windows
LOCALAPPDATA=C:UsersmanAppDataLocal
COMPUTERNAME=MANS
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:/share/info
TERM=xterm
LOGONSERVER=\MANS
ACLOCAL_PATH=/mingw64/share/aclocal:/usr/share/aclocal
USER=man
PSModulePath=C:Windowssystem32WindowsPowerShellv1.0Modules
FP_NO_HOST_CHECK=NO
MSYS_HOME=C:msys64usr
TEMP=/tmp
temp=C:UsersmanAppDataLocalTemp
MSYSTEM_CHOST=x86_64-w64-mingw32
ORIGINAL_TMP=/c/Users/man/AppData/Local/Temp
SHLVL=1
PROCESSOR_REVISION=4e03
COMMONPROGRAMFILES=C:Program FilesCommon Files
LC_CTYPE=ru_RU.UTF-8
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
windows_tracing_logfile=C:BVTBinTestsinstallpackagecsilogfile.log
SESSIONNAME=Console
PS1=[e]0;wa]n[e[32m]u@h [e[35m]$MSYSTEM[e[0m] [e[33m]w[e[0m]n[e[1m]#[e[0m]
MINGW_HOME=C:msys64mingw64
HOMEPATH=Usersman
XDG_DATA_DIRS=/mingw64/share/:/usr/local/share/:/usr/share/
MSYSCON=mintty.exe
TMP=/tmp
VS90COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 9.0Common7Tools
CONFIG_SITE=/etc/config.site
PATH=/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
ProgramW6432=C:Program Files
MSYSTEM_PREFIX=/mingw64
WINDIR=C:Windows
PROCESSOR_ARCHITECTURE=AMD64
PUBLIC=C:UsersPublic
SYSTEMDRIVE=C:
OLDPWD=/d/doc/cpp/bgfx/pkgbuild
TERM_PROGRAM=mintty
ProgramData=C:ProgramData
_=/usr/bin/printenv

第一次调用cmake时,添加以下参数:

-DCMAKE_INSTALL_PREFIX=$MINGW_PREFIX

相关内容

  • 没有找到相关文章

最新更新