void-packages/srcpkgs/chroot-binutils/template

60 lines
1.5 KiB
Plaintext
Raw Normal View History

2012-02-28 12:02:28 +01:00
# Template file for 'chroot-binutils'
pkgname=chroot-binutils
version=2.23.52.0.2
revision=2
wrksrc="binutils-${version}"
2012-02-28 12:02:28 +01:00
short_desc="GNU binary utilities -- for xbps-src use"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.gnu.org/software/binutils/"
license="GPL-3"
distfiles="${KERNEL_SITE}/devel/binutils/binutils-$version.tar.xz"
checksum=c2229d5d4067c782b67cfaf7f049acd8361407c0870991bc5430be5c548f6825
2012-02-28 12:02:28 +01:00
if [ "$IN_CHROOT" ]; then
hostmakedepends="flex perl"
fi
makedepends="zlib-devel"
bootstrap=yes
do_configure() {
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
CONFIGFLAG="--enable-64-bit-bfd --enable-multilib"
fi
if [ "$CROSS_BUILD" ]; then
# Do not use configure_args nor build_style=gnu-configure,
# avoiding --with-sysroot to $XBPS_CROSS_BASE.
CONFIGFLAG="--host=$XBPS_CROSS_TRIPLET --with-build-sysroot=$XBPS_CROSS_BASE"
fi
./configure --prefix=/usr --disable-shared \
--enable-threads --disable-plugins \
--with-mmap --disable-bootstrap ${CONFIGFLAG}
}
2012-02-28 12:02:28 +01:00
do_build() {
make ${makejobs}
}
do_install() {
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
2012-02-28 12:02:28 +01:00
mkdir -p ${DESTDIR}/usr/lib
cd ${DESTDIR}/usr
ln -s lib lib64
cd ${wrksrc}
2012-02-28 12:02:28 +01:00
fi
make DESTDIR=${DESTDIR} tooldir=/usr install
2012-02-28 12:02:28 +01:00
[ -h ${DESTDIR}/usr/lib64 ] && rm -f ${DESTDIR}/usr/lib64
rm -f ${DESTDIR}/usr/lib/*.a
rm -rf ${DESTDIR}/usr/share ${DESTDIR}/usr/include
}
chroot-binutils_package() {
provides="binutils-${version}"
conflicts="binutils>=0"
noverifyrdeps=yes
pkg_install() {
vmove usr
}
}