xbps-src: infrastructure changes required for "nonfree" keyword in tmpls.
- The chroot target now execs masterdir/bin/xbps-shell to set up correct envvars. - 2 pkgs are now in nonfree repo: adobe-flash-plugin and jre. - Renamed some vars in xbps-src to be in uppercase, notably XBPS_MACHINE. - make-repoidx target now creates the index for all "known" directories specified via XBPS_PACKAGESDIR: XBPS_MACHINE, noarch, and nonfree/XBPS_MACHINE.
This commit is contained in:
parent
e5afc541f2
commit
5a2cc5b5bd
35 changed files with 173 additions and 146 deletions
|
@ -52,7 +52,7 @@ do_build()
|
|||
|
||||
do_install()
|
||||
{
|
||||
if [ "$xbps_machine" = "x86_64" ]; then
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
vmkdir usr/lib
|
||||
cd ${DESTDIR}/usr && ln -s lib lib64
|
||||
cd ${wrksrc}
|
||||
|
|
|
@ -5,7 +5,7 @@ revision=1
|
|||
# The EULA file
|
||||
_eula="http://www.adobe.com/products/eulas/pdfs/PlatformClients_PC_WWEULA_Combined_20100108_1657.pdf"
|
||||
_eulacksum=3cb0a5f4576be735abcff7189ed18eda17c70b762c3a78a3379b6f44395fbc10
|
||||
if [ "$xbps_machine" = "x86_64" ]; then
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
# There is no x86_64 version for 10.1beta yet.
|
||||
_disttarball="http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_11_linux.x86_64.tar.gz"
|
||||
_distcksum=5756a4ac9811e0362da2b0c208a458b417883e9f9c3773c70e61c935609b64dc
|
||||
|
@ -21,6 +21,7 @@ maintainer="Juan RP <xtraeme@gmail.com>"
|
|||
long_desc="
|
||||
This is the Adobe Flash Player plugin for Netscape compatible browsers."
|
||||
|
||||
nonfree=yes # restricted use
|
||||
gtk_iconcache_dirs="/usr/share/icons/hicolor"
|
||||
|
||||
Add_dependency run libgcc
|
||||
|
|
|
@ -42,7 +42,7 @@ do_build()
|
|||
|
||||
do_install()
|
||||
{
|
||||
if [ "$xbps_machine" = "x86_64" ]; then
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
mkdir -p ${SRCPKGDESTDIR}/usr/lib
|
||||
cd ${SRCPKGDESTDIR}/usr && ln -s lib lib64 && cd ${wrksrc}
|
||||
fi
|
||||
|
|
|
@ -35,7 +35,7 @@ do_install()
|
|||
{
|
||||
# Install bjam
|
||||
_bindir="bin.linuxx86"
|
||||
[ "${xbps_machine}" = "x86_64" ] && _bindir="bin.linuxx86_64"
|
||||
[ "${XBPS_MACHINE}" = "x86_64" ] && _bindir="bin.linuxx86_64"
|
||||
install -m755 -d ${DESTDIR}/usr/bin
|
||||
install -m755 ${wrksrc}/tools/jam/src/${_bindir}/bjam \
|
||||
${DESTDIR}/usr/bin || return 1
|
||||
|
|
|
@ -56,10 +56,10 @@ if [ -n "$BOOTSTRAP_PKG_REBUILD" ]; then
|
|||
Add_dependency build flex
|
||||
fi
|
||||
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
_triplet="${xbps_machine}-unknown-linux-gnu"
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
_triplet="${XBPS_MACHINE}-unknown-linux-gnu"
|
||||
else
|
||||
_triplet="${xbps_machine}-pc-linux-gnu"
|
||||
_triplet="${XBPS_MACHINE}-pc-linux-gnu"
|
||||
fi
|
||||
|
||||
do_configure()
|
||||
|
@ -96,7 +96,7 @@ do_build()
|
|||
|
||||
do_install()
|
||||
{
|
||||
if [ "$xbps_machine" = "x86_64" ]; then
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
vmkdir usr/lib
|
||||
cd ${DESTDIR}/usr && ln -sf lib lib64 && cd ${wrksrc}
|
||||
fi
|
||||
|
|
|
@ -45,8 +45,8 @@ do_build()
|
|||
|
||||
# Build with -mno-tls-direct-seg-refs to avoid performance problems
|
||||
# with Xen on x86 32bit.
|
||||
if [ "${xbps_machine}" = "i686" ]; then
|
||||
cflags="-mno-tls-direct-seg-refs -march=${xbps_machine%%-*}"
|
||||
if [ "${XBPS_MACHINE}" = "i686" ]; then
|
||||
cflags="-mno-tls-direct-seg-refs -march=${XBPS_MACHINE%%-*}"
|
||||
cflags="$cflags -mtune=generic"
|
||||
fi
|
||||
cflags="$XBPS_CFLAGS $cflags"
|
||||
|
@ -85,7 +85,7 @@ do_install()
|
|||
replace_interpreter bash ${DESTDIR}/usr/bin/ldd
|
||||
|
||||
# On x86_64, add dynamic linker's 32bit version to ldd.
|
||||
if [ "$xbps_machine" = "x86_64" ]; then
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
rtldlist="/lib/ld-linux.so.2 /lib/ld-linux-x86-64.so.2"
|
||||
sed -i "s|^RTLDLIST.*$|RTLDLIST=\"$rtldlist\"|" \
|
||||
${DESTDIR}/usr/bin/ldd
|
||||
|
|
|
@ -5,11 +5,11 @@ distfiles="ftp://ftp.gnu.org/gnu/gmp/gmp-${version}.tar.bz2"
|
|||
build_style=gnu-configure
|
||||
# Build with -fexceptions as suggested by ppl.
|
||||
CPPFLAGS="-fexceptions"
|
||||
if [ "${xbps_machine}" = "i686" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "i686" ]; then
|
||||
configure_args="ABI=32"
|
||||
fi
|
||||
configure_args="${configure_args} --enable-cxx --enable-mpbsd
|
||||
--build=${xbps_machine}-unknown-linux-gnu"
|
||||
--build=${XBPS_MACHINE}-unknown-linux-gnu"
|
||||
short_desc="Library for arbitrary precision arithmetic"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
checksum=a2a610f01fd3298dc08c87bf30498c2402590e1bcb227fc40b15ee6d280939fb
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
# Template file for 'oracle-jre'
|
||||
pkgname=jre
|
||||
nonfree=yes
|
||||
_extraversion=1.7.0
|
||||
version=7
|
||||
revision=4
|
||||
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
distfiles="http://download.oracle.com/otn-pub/java/jdk/${version}/jre-${version}-linux-x64.tar.gz"
|
||||
checksum=d829890d46295ab0cbfcbeb5c68ac7c90a5021689f7503c00b8bcf4bf9ea2f8d
|
||||
else
|
||||
|
@ -89,7 +90,7 @@ do_install()
|
|||
vmkdir usr/lib/mozilla/plugins
|
||||
|
||||
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
_arch=amd64
|
||||
else
|
||||
_arch=i386
|
||||
|
|
|
@ -39,7 +39,7 @@ do_configure()
|
|||
# as modules (defconfig+allmodconfig).
|
||||
local arch
|
||||
|
||||
if [ "$xbps_machine" != "x86_64" ]; then
|
||||
if [ "$XBPS_MACHINE" != "x86_64" ]; then
|
||||
arch=i386
|
||||
else
|
||||
arch=x86_64
|
||||
|
@ -68,7 +68,7 @@ do_install()
|
|||
{
|
||||
local arch hdrdest
|
||||
|
||||
if [ "$xbps_machine" != "x86_64" ]; then
|
||||
if [ "$XBPS_MACHINE" != "x86_64" ]; then
|
||||
arch=i386
|
||||
else
|
||||
arch=x86_64
|
||||
|
|
|
@ -30,7 +30,7 @@ do_install()
|
|||
{
|
||||
vmkdir lib
|
||||
vmkdir usr/lib
|
||||
if [ "$xbps_machine" = "x86_64" ]; then
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
ln -sf lib ${DESTDIR}/lib64
|
||||
fi
|
||||
make DESTDIR=${DESTDIR} RAISE_SETFCAP=no install
|
||||
|
|
|
@ -18,7 +18,7 @@ long_desc="
|
|||
nostrip=yes
|
||||
noverifyrdeps=yes
|
||||
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
Add_dependency build gcc-multilib
|
||||
fi
|
||||
|
||||
|
|
|
@ -37,12 +37,12 @@ _mingwprefix=/opt
|
|||
|
||||
do_build()
|
||||
{
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
||||
_target_args="--enable-targets=${_mingwtriplet},i686-w64-mingw32"
|
||||
_multilib_args="--enable-multilib --enable-64-bit-bfd"
|
||||
else
|
||||
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
||||
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
||||
_target_args="--enable-targets=${_mingwtriplet}"
|
||||
_multilib_args="--disable-multilib"
|
||||
fi
|
||||
|
@ -67,14 +67,14 @@ do_install()
|
|||
[ -d ${DESTDIR}/${_mingwprefix}/lib64 ] && \
|
||||
rm -rf ${DESTDIR}/${_mingwprefix}/lib64
|
||||
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
||||
else
|
||||
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
||||
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
||||
fi
|
||||
|
||||
# The mingw-w64 faq advises to create a symlink here
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
cd ${DESTDIR}/${_mingwprefix}/${_mingwtriplet} && \
|
||||
ln -sf lib lib64
|
||||
fi
|
||||
|
|
|
@ -18,7 +18,7 @@ long_desc="
|
|||
This is the mingw-64 cross-compiler, which supports building code for Win32
|
||||
or Win64 (multilib). For the i686 platform, only 32bit is available."
|
||||
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
Add_dependency build gcc-multilib
|
||||
fi
|
||||
Add_dependency build flex
|
||||
|
@ -30,11 +30,11 @@ Add_dependency full mingw-w64-gcc
|
|||
|
||||
_mingwprefix=/opt
|
||||
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
||||
_multilib_args="--enable-lib32 --enable-lib64"
|
||||
else
|
||||
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
||||
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
||||
_multilib_args="--enable-lib32 --disable-lib64"
|
||||
fi
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ Add_dependency run mpc
|
|||
Add_dependency run mpfr
|
||||
Add_dependency run zlib
|
||||
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
Add_dependency build gcc-multilib
|
||||
fi
|
||||
|
||||
|
@ -36,14 +36,14 @@ Add_dependency full mingw-w64-headers
|
|||
|
||||
_mingwprefix=/opt
|
||||
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
_triplet="${xbps_machine}-unknown-linux-gnu"
|
||||
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
_triplet="${XBPS_MACHINE}-unknown-linux-gnu"
|
||||
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
||||
_multilib_args="--enable-targets=all --enable-multilib"
|
||||
_multilib_args="${_multilib_args} --enable-64bit --enable-32bit"
|
||||
else
|
||||
_triplet="${xbps_machine}-pc-linux-gnu"
|
||||
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
||||
_triplet="${XBPS_MACHINE}-pc-linux-gnu"
|
||||
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
||||
_multilib_args="--disable-multilib --disable-64bit --enable-32bit"
|
||||
fi
|
||||
|
||||
|
|
|
@ -33,12 +33,12 @@ build_wrksrc=${pkgname}
|
|||
|
||||
do_build()
|
||||
{
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
||||
_build_args="--build=${xbps_machine}-unknown-linux-gnu"
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
||||
_build_args="--build=${XBPS_MACHINE}-unknown-linux-gnu"
|
||||
else
|
||||
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
||||
_build_args="--build=${xbps_machine}-pc-linux-gnu"
|
||||
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
||||
_build_args="--build=${XBPS_MACHINE}-pc-linux-gnu"
|
||||
fi
|
||||
|
||||
./configure --prefix=${_mingwprefix} --bindir=${_mingwprefix}/bin \
|
||||
|
|
|
@ -24,7 +24,7 @@ Add_dependency run mpc
|
|||
Add_dependency run mpfr
|
||||
Add_dependency run zlib
|
||||
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
Add_dependency build gcc-multilib
|
||||
fi
|
||||
Add_dependency build flex
|
||||
|
@ -37,14 +37,14 @@ Add_dependency full mingw-w64-crt
|
|||
|
||||
_mingwprefix=/opt
|
||||
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
_triplet="${xbps_machine}-unknown-linux-gnu"
|
||||
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
_triplet="${XBPS_MACHINE}-unknown-linux-gnu"
|
||||
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
||||
_multilib_args="--enable-targets=all --enable-multilib"
|
||||
_multilib_args="${_multilib_args} --enable-64bit --enable-32bit"
|
||||
else
|
||||
_triplet="${xbps_machine}-pc-linux-gnu"
|
||||
_mingwtriplet="${xbps_machine}-w64-mingw32"
|
||||
_triplet="${XBPS_MACHINE}-pc-linux-gnu"
|
||||
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
||||
_multilib_args="--disable-multilib --disable-64bit --enable-32bit"
|
||||
fi
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ version=4.8.9
|
|||
distfiles="${MOZILLA_SITE}/nspr/releases/v${version}/src/${pkgname}-${version}.tar.gz"
|
||||
build_style=gnu-configure
|
||||
configure_script="./mozilla/nsprpub/configure"
|
||||
if [ "$xbps_machine" = "x86_64" ]; then
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
_for64="--enable-64bit"
|
||||
fi
|
||||
configure_args="--libdir=/usr/lib --includedir=/usr/include/nspr
|
||||
|
|
|
@ -28,7 +28,7 @@ Add_dependency build sqlite-devel
|
|||
|
||||
do_build()
|
||||
{
|
||||
if [ "$xbps_machine" = "x86_64" ]; then
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
_use64="USE_64=1"
|
||||
fi
|
||||
for dir in coreconf dbm nss; do
|
||||
|
|
|
@ -25,7 +25,7 @@ do_install()
|
|||
{
|
||||
local ARCH
|
||||
|
||||
case "${xbps_machine}" in
|
||||
case "${XBPS_MACHINE}" in
|
||||
i[56]86|x86_64) ARCH=x86;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Add_dependency build nasm
|
|||
|
||||
do_build()
|
||||
{
|
||||
if [ "$xbps_machine" = "x86_64" ]; then
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
cp makefile.linux_amd64_asm makefile.machine
|
||||
else
|
||||
cp makefile.linux_x86_asm_gcc_4.X makefile.machine
|
||||
|
|
|
@ -20,7 +20,7 @@ long_desc="
|
|||
one machine (e.g. an ARM board) on a different machine (e.g. your own PC).
|
||||
By using dynamic translation, it achieves very good performances."
|
||||
|
||||
conf_files="/etc/qemu/target-${xbps_machine}.conf"
|
||||
conf_files="/etc/qemu/target-${XBPS_MACHINE}.conf"
|
||||
nostrip=yes
|
||||
|
||||
Add_dependency run glibc
|
||||
|
|
|
@ -72,7 +72,7 @@ do_build() {
|
|||
sed -i 's/-Werror//' makefile
|
||||
sed -i 's/\(LDFLAGS = -Wl,--warn-common\)/\1 -Wl,-zmuldefs/' makefile
|
||||
|
||||
if [ "$xbps_machine" = "x86_64" ]; then
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
makeargs="AMD64=1 PTR64=1"
|
||||
else
|
||||
makeargs="I686=1"
|
||||
|
|
|
@ -19,7 +19,7 @@ Add_dependency run glibc
|
|||
|
||||
do_build()
|
||||
{
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
local args="${configure_args} --enable-64bits"
|
||||
fi
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ Add_dependency build acpica-utils
|
|||
Add_dependency build kernel-headers
|
||||
Add_dependency build dev86
|
||||
Add_dependency build yasm
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
Add_dependency build gcc-c++-multilib
|
||||
fi
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ Add_dependency build acpica-utils
|
|||
Add_dependency build wget
|
||||
Add_dependency build git
|
||||
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
Add_dependency build gcc-multilib
|
||||
fi
|
||||
|
||||
|
@ -80,7 +80,7 @@ do_build()
|
|||
{
|
||||
install -d ${DESTDIR}
|
||||
cd ${DESTDIR} && ln -sf . install
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
install -d ${DESTDIR}/usr/lib
|
||||
cd ${DESTDIR}/usr && ln -s lib lib64 && cd ${wrksrc}
|
||||
fi
|
||||
|
@ -89,7 +89,7 @@ do_build()
|
|||
|
||||
do_install()
|
||||
{
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
install -d ${DESTDIR}/usr/lib
|
||||
cd ${DESTDIR}/usr && ln -s lib lib64 && cd ${wrksrc}
|
||||
fi
|
||||
|
|
|
@ -21,7 +21,7 @@ Add_dependency full xf86-video-ati ">=6.12.4"
|
|||
#Add_dependency full xf86-video-chips ">=1.2.2"
|
||||
Add_dependency full xf86-video-cirrus ">=1.3.2"
|
||||
Add_dependency full xf86-video-fbdev ">=0.4.1"
|
||||
#if [ "${xbps_machine}" != "x86_64" ]; then
|
||||
#if [ "${XBPS_MACHINE}" != "x86_64" ]; then
|
||||
# Add_dependency full xf86-video-geode ">=2.11.6"
|
||||
#fi
|
||||
#Add_dependency full xf86-video-glint ">=1.2.4"
|
||||
|
|
|
@ -5,7 +5,7 @@ revision=4
|
|||
distfiles="http://www.zlib.net/$pkgname-$version.tar.bz2"
|
||||
build_style=configure
|
||||
configure_args="--prefix=/usr --shared"
|
||||
if [ "${xbps_machine}" = "x86_64" ]; then
|
||||
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
||||
configure_args="${configure_args} --64"
|
||||
fi
|
||||
make_build_args="CFLAGS=-fPIC"
|
||||
|
|
|
@ -30,12 +30,11 @@
|
|||
#
|
||||
install_pkg_from_repos()
|
||||
{
|
||||
local cmd rval tmplogf tmpdepf xver
|
||||
local cmd rval tmplogf tmpdepf
|
||||
|
||||
msg_normal "$pkgver: installing '$1'... "
|
||||
|
||||
xver=$($XBPS_BIN_CMD -V|awk '{print $2}')
|
||||
case "$xver" in
|
||||
case "${XBPS_VERSION}" in
|
||||
0.1[1-9].[0-9]*)
|
||||
_pkgdepname=$($XBPS_PKGDB_CMD getpkgdepname "$1")
|
||||
$XBPS_REPO_CMD -oversion show ${_pkgdepname} >/dev/null 2>&1
|
||||
|
@ -50,7 +49,7 @@ install_pkg_from_repos()
|
|||
*) msg_normal_append "\n";;
|
||||
esac
|
||||
|
||||
cmd="${fakeroot_cmd} ${fakeroot_cmd_args} ${XBPS_BIN_CMD} -Ay install"
|
||||
cmd="${FAKEROOT_CMD} ${FAKEROOT_CMD_ARGS} ${XBPS_BIN_CMD} -Ay install"
|
||||
tmplogf=$(mktemp)
|
||||
tmpdepf=$(mktemp)
|
||||
echo "'${1}'" > $tmpdepf
|
||||
|
@ -82,7 +81,7 @@ autoremove_pkg_dependencies()
|
|||
|
||||
[ -n "$1" ] && return 0
|
||||
|
||||
cmd="${fakeroot_cmd} ${fakeroot_cmd_args} ${XBPS_BIN_CMD}"
|
||||
cmd="${FAKEROOT_CMD} ${FAKEROOT_CMD_ARGS} ${XBPS_BIN_CMD}"
|
||||
|
||||
# If XBPS_PREFER_BINPKG_DEPS is set, we should remove those
|
||||
# package dependencies installed by the target package, do it.
|
||||
|
@ -105,9 +104,9 @@ autoremove_pkg_dependencies()
|
|||
install_pkg_deps()
|
||||
{
|
||||
local curpkg="$1"
|
||||
local curpkgname="$(${XBPS_PKGDB_CMD} getpkgdepname $1)"
|
||||
local saved_prevpkg="$(${XBPS_PKGDB_CMD} getpkgdepname $2)"
|
||||
local j jver jname reqver missing_deps
|
||||
local curpkgname=$(${XBPS_PKGDB_CMD} getpkgdepname "$1")
|
||||
local saved_prevpkg=$(${XBPS_PKGDB_CMD} getpkgdepname "$2")
|
||||
local j jver jname reqver
|
||||
|
||||
[ -z "$curpkg" -o -z "$curpkgname" ] && return 2
|
||||
|
||||
|
@ -137,16 +136,11 @@ install_pkg_deps()
|
|||
echo " ${j}: found '$jname-$jver'."
|
||||
else
|
||||
echo " ${j}: not found."
|
||||
if [ -z "$missing_deps" ]; then
|
||||
missing_deps="${j}"
|
||||
else
|
||||
missing_deps="${missing_deps} ${j}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
for j in ${missing_deps}; do
|
||||
for j in ${build_depends}; do
|
||||
prev_pkg="$j"
|
||||
if [ -n "$XBPS_PREFER_BINPKG_DEPS" -a -z "$bootstrap" ]; then
|
||||
install_pkg_from_repos "${j}"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
_mount()
|
||||
{
|
||||
MASTERDIR="${XBPS_MASTERDIR}" DISTRIBUTIONDIR="${XBPS_DISTRIBUTIONDIR}" \
|
||||
HOSTDIR="${XBPS_HOSTDIR}" ${sudo_cmd} \
|
||||
HOSTDIR="${XBPS_HOSTDIR}" ${SUDO_CMD} \
|
||||
@@XBPS_INSTALL_LIBEXECDIR@@/chroot-helper mount
|
||||
return $?
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ _mount()
|
|||
_umount()
|
||||
{
|
||||
MASTERDIR="${XBPS_MASTERDIR}" DISTRIBUTIONDIR="${XBPS_DISTRIBUTIONDIR}" \
|
||||
HOSTDIR="${XBPS_HOSTDIR}" ${sudo_cmd} \
|
||||
HOSTDIR="${XBPS_HOSTDIR}" ${SUDO_CMD} \
|
||||
@@XBPS_INSTALL_LIBEXECDIR@@/chroot-helper umount
|
||||
return $?
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ chroot_init()
|
|||
|
||||
[ -n "$bootstrap" ] && return 0
|
||||
|
||||
if [ "${chroot_cmd}" = "chroot" ]; then
|
||||
if [ "${CHROOT_CMD}" = "chroot" ]; then
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
msg_error "Root permissions are required for the chroot, try again."
|
||||
fi
|
||||
|
@ -100,6 +100,20 @@ _EOF
|
|||
[ -h ${XBPS_MASTERDIR}/tmp ] || rm -rf $XBPS_MASTERDIR/tmp/*
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -s $XBPS_MASTERDIR/bin/xbps-shell ] && return 0
|
||||
|
||||
# Create custom script to start the chroot bash shell.
|
||||
cat > $XBPS_MASTERDIR/bin/xbps-shell <<_EOF
|
||||
#!/bin/sh
|
||||
|
||||
. /usr/local/etc/xbps-src.conf
|
||||
. /usr/local/share/xbps-src/shutils/init_funcs.sh
|
||||
set_defvars
|
||||
|
||||
exec env PS1="[\u@masterdir-chroot \W]$ " /bin/bash "$@"
|
||||
_EOF
|
||||
chmod 755 $XBPS_MASTERDIR/bin/xbps-shell
|
||||
}
|
||||
|
||||
prepare_chroot()
|
||||
|
@ -198,10 +212,9 @@ create_binsh_symlink()
|
|||
|
||||
prepare_binpkg_repos()
|
||||
{
|
||||
local repo xver CONF_FILE
|
||||
local repo CONF_FILE
|
||||
|
||||
xver=$($XBPS_PKGDB_CMD -V|awk '{print $2}')
|
||||
case "$xver" in
|
||||
case "${XBPS_VERSION}" in
|
||||
0.1[0-9].[0-9]*)
|
||||
mkdir -p ${XBPS_MASTERDIR}/usr/local/etc/xbps
|
||||
for f in /etc /usr/local/etc; do
|
||||
|
@ -310,19 +323,18 @@ xbps_chroot_handler()
|
|||
|
||||
# Reinstall xbps-src in the chroot
|
||||
msg_normal "Installing xbps-src in the masterdir...\n"
|
||||
env IN_CHROOT=yes LANG=C PATH=$PATH:/usr/local/bin \
|
||||
${chroot_cmd} $XBPS_MASTERDIR sh -c \
|
||||
env IN_CHROOT=yes LANG=C \
|
||||
${CHROOT_CMD} $XBPS_MASTERDIR sh -c \
|
||||
"cd /xbps/xbps-src && make IN_CHROOT=1 install clean" \
|
||||
2>&1 >/dev/null || return $?
|
||||
|
||||
# Update ld.so(8) cache
|
||||
msg_normal "Updating ld.so(8) cache...\n"
|
||||
env PATH=$PATH:/usr/local/bin \
|
||||
${chroot_cmd} $XBPS_MASTERDIR sh -c "ldconfig" || return $?
|
||||
${CHROOT_CMD} $XBPS_MASTERDIR sh -c "ldconfig" || return $?
|
||||
|
||||
if [ "$action" = "chroot" ]; then
|
||||
env IN_CHROOT=1 LANG=C PATH=$PATH:/usr/local/bin \
|
||||
${chroot_cmd} $XBPS_MASTERDIR /bin/sh || rv=$?
|
||||
env IN_CHROOT=1 LANG=C \
|
||||
${CHROOT_CMD} $XBPS_MASTERDIR /bin/xbps-shell || rv=$?
|
||||
else
|
||||
[ -n "$KEEP_WRKSRC" ] && arg="$arg -C"
|
||||
[ -n "$KEEP_AUTODEPS" ] && arg="$arg -K"
|
||||
|
@ -331,8 +343,7 @@ xbps_chroot_handler()
|
|||
|
||||
action="$arg $action"
|
||||
env in_chroot=1 IN_CHROOT=1 LANG=C _ORIGINPKG="$pkg" \
|
||||
PATH=$PATH:/usr/local/bin \
|
||||
${chroot_cmd} $XBPS_MASTERDIR sh -c \
|
||||
${CHROOT_CMD} $XBPS_MASTERDIR sh -c \
|
||||
"xbps-src $action $pkg" || rv=$?
|
||||
fi
|
||||
|
||||
|
|
|
@ -25,13 +25,11 @@
|
|||
|
||||
set_defvars()
|
||||
{
|
||||
local DDIRS i instsharedir
|
||||
local DDIRS i
|
||||
|
||||
instsharedir=@@XBPS_INSTALL_SHAREDIR@@
|
||||
|
||||
XBPS_HELPERSDIR=$instsharedir/helpers
|
||||
XBPS_SHUTILSDIR=$instsharedir/shutils
|
||||
XBPS_COMMONVARSDIR=$instsharedir/common
|
||||
XBPS_HELPERSDIR=@@XBPS_INSTALL_SHAREDIR@@/helpers
|
||||
XBPS_SHUTILSDIR=@@XBPS_INSTALL_SHAREDIR@@/shutils
|
||||
XBPS_COMMONVARSDIR=@@XBPS_INSTALL_SHAREDIR@@/common
|
||||
XBPS_META_PATH=$XBPS_MASTERDIR/var/db/xbps
|
||||
XBPS_PKGMETADIR=$XBPS_META_PATH/metadata
|
||||
XBPS_SRCPKGDIR=$XBPS_DISTRIBUTIONDIR/srcpkgs
|
||||
|
@ -70,8 +68,8 @@ set_defvars()
|
|||
fi
|
||||
done
|
||||
|
||||
xver=$(xbps-bin.static -V|awk '{print $2}')
|
||||
case "${xver}" in
|
||||
export XBPS_VERSION=$(xbps-bin.static -V|awk '{print $2}')
|
||||
case "${XBPS_VERSION}" in
|
||||
0.1[0-9].[0-9]*)
|
||||
xbps_conf="-C $XBPS_MASTERDIR/usr/local/etc/xbps"
|
||||
;;
|
||||
|
|
|
@ -30,7 +30,7 @@ xbps_make_binpkg()
|
|||
[ -z "$pkgname" ] && return 1
|
||||
|
||||
for subpkg in ${subpackages}; do
|
||||
unset revision noarch
|
||||
unset revision noarch nonfree
|
||||
. $XBPS_SRCPKGDIR/$pkgname/$subpkg.template
|
||||
pkgname=${subpkg}
|
||||
set_tmpl_common_vars
|
||||
|
@ -70,10 +70,14 @@ xbps_make_binpkg_real()
|
|||
if [ -n "$noarch" ]; then
|
||||
arch=noarch
|
||||
else
|
||||
arch=$xbps_machine
|
||||
arch=$XBPS_MACHINE
|
||||
fi
|
||||
binpkg=$pkgver.$arch.xbps
|
||||
if [ -n "$nonfree" ]; then
|
||||
pkgdir=$XBPS_PACKAGESDIR/nonfree/$arch
|
||||
else
|
||||
pkgdir=$XBPS_PACKAGESDIR/$arch
|
||||
fi
|
||||
#
|
||||
# Don't overwrite existing binpkgs by default, skip them.
|
||||
#
|
||||
|
@ -107,7 +111,7 @@ xbps_make_binpkg_real()
|
|||
# Remove binpkg if interrupted...
|
||||
trap "binpkg_cleanup $pkgdir $binpkg" INT
|
||||
msg_normal "Building $binpkg... "
|
||||
${fakeroot_cmd} ${fakeroot_cmd_args} \
|
||||
${FAKEROOT_CMD} ${FAKEROOT_CMD_ARGS} \
|
||||
tar --exclude "var/db/xbps/metadata/*/flist" \
|
||||
-cpf - ${mfiles} ${dirs} | \
|
||||
$XBPS_COMPRESS_CMD ${clevel} -qf > $pkgdir/$binpkg
|
||||
|
|
|
@ -89,7 +89,7 @@ xbps_write_metadata_pkg_real()
|
|||
if [ -n "$noarch" ]; then
|
||||
arch=noarch
|
||||
else
|
||||
arch=$xbps_machine
|
||||
arch=$XBPS_MACHINE
|
||||
fi
|
||||
|
||||
if [ -n "$revision" ]; then
|
||||
|
|
|
@ -26,6 +26,43 @@
|
|||
#
|
||||
# Installs a pkg by reading its build template file.
|
||||
#
|
||||
make_repoidx()
|
||||
{
|
||||
local f
|
||||
|
||||
case "${XBPS_VERSION}" in
|
||||
# >= 0.11.0
|
||||
[0-9].[1-9][1-9].[0-9])
|
||||
for f in ${XBPS_MACHINE} noarch nonfree/${XBPS_MACHINE}; do
|
||||
msg_normal "Updating pkg-index for local repository at:\n"
|
||||
msg_normal " $XBPS_PACKAGESDIR/$f\n"
|
||||
${XBPS_REPO_CMD} genindex ${XBPS_PACKAGESDIR}/${f} 2>/dev/null
|
||||
done
|
||||
;;
|
||||
*)
|
||||
msg_normal "Updating pkg-index for local repository at:\n"
|
||||
msg_normal " $XBPS_PACKAGESDIR\n"
|
||||
${XBPS_REPO_CMD} genindex ${XBPS_PACKAGESDIR} 2>/dev/null
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_build_pkg_and_update_repos()
|
||||
{
|
||||
local rval f
|
||||
|
||||
[ -z "$BUILD_BINPKG" ] && return 0
|
||||
|
||||
# Build binary package and update local repo index if -B is set.
|
||||
xbps_make_binpkg
|
||||
if [ $? -ne 0 -a $? -ne 6 ]; then
|
||||
return $?
|
||||
fi
|
||||
make_repoidx
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
install_pkg()
|
||||
{
|
||||
local curpkgn="$1" fullpkg pkg cdestdir
|
||||
|
@ -87,11 +124,11 @@ install_pkg()
|
|||
fi
|
||||
|
||||
# Install pkg into destdir.
|
||||
env xbps_machine=${xbps_machine} MASTERDIR=${_MASTERDIR} \
|
||||
wrksrc=${wrksrc} \
|
||||
env XBPS_MACHINE=${XBPS_MACHINE} wrksrc=${wrksrc} \
|
||||
MASTERDIR="${XBPS_MASTERDIR}" \
|
||||
BOOTSTRAP_PKG_REBUILD=$BOOTSTRAP_PKG_REBUILD \
|
||||
CONFIG_FILE=${XBPS_CONFIG_FILE} \
|
||||
${fakeroot_cmd} ${fakeroot_cmd_args} \
|
||||
${FAKEROOT_CMD} ${FAKEROOT_CMD_ARGS} \
|
||||
@@XBPS_INSTALL_LIBEXECDIR@@/doinst-helper \
|
||||
${curpkgn} || return $?
|
||||
|
||||
|
@ -114,24 +151,8 @@ install_pkg()
|
|||
remove_tmpl_wrksrc $wrksrc
|
||||
fi
|
||||
autoremove_pkg_dependencies $KEEP_AUTODEPS
|
||||
# Build binary package and update local repo index if
|
||||
# -B is set.
|
||||
if [ -n "$BUILD_BINPKG" ]; then
|
||||
xbps_make_binpkg
|
||||
rval=$?
|
||||
if [ $rval -ne 0 -a $rval -ne 6 ]; then
|
||||
_build_pkg_and_update_repos
|
||||
return $?
|
||||
elif [ $rval -eq 6 ]; then
|
||||
# binpkg exists, no need to update
|
||||
# repo pkg-index.
|
||||
:
|
||||
else
|
||||
msg_normal "Updating pkg-index for local repository at:\n"
|
||||
msg_normal " $XBPS_PACKAGESDIR\n"
|
||||
${XBPS_REPO_CMD} genindex ${XBPS_PACKAGESDIR} 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Stow package into masterdir.
|
||||
|
|
|
@ -92,7 +92,7 @@ reset_tmpl_vars()
|
|||
short_desc maintainer long_desc checksum wrksrc \
|
||||
make_cmd bootstrap register_shell keep_empty_dirs \
|
||||
make_build_target configure_script noextract nofetch \
|
||||
build_depends nostrip \
|
||||
build_depends nostrip nonfree \
|
||||
make_install_target version revision patch_args \
|
||||
sgml_catalogs xml_catalogs xml_entries sgml_entries \
|
||||
disable_parallel_build run_depends font_dirs preserve \
|
||||
|
@ -263,7 +263,7 @@ prepare_tmpl()
|
|||
done
|
||||
|
||||
for i in ${only_for_archs}; do
|
||||
[ "$i" = "$xbps_machine" ] && found=si && break
|
||||
[ "$i" = "$XBPS_MACHINE" ] && found=si && break
|
||||
done
|
||||
if [ -n "${only_for_archs}" -a -z "$found" ]; then
|
||||
msg_error "this package is only for: ${only_for_archs}.\n"
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
|
||||
XBPS_CONFIG_FILE=@@XBPS_INSTALL_ETCDIR@@/xbps-src.conf
|
||||
|
||||
progname=$(basename $0)
|
||||
fakeroot_cmd=/usr/bin/fakeroot
|
||||
fakeroot_cmd_args="--"
|
||||
sudo_cmd=sudo
|
||||
chroot_cmd=chroot
|
||||
xbps_machine=$(uname -m)
|
||||
PROGNAME=$(basename $0)
|
||||
FAKEROOT_CMD=/usr/bin/fakeroot
|
||||
FAKEROOT_CMD_ARGS="--"
|
||||
SUDO_CMD=sudo
|
||||
CHROOT_CMD=chroot
|
||||
XBPS_MACHINE=$(uname -m)
|
||||
|
||||
# Required utilities in host system.
|
||||
REQHOST_UTILS="awk bash bison sed gcc msgfmt patch makeinfo \
|
||||
|
@ -57,7 +57,7 @@ check_reqhost_utils()
|
|||
usage()
|
||||
{
|
||||
cat << _EOF
|
||||
$progname: [-BCDhKS] [-c file] [-m dir] [-p dir] [-s dir] [target] [pkgname]
|
||||
$PROGNAME: [-BCDhKS] [-c file] [-m dir] [-p dir] [-s dir] [target] [pkgname]
|
||||
|
||||
Targets:
|
||||
bootstrap
|
||||
|
@ -222,7 +222,6 @@ check_config_vars()
|
|||
echo "ERROR: not enough perms for masterdir $XBPS_MASTERDIR.\n"
|
||||
exit 1
|
||||
fi
|
||||
[ -z "${_MASTERDIR_FLAG}" ] && export _MASTERDIR="$XBPS_MASTERDIR"
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -246,7 +245,7 @@ while getopts "CBc:DhKm:p:Ss:" opt; do
|
|||
p)
|
||||
_PACKAGEDIR="$OPTARG"
|
||||
if [ ! -d ${_PACKAGEDIR} ]; then
|
||||
mkdir -p ${_PACKAGEDIR}/${xbps_machine}
|
||||
mkdir -p ${_PACKAGEDIR}/${XBPS_MACHINE}
|
||||
mkdir -p ${_PACKAGEDIR}/noarch
|
||||
fi
|
||||
;;
|
||||
|
@ -296,17 +295,17 @@ check_reqhost_utils
|
|||
# Fix up some vars when XBPS_USE_CAPABILITIES is set.
|
||||
#
|
||||
if [ -n "$XBPS_USE_CAPABILITIES" ]; then
|
||||
chroot_cmd="@@XBPS_INSTALL_LIBEXECDIR@@/capchroot"
|
||||
unset sudo_cmd
|
||||
CHROOT_CMD="@@XBPS_INSTALL_LIBEXECDIR@@/capchroot"
|
||||
unset SUDO_CMD
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
# disable sudo and fakeroot if uid==0
|
||||
chroot_cmd="chroot"
|
||||
unset sudo_cmd
|
||||
CHROOT_CMD="chroot"
|
||||
unset SUDO_CMD
|
||||
if [ -n "$IN_CHROOT" ]; then
|
||||
unset fakeroot_cmd
|
||||
unset fakeroot_cmd_args
|
||||
unset FAKEROOT_CMD
|
||||
unset FAKEROOT_CMD_ARGS
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -361,7 +360,7 @@ bootstrap-update)
|
|||
if [ -z "$IN_CHROOT" ]; then
|
||||
xbps_chroot_handler ${target} dummy
|
||||
else
|
||||
${fakeroot_cmd} ${fakeroot_cmd_args} ${XBPS_BIN_CMD} -y autoupdate
|
||||
${FAKEROOT_CMD} ${FAKEROOT_CMD_ARGS} ${XBPS_BIN_CMD} -y autoupdate
|
||||
fi
|
||||
;;
|
||||
build|configure)
|
||||
|
@ -466,9 +465,7 @@ make-repoidx)
|
|||
if [ -n "${_PACKAGEDIR}" ]; then
|
||||
export XBPS_PACKAGESDIR=${_PACKAGEDIR}
|
||||
fi
|
||||
msg_normal "Updating pkg-index for local repository at:\n"
|
||||
msg_normal " $XBPS_PACKAGESDIR\n"
|
||||
${XBPS_REPO_CMD} genindex ${XBPS_PACKAGESDIR} 2>/dev/null
|
||||
make_repoidx
|
||||
;;
|
||||
remove)
|
||||
if [ -z "${_pkgname}" ]; then
|
||||
|
|
Loading…
Reference in a new issue