Files
MSYS2-packages/pacman/makepkg-mingw
2013-12-03 08:18:25 +04:00

35 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/bash
# makepkg-mingw - wrapper for makepkg to build mingw-w64 packages under MSYS2
#
# Copyright (c) 2013 Alexey Pavlov <alexpux@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
declare -r MINGW_INSTALLS="mingw32 mingw64"
export ORIGINAL_PATH=$PATH
for _mingw in ${MINGW_INSTALLS}; do
if [ -f "/${_mingw}/bin/gcc.exe" ]; then
PKG_CONFIG_PATH="/${_mingw}/lib/pkgconfig" \
MSYSTEM=MINGW \
PATH=/${_mingw}/bin:$PATH \
/usr/bin/makepkg --config /etc/makepkg_${_mingw}.conf $@ || exit 1
fi
done
unset ORIGINAL_PATH
exit 0