Roman Kyrylych wrote:
> 2008/6/16 Aaron Griffin <aaronmgriffin@gmail.com>:
>
>> On Fri, Jun 13, 2008 at 11:24 AM, Sergej Pupykin <pupykin.s@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I like following idea:
>>>
>>> PKGBUILD
>>> ------------------
>>> pkgname=foobar
>>> pkgver=1.0
>>> pkgrel=1
>>> subpackages=(dev doc)
>>>
>>> ....
>>>
>>> build() {
>>>
>>> .....
>>>
>>> make DESTDIR=$startdir/pkg install
>>> ...
>>> make DESTDIR=$startdir/pkg-dev install
>>> ...
>>> make DESTDIR=$startdir/pkg-doc install
>>> }
>>> ---------------
>>>
>>> According to subpackages array makepkg creates 3 dirs:
>>> - $startdir/pkg (as usually)
>>> - $startdir/pkg-dev
>>> - $startdir/pkg-doc
>>>
>>> PKGBUILDs build function install all stuff into them
>>>
>>> And then, makepkg creates 3 packages:
>>>
>>> $pkgname-...pkg.tar.gz
>>> $pkgname-dev-...pkg.tar.gz
>>> $pkgname-doc-...pkg.tar.gz
>>>
>> FTR I like this idea too. Just setup some way to use $pkgdir/foo/
>> instead of $pkgdir (that's what the subpackages=() array does in the
>> above example), and then the rest is free-form. It's the simplest IMO.
>>
>
> It's my favourite too.
>
>
This is pretty much what I suggested in one of the bug reports about
this. But, the problems I now have with this method are:
1) where do you define the different pkgdesc for each package
2) what if there is no obvious "base" package?
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
06-17-2008, 12:20 PM
Allan McRae
Splitting packages in makepkg
Aaron Griffin wrote:
> On Mon, Jun 16, 2008 at 12:57 PM, Sergej Pupykin <pupykin.s@gmail.com> wrote:
>
>>> I see a downside in the proposed scheme: you can not create a package
>>> without the $pkgname- suffix, e.g. you can't create the "kopete" or
>>> "kmail" package from "kdenetwork". Moreover, you can't change the
>>> pkgdesc for each sub-package, which can be useful.
>>>
>> makepkg may use subpackages as a new package name
>>
>> subpackages=(foo-dev foo-doc kmail kopete)
>>
>
> Exactly what I was going to say - it's all hypothetical. We could use
> $pkgdir/full-package-name/* for a subpackage "full-package-name"
>
Just another thought. Why do we even need the subpkg array. Why not:
"pkgname=foo" for single packages and "pkgname=('foo' 'foo-bar'
'foo-doc')" for split packages? I would have to check that you can do
that in bash...
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
06-17-2008, 12:20 PM
Allan McRae
Splitting packages in makepkg
Aaron Griffin wrote:
> On Mon, Jun 16, 2008 at 12:57 PM, Sergej Pupykin <pupykin.s@gmail.com> wrote:
>
>>> I see a downside in the proposed scheme: you can not create a package
>>> without the $pkgname- suffix, e.g. you can't create the "kopete" or
>>> "kmail" package from "kdenetwork". Moreover, you can't change the
>>> pkgdesc for each sub-package, which can be useful.
>>>
>> makepkg may use subpackages as a new package name
>>
>> subpackages=(foo-dev foo-doc kmail kopete)
>>
>
> Exactly what I was going to say - it's all hypothetical. We could use
> $pkgdir/full-package-name/* for a subpackage "full-package-name"
>
Just another thought. Why do we even need the subpkg array. Why not:
"pkgname=foo" for single packages and "pkgname=('foo' 'foo-bar'
'foo-doc')" for split packages? I would have to check that you can do
that in bash...
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
make DESTDIR=$startdir/pkg install
...
make DESTDIR=$startdir/pkg-dev install
...
make DESTDIR=$startdir/pkg-doc install
}
---------------
According to subpackages array makepkg creates 3 dirs:
- $startdir/pkg (as usually)
- $startdir/pkg-dev
- $startdir/pkg-doc
PKGBUILDs build function install all stuff into them
And then, makepkg creates 3 packages:
$pkgname-...pkg.tar.gz (if $startdir/pkg is not empty)
$pkgname-dev-...pkg.tar.gz (if $startdir/pkg-dev is not empty)
$pkgname-doc-...pkg.tar.gz (if $startdir/pkg-doc is not empty)
May be I am not too famillar with bash, but you can get pkgdesc_dev at
least with construction like this:
$ export pkgdesc_dev="foo dev desc"
$ export pkgdescname=pkgdesc_dev
$ echo `bash -c "echo $`echo $pkgdescname`"`
foo dev desc
It can be easy modified for full package names as I described above:
subpackages=(foo foo-dev foo-doc kmail kopete)
or
pkgname=(foo foo-dev foo-doc kmail kopete)
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
06-17-2008, 03:00 PM
Silvio Fricke
Splitting packages in makepkg
Hello Friends,
> Modified idea:
>
> PKGBUILD
> ------------------
> pkgname=foobar
> pkgver=1.0
> pkgrel=1
> subpackages=(dev doc)
> pkgdesc="base package desc"
> pkgdesc_dev="foo dev desc"
> ....
>
> build() {
>
> .....
>
> make DESTDIR=$startdir/pkg install
> ...
> make DESTDIR=$startdir/pkg-dev install
> ...
> make DESTDIR=$startdir/pkg-doc install
> }
> ---------------
>
> According to subpackages array makepkg creates 3 dirs:
> - $startdir/pkg (as usually)
> - $startdir/pkg-dev
> - $startdir/pkg-doc
>
> PKGBUILDs build function install all stuff into them
>
> And then, makepkg creates 3 packages:
>
> $pkgname-...pkg.tar.gz (if $startdir/pkg is not empty)
> $pkgname-dev-...pkg.tar.gz (if $startdir/pkg-dev is not empty)
> $pkgname-doc-...pkg.tar.gz (if $startdir/pkg-doc is not empty)
>
> May be I am not too famillar with bash, but you can get pkgdesc_dev at
> least with construction like this:
> $ export pkgdesc_dev="foo dev desc"
> $ export pkgdescname=pkgdesc_dev
> $ echo `bash -c "echo $`echo $pkgdescname`"`
> foo dev desc
>
> It can be easy modified for full package names as I described above:
> subpackages=(foo foo-dev foo-doc kmail kopete)
> or
> pkgname=(foo foo-dev foo-doc kmail kopete)
why we need this? We need only a possibility to make splitted packages.
I see the first step to get the same buildfiles like gentoo :-).
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
06-17-2008, 09:17 PM
Miklos Vajna
Splitting packages in makepkg
On Mon, Jun 16, 2008 at 04:31:11PM -0500, Dan McGee <dpmcgee@gmail.com> wrote:
> > and this is where you make it impossible to name a subpkg 'kopete',
> > right?
> >
> > how would that handle the case when for example openoffice.org-i18n-de
> > is split from openoffice.org?
> >
> > (given that the implementation we have in pacman-g2 was already flamed
> > off here, iirc - i don't want to hype it here, but that one deals with
> > such a problem properly.)
>
> Can you possibly give us an overview of how it works? I think it would
> be quite relevant to this discussion as it is actually a system that
> is used, rather than a bunch of "well this might work" scenarios.
probably the biggest problem with it (since every implementation has
some problems) is that it can be a bit tricky to see for example what
deps are set for a given subpackage if you have a lot of them.
if you ask me what deps 'gcc-objc++' has, then i can't say the answer
right now, i have to search a bit.
and the big benefit (what rpm does not have) is that if you don't split
a given file then it's included in the main package and it is not just
dropped, like rpm does.
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
06-17-2008, 09:35 PM
Miklos Vajna
Splitting packages in makepkg
On Tue, Jun 17, 2008 at 10:20:59PM +1000, Allan McRae <mcrae_allan@hotmail.com> wrote:
> Just another thought. Why do we even need the subpkg array. Why not:
> "pkgname=foo" for single packages and "pkgname=('foo' 'foo-bar'
> 'foo-doc')" for split packages? I would have to check that you can do
> that in bash...
pkgname=("foo") is equivalent to pkgname="foo" in bash, at least
${pkgname[0]} will work for both, ${#pkgname[@]} will report 1 for both,
etc.
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev