fix archiver (ar) on 32 bit systems

update package script
This commit is contained in:
Thomas Pöchtrager 2013-12-15 10:06:41 +01:00
parent a4141a2e92
commit 643e593770
2 changed files with 30 additions and 13 deletions

View File

@ -340,21 +340,21 @@ put_arobj(cfp, sb)
(void)sprintf(hb, HDR3, name, (long int)tv_sec,
(unsigned int)(u_short)sb->st_uid,
(unsigned int)(u_short)sb->st_gid,
sb->st_mode, sb->st_size, ARFMAG);
sb->st_mode, (int64_t)sb->st_size, ARFMAG);
lname = 0;
} else if (lname > sizeof(hdr->ar_name) || strchr(name, ' '))
(void)sprintf(hb, HDR1, AR_EFMT1, (lname + 3) & ~3,
(long int)tv_sec,
(unsigned int)(u_short)sb->st_uid,
(unsigned int)(u_short)sb->st_gid,
sb->st_mode, sb->st_size + ((lname + 3) & ~3),
sb->st_mode, (int64_t)sb->st_size + (int64_t)((lname + 3) & ~3),
ARFMAG);
else {
lname = 0;
(void)sprintf(hb, HDR2, name, (long int)tv_sec,
(unsigned int)(u_short)sb->st_uid,
(unsigned int)(u_short)sb->st_gid,
sb->st_mode, sb->st_size, ARFMAG);
sb->st_mode, (int64_t)sb->st_size, ARFMAG);
}
size = sb->st_size;
} else {

View File

@ -1,12 +1,29 @@
#!/usr/bin/env bash
dir=`pwd`
packagetmp=`mktemp -d`
cp -r . $packagetmp || exit $?
pushd $packagetmp >/dev/null
./cleanup.sh 2>/dev/null
rm -rf .git 2>/dev/null
rm cctools*.tar.* 2>/dev/null
tar -pczf $dir/cctools-XXX-ld64-XXX.tar.gz * || exit $?
popd >/dev/null
rm -rf $packagetmp || exit $?
set -ex
DIR=`pwd`
PACKAGETMP=`mktemp -d`
REVHASH=`git rev-parse --short HEAD`
CCTOOLSVER=`cat README.md | grep "Current Version: " | awk '{print $3}'`
LD64VER=`cat README.md | grep "Current Version: " | awk '{print $5}'`
PACKAGE=cctools-${CCTOOLSVER}-${LD64VER}_$REVHASH
mkdir $PACKAGETMP/$PACKAGE
cp -r . $PACKAGETMP/$PACKAGE
pushd $PACKAGETMP &>/dev/null
pushd $PACKAGE &>/dev/null
rm -rf .git
rm -f cctools*.tar.*
rm -f package.sh
popd &>/dev/null
XZ_OPT=-9 tar cJf $DIR/$PACKAGE.tar.xz *
popd &>/dev/null
rm -rf $PACKAGETMP