summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-11-21 19:01:43 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-11-21 19:01:43 +0000
commit022f7e6fb1af4d2f2fca4176b04ac5c38da12b93 (patch)
tree904805b92d2be8d1c73e2f69fe58f62955108823
parentf31496ef4e9a393607c8c6e6dcaef6101a273b88 (diff)
downloadmidipix_build-022f7e6fb1af4d2f2fca4176b04ac5c38da12b93.tar.bz2
midipix_build-022f7e6fb1af4d2f2fca4176b04ac5c38da12b93.tar.xz
subr/pkg_*.subr, vars/{apr,git}.vars: supply & reference ${PKG_DESTDIR}.
-rw-r--r--subr/pkg_install.subr14
-rw-r--r--subr/pkg_install_files.subr2
-rw-r--r--subr/pkg_install_libs.subr2
-rw-r--r--subr/pkg_install_make.subr2
-rw-r--r--subr/pkg_install_pkgconfig.subr10
-rw-r--r--subr/pkg_install_purge_la.subr6
-rw-r--r--subr/pkg_install_strip.subr4
-rw-r--r--subr/pkg_setup_env.subr1
-rw-r--r--vars/apr.vars4
-rw-r--r--vars/git.vars2
10 files changed, 25 insertions, 22 deletions
diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr
index 6635e4f2..fa890d4d 100644
--- a/subr/pkg_install.subr
+++ b/subr/pkg_install.subr
@@ -3,12 +3,14 @@
#
pkg_install() {
- build_fileop mkdir "${PKG_PREFIX}";
- tar -C ../destdir -cpf - . | tar -C "${PKG_PREFIX}" -xpf -;
- if [ -n "${PKG_PREFIX_EXTRA}" ]; then
- build_fileop mkdir "${PKG_PREFIX_EXTRA}";
- tar -C ../destdir -cpf - . | tar -C "${PKG_PREFIX_EXTRA}" -xpf -;
- fi;
+ local _dst_path;
+ for _dst_path in "${PKG_PREFIX}" "${PKG_PREFIX_EXTRA}"; do
+ if [ -n "${_dst_path}" ]; then
+ build_fileop mkdir "${_dst_path}";
+ tar -C "${PKG_DESTDIR}" -cpf - . |\
+ tar -C "${_dst_path}" -xpf -;
+ fi;
+ done;
};
# vim:filetype=sh
diff --git a/subr/pkg_install_files.subr b/subr/pkg_install_files.subr
index 23f3cbdb..d82b665d 100644
--- a/subr/pkg_install_files.subr
+++ b/subr/pkg_install_files.subr
@@ -46,7 +46,7 @@ pkg_install_files() {
pkgp_install_files -v "${@}";
else
if [ -n "${PKG_INSTALL_FILES}" ]; then
- pkgp_install_files -v "${PWD}/../destdir" ${PKG_INSTALL_FILES};
+ pkgp_install_files -v "${PKG_DESTDIR}" ${PKG_INSTALL_FILES};
fi;
fi;
};
diff --git a/subr/pkg_install_libs.subr b/subr/pkg_install_libs.subr
index c12369ea..452694bf 100644
--- a/subr/pkg_install_libs.subr
+++ b/subr/pkg_install_libs.subr
@@ -31,7 +31,7 @@ pkg_install_libs() {
local _so_src_path _so_dst_dir _lib_src_path _lib_name _lib_dst_path;
if [ "${PKG_BUILD_TYPE}" != "host" ]; then
for _so_src_path in \
- $(find "${PWD}/../destdir" \
+ $(find "${PKG_DESTDIR}" \
\( -name "*.so" -or -name "*.so.*" \) -print);
do if ! pkgp_install_lib_check "${_so_src_path}" \
|| [ "$(readlink -f "${_so_src_path}")" = "/dev/null" ]; then
diff --git a/subr/pkg_install_make.subr b/subr/pkg_install_make.subr
index 3cdf837e..a9841655 100644
--- a/subr/pkg_install_make.subr
+++ b/subr/pkg_install_make.subr
@@ -13,7 +13,7 @@ pkg_install_make() {
"${PKG_LDFLAGS_INSTALL_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_INSTALL_EXTRA}}" \
"${PKG_RANLIB_INSTALL:+RANLIB=${PKG_RANLIB_INSTALL}}" \
"LIBTOOL=${PKG_SLIBTOOL:-slibtool}" \
- "${PKG_MAKE_INSTALL_VNAME:-DESTDIR}=${PWD}/../destdir/" \
+ "${PKG_MAKE_INSTALL_VNAME:-DESTDIR}=${PKG_DESTDIR}/" \
${PKG_INSTALL_TARGET:=install};
};
diff --git a/subr/pkg_install_pkgconfig.subr b/subr/pkg_install_pkgconfig.subr
index b46069a3..43c0d601 100644
--- a/subr/pkg_install_pkgconfig.subr
+++ b/subr/pkg_install_pkgconfig.subr
@@ -3,12 +3,12 @@
#
pkg_install_pkgconfig() {
- local __;
- for __ in $(find "${PWD}/../destdir" -name \*.pc); do
- if grep -Eq '^libdir=[^$]+$' "${__}"; then
+ local _pc_path;
+ for _pc_path in $(find "${PKG_DESTDIR}" -name \*.pc); do
+ if grep -Eq '^libdir=[^$]+$' "${_pc_path}"; then
sed -i -e '/^libdir=[^$]\+$/s/^libdir=\(.\+\)$/libdir=${exec_prefix}\1/' \
- -e '/^exec_prefix=$/s/^.*$/exec_prefix=${prefix}/' \
- "${__}";
+ -e '/^exec_prefix=$/s/^.*$/exec_prefix=${prefix}/' \
+ "${_pc_path}";
fi;
done;
};
diff --git a/subr/pkg_install_purge_la.subr b/subr/pkg_install_purge_la.subr
index 9eb160fb..be5ab489 100644
--- a/subr/pkg_install_purge_la.subr
+++ b/subr/pkg_install_purge_la.subr
@@ -3,9 +3,9 @@
#
pkg_install_purge_la() {
- local __;
- for __ in $(find "${PWD}/../destdir/lib" -type f -name \*.la); do
- build_fileop rm ${__};
+ local _la_path;
+ for _la_path in $(find "${PKG_DESTDIR}" -type f -name \*.la); do
+ build_fileop rm ${_la_path};
done;
};
diff --git a/subr/pkg_install_strip.subr b/subr/pkg_install_strip.subr
index 0a64b5a1..53282187 100644
--- a/subr/pkg_install_strip.subr
+++ b/subr/pkg_install_strip.subr
@@ -22,9 +22,9 @@ pkgp_strip_tree() {
pkg_strip() {
if [ "${PKG_NAME%flavour_minipix}" != "${PKG_NAME}" ] \
&& [ ${ARG_DEBUG_MINIPIX:-0} -eq 0 ]; then
- pkgp_strip_tree "${PWD}/../destdir";
+ pkgp_strip_tree "${PKG_DESTDIR}";
elif [ "${BUILD}" = release ]; then
- pkgp_strip_tree "${PWD}/../destdir/bin";
+ pkgp_strip_tree "${PKG_DESTDIR}/bin";
fi;
};
diff --git a/subr/pkg_setup_env.subr b/subr/pkg_setup_env.subr
index f6d6118a..880aa80d 100644
--- a/subr/pkg_setup_env.subr
+++ b/subr/pkg_setup_env.subr
@@ -24,6 +24,7 @@ pkg_setup_env() {
build_fileop rm "${PKG_BASE_DIR}";
fi; ;;
esac;
+ PKG_DESTDIR="${PKG_BASE_DIR}/destdir";
case "${PKG_BUILD_TYPE}" in
host) export AR="ar";
export CC="gcc";
diff --git a/vars/apr.vars b/vars/apr.vars
index de302737..5a27d455 100644
--- a/vars/apr.vars
+++ b/vars/apr.vars
@@ -6,8 +6,8 @@ pkg_apr_install_make_post() {
sed -e 's,echo "\$APR_BUILD_DIR/libtool",echo '"${PREFIX}"'/bin/slibtool,' \
-e 's,echo "\${installbuilddir}/libtool",echo '"${PREFIX}"'/bin/slibtool,' \
-e 's,flags="\$flags -I\$includedir \$EXTRA_INCLUDES",flags="-I'"${PKG_PREFIX}"'/include/apr-1",' \
- "${PWD}/../destdir/bin/apr-1-config" > "${PWD}/../destdir/bin/${PKG_TARGET}-apr-1-config";
- chmod +x "${PWD}/../destdir/bin/${PKG_TARGET}-apr-1-config";
+ "${PKG_DESTDIR}/bin/apr-1-config" > "${PKG_DESTDIR}/bin/${PKG_TARGET}-apr-1-config";
+ chmod +x "${PKG_DESTDIR}/bin/${PKG_TARGET}-apr-1-config";
};
# vim:filetype=sh
diff --git a/vars/git.vars b/vars/git.vars
index b89062bd..873d0921 100644
--- a/vars/git.vars
+++ b/vars/git.vars
@@ -4,7 +4,7 @@
pkg_git_install_post() {
local __ _new;
- for __ in $(find "${PWD}/../destdir/share/man" -name "Git*::*" -type f); do
+ for __ in $(find "${PKG_DESTDIR}" -name "Git*::*" -type f); do
_new="$(echo ${__} | sed "s/::/./g")";
build_fileop mv "${__}" "${_new}";
done;