Hello list,
Here is a patch against makepkg from git which introduces a new function
"write_srcinfo()". This generates a file .SRCINFO - like the .PKGINFO
one - when "makepkg --source" is run and then it is added to the src.tar.gz
archive.
I think having such a file is an important step for getting split packages to
the AUR. It is also useful for third party applications. Since this file is
generated during making the source archive, there is no need for parsing/sourcing
the PKGBUILD everytime meta infos are needed afterwards.
This is also a way of standardizing the source archive.
.SRCINFO looks like (generated for gcc from core):
"
# Generated by makepkg 3.4.0
# Tue Jul 27 12:56:38 UTC 2010
global pkgbase = gcc
global pkgname = gcc
global pkgname = gcc-libs
global pkgname = gcc-fortran
global pkgname = gcc-objc
global pkgname = gcc-ada
global pkgver = 4.5.0-6
global pkgdesc = The GNU Compiler Collection
global url = http://gcc.gnu.org
global packager = Vlad George
global builddate = 1280235398
global source = ftp://gcc.gnu.org/pub/gcc/snapshots/4.5-20100610/gcc-core-4.5-20100610.tar.bz2
global source = ftp://gcc.gnu.org/pub/gcc/snapshots/4.5-20100610/gcc-g++-4.5-20100610.tar.bz2
global source = ftp://gcc.gnu.org/pub/gcc/snapshots/4.5-20100610/gcc-fortran-4.5-20100610.tar.bz2
global source = ftp://gcc.gnu.org/pub/gcc/snapshots/4.5-20100610/gcc-objc-4.5-20100610.tar.bz2
global source = ftp://gcc.gnu.org/pub/gcc/snapshots/4.5-20100610/gcc-ada-4.5-20100610.tar.bz2
global source = ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-man.20100312.tar.bz2
global source = gcc_pure64.patch
global source = gcc-hash-style-both.patch
global source = r160561.patch
global license = GPL
global license = LGPL
global license = custom
global arch = i686
global arch = x86_64
global makedepends = binutils>=2.20.1
global makedepends = libmpc>=0.8.2-2
global makedepends = cloog-ppl>=0.15.8
global makedepends = libelf
global makedepends = gcc-ada
gcc depends = binutils>=2.20.1
gcc depends = libmpc>=0.8.1-2
gcc depends = cloog-ppl>=0.15.8
gcc depends = libelf
gcc groups = base-devel
gcc install = gcc.install
gcc-libs pkgdesc = Runtime libraries shipped by GCC for C and C++ languages
gcc-libs groups = base
gcc-libs depends = glibc>=2.11.1-2
gcc-libs install = gcc-libs.install
gcc-fortran pkgdesc = Fortran front-end for GCC
gcc-fortran depends = gcc=4.5.0-6
gcc-fortran install = gcc-fortran.install
gcc-objc pkgdesc = Objective-C front-end for GCC
gcc-objc depends = gcc=4.5.0-6
gcc-ada pkgdesc = Ada front-end for GCC (GNAT)
gcc-ada depends = gcc=4.5.0-6
gcc-ada install = gcc-ada.install
"
As you see this file contains of different parts separated by a leading
tag. "global" denotes the global PKGBUILD vars and the name of the split
package denotes the local package variables. However, this is just a
first formatting approach. This can be changed according to further
needs. I think this is a clear and easily readable/parseable output.
Note that "packager" defaults to the person who actually build the
source archive. Perhaps this has to be changed to AUR user name, not to
the makepkg.conf PACKAGER entry.
Vlad
--