Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=1cdc2dad4f369af58056b71e6d87dbba04ef3dff
commit 1cdc2dad4f369af58056b71e6d87dbba04ef3dff Author: Michel Hermier <[email protected]> Date: Thu Nov 22 22:39:56 2012 +0100 scripts/makepkg * Use _F_build_date instead of builddate variable. * Define it just before the build start. * Remove unecessary global variable builtype (make it local to .PKGINFO generation, it's only user). diff --git a/scripts/makepkg b/scripts/makepkg index 1d87691..dc39ec0 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -635,7 +635,7 @@ chroot_enter() { buildscript_validate() { if [ "`type -p fblint`" ]; then - if ! fblint -p $BUILDSCRIPT &>/dev/null; then + if ! fblint -p "$BUILDSCRIPT" &>/dev/null; then warning "fblint says some needed variables are missing or incomplete." plain "Abort the build unless you know what you are doing." fi @@ -1101,10 +1101,15 @@ pkg_rmdirs() pkg_print_pkginfo() { - local it + local buildtype it size - # Print .PKGINFO file to stdout + if [ "$INCHROOT" != "1" ]; then + buildtype="custom" + else + buildtype="chroot" + fi size=`du -cb "$startdir/pkg.$1" | tail -n 1 | awk '{print $1}'` + $ECHO "# Generated by makepkg" $ECHO "# $(date)" $ECHO "pkgname = $1" @@ -1115,14 +1120,13 @@ pkg_print_pkginfo() fi done <<< "${_P_package_descriptions["$1"]}" $ECHO "url = $url" - $ECHO "builddate = $builddate" + $ECHO "builddate = $_P_build_date" $ECHO "buildtype = $buildtype" - $ECHO "packager = $packager" + $ECHO "packager = $PACKAGER" $ECHO "size = $size" if [ "$CARCH" != "" ]; then $ECHO "arch = $CARCH" fi - for it in ${_P_package_licenses["$1"]}; do $ECHO "license = $it" done @@ -1445,6 +1449,8 @@ makepkg_build() { fi export LDFLAGS + _P_build_date=`LC_ALL= ; LANG= ; date -u "+%a %b %e %H:%M:%S %Y"` + buildenv_build } @@ -1756,9 +1762,7 @@ if [ ! -z "$DOWNLOAD" -a "$INFAKEROOT" != "1" ]; then done fi -if [ "$PACKAGER" != "" ]; then - packager="$PACKAGER" -else +if [ -z "$PACKAGER" ]; then error "Please make sure that you edit /etc/makepkg.conf and set the PACKAGER= variable" exit 1 fi @@ -2003,14 +2007,6 @@ else pkg_foreach "${_P_subpkgsfixes[@]}" fi -# get some package meta info -builddate=`LC_ALL= ; LANG= ; date -u "+%a %b %e %H:%M:%S %Y"` -if [ "$INCHROOT" != "1" ]; then - buildtype="custom" -else - buildtype="chroot" -fi - pkg_foreach create_pkg cd $startdir _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
