Make it possible to install 'custom-install' pkgs without distfiles.

Make xbps-base-{chroot,system} install the lib -> lib64 symlinks on
x86_64.

--HG--
extra : convert_revision : 9404d50c8a15dcd700df49aace1bbd105749f00a
This commit is contained in:
Juan RP 2008-12-27 04:21:38 +01:00
parent ccd4556853
commit f6f7288c48
4 changed files with 34 additions and 5 deletions

View File

@ -55,7 +55,7 @@ extract_distfiles()
count=$(($count + 1))
done
if [ $count -gt 1 ]; then
if [ "$count" -gt 1 ]; then
if [ -z "$wrksrc" ]; then
msg_error "\$wrksrc must be defined with multiple distfiles."
exit 1

View File

@ -106,6 +106,7 @@ setup_tmpl()
#
prepare_tmpl()
{
local REQ_VARS=
local i=
local found=
@ -114,7 +115,11 @@ prepare_tmpl()
#
[ "$build_style" = "meta-template" ] && return 0
REQ_VARS="pkgname distfiles version build_style"
if [ "$build_style" = "custom-install" -a -z "$distfiles" ]; then
mkdir -p $XBPS_BUILDDIR/$pkgname-$version
fi
REQ_VARS="pkgname version build_style short_desc long_desc"
# Check if required vars weren't set.
for i in ${REQ_VARS}; do

View File

@ -1,7 +1,7 @@
# Template file for 'xbps-base-chroot'
pkgname=xbps-base-chroot
version=0.3
build_style=meta-template
version=0.4
build_style=custom-install
short_desc="xbps base packages for the chroot target"
maintainer="Juan RP <xtraeme@gmail.com>"
long_desc="
@ -16,3 +16,15 @@ build_depends="glibc-2.8 kernel-libc-headers-2.6.27.3 bash-3.2 coreutils-6.12
sed-4.1.5 make-3.81 diffutils-2.8.1 file-4.26 proplib-0.1 patch-2.5.4
wget-1.11.4 dash-0.5.4"
run_depends="$build_depends"
do_install()
{
local destdir=$XBPS_DESTDIR/$pkgname-$version
if [ "$xbps_machine" = "x86_64" ]; then
mkdir -p $destdir/usr/lib
mkdir -p $destdir/lib
cd $destdir && ln -s lib lib64
cd $destdir/usr && ln -s lib lib64
fi
}

View File

@ -1,7 +1,7 @@
# Template file for 'xbps-base-chroot'
pkgname=xbps-base-system
version=0.1
build_style=meta-template
build_style=custom-install
short_desc="xbps base system packages"
maintainer="Juan RP <xtraeme@gmail.com>"
long_desc="
@ -17,3 +17,15 @@ run_depends="$build_depends initng-0.6.10.2 coreutils-6.12 dash-0.5.4
zlib-1.2.3 file-4.26 diffutils-2.8.1 sed-4.1.5 findutils-4.4.0
grep-2.5.3 gawk-3.1.6 gzip-1.3.12 bzip2-1.0.5 tar-1.20 ncurses-5.7
bash-3.2 glibc-2.9 wget-1.11.4"
do_install()
{
local destdir=$XBPS_DESTDIR/$pkgname-$version
if [ "$xbps_machine" = "x86_64" ]; then
mkdir -p $destdir/usr/lib
mkdir -p $destdir/lib
cd $destdir && ln -s lib lib64
cd $destdir/usr && ln -s lib lib64
fi
}