On Sat 2007-09-22 00:00 , Essien Ita Essien wrote:
> Aaron Griffin wrote:
> > On 9/21/07, Xavier <[EMAIL PROTECTED]> wrote:
> >> On Fri, Sep 21, 2007 at 03:52:41PM -0500, Aaron Griffin wrote:
> >>>> There is a recent feature request about it, including a patch :
> >>>> http://bugs.archlinux.org/task/7982
> >>>>
> >>>> And also a beginning of discussion on pacman-dev ML :
> >>>> http://www.archlinux.org/pipermail/pacman-dev/2007-September/009380.html
> >>>>
> >>>> So it might be not totally hopeless.
> >>> Yeah there's another FR with a similar patch. We have three ongoing
> >>> systems and none of them.... feel quite right.
> >>>
> >>> More input is needed 8)
> >> Oh right, so just for the record, the one I missed is :
> >> http://bugs.archlinux.org/task/7144
> >>
> >> This one already has the links to the two other projects in its comments.
> >> http://archlinux.org/pipermail/pacman-dev/2007-April/008171.html
> >> http://bugs.archlinux.org/task/7982
> > 
> > I find it awfully ironic that a discussion about splitting packages
> > was split from another email thread 8)
> > 
> > Anyway, good call, this is a great place to discuss this - way more
> > mindshare than the pacman-dev list.
> > 
> > Let me summarize here.
> > 
> > One of the things we'd LOVE to do with PKGBUILDs is create the ability
> > to build multiple packages from one PKGBUILD. That is, we could run
> > make once, and create: foo, foo-libs, and foo-scripts all at the same
> > time.
> > In addition, we'd like to be able to do this a second way - that is,
> > build 2 packages, bar-mysql and bar-postgres, with different configure
> > flags via the same PKGBUILD.
> 
> this is simpler to implement and it will lead to my implementation idea 
> for the first one, so i'll describe this first.
> 
> We can have multiple build(){} functions (that's what they really are). 
> My idea would look like:
> 
> pkgname=bar
> pkgver=ver
> pkgrel=rel
> ...
> ...
> 
> build("mysql") {
>       #steps to build mysql version
> }
> 
> build("postgres") {
>       #steps to build postgres version
> }
> 
> This would result in two packages: bar-mysql-ver-rel.pkg.tar.gz and 
> bar-postgres-ver-rel.pkg.tar.gz
> 
> One key feature would be to make sure normal functions are supported 
> from the build sections so we could do:
> 
> all_dbs() {
> }
> 
> build("mysql") {
>       ./configure --enable-mysql
>       all_dbs
> }
> 
> build("postgres") {
>       ./configure --enable-postgres
>       all_dbs
> }
> 
> This is simple to implement and keeps the PKGBUILDs simple to write... 
> which is why I like it (i.e. splitting based on build). Note that each 
> build function will have an optional local variable desc=, which if 
> given will provide the description for that particular build packaging.
> 
> To achieve the first (i.e. splitting based on arbitrary file 
> collections) the PKGBUILDs will have to be a bit more complicated. There 
> will have to be a definition of a files collection like a files(){} 
> section or something.
> 
> so I see a:
> 
> pkgname=foo
> pkgver=ver
> pkgrel=rel
> 
> build()
> {
>       ./configure
>       make
>       make DESTDIR=... install
> 
>       files("docs") {
>               #will build foo-docs-ver-rel.pkg.tar.gz
>       
>       }
> 
>       files("libs") {
>               #will build foo-libs-ver-rel.pkg.tar.gz
>       }
> 
>       #all the unpicked files will be put together here
>       #into a package named foo-ver-rel.pkg.tar.gz
> }
> 
> build("mysql") {
>       
>       files("docs") {
>               #will create a foo-mysql-docs-ver-rel.pkg.tar.gz
>       }
> 
>       #all unspecified files here will be put together
>       # into foo-mysql-ver-rel.pkg.tar.gz
> }
> 
> 
> 
> Note that both the build() and files() sections can have a local desc= 
> (or pkgdesc=?) that it can optionally inherit from its parent.
> 
> This is my first draft, which is actually gotten from writting too many 
> RPM spec files, not liking them, wishing they were more like PKGBUILDs 
> and wishing PKGBUILDs would pick one or two good things from them spec 
> files.

PKGBUILDs are bash scripts, what does build("mysql") mean in bash
scripting?

-- 
Alessio 'mOLOk' Bolognino
Arch Linux Trusted User

Please send personal email to [EMAIL PROTECTED]

Public Key http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xFE0270FB
GPG Key ID = 1024D / FE0270FB 2007-04-11
Key Fingerprint = 9AF8 9011 F271 450D 59CF  2D7D 96C9 8F2A FE02 70FB

Attachment: pgpskkEaCpSvf.pgp
Description: PGP signature

_______________________________________________
arch mailing list
[email protected]
http://archlinux.org/mailman/listinfo/arch

Reply via email to