[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal for possible consolidation of the packages


On Monday, November 25th, 2024 at 08:43, munix9 munix9@xxxxxxxxxxxxxx wrote:

> I don't understand what you're getting at, but I think you're
>
> complicating the subject unnecessarily.

I'm not trying to complicate, I'm trying to understand how I can get this done in a debian recipe, simple as that

> Virtual packages are a well-established method of package creation in
> the various distributions and if done correctly, it works without problems.
>
> For example, just have a look at the implementation for
> gambas3-gb-compress in PKGBUILD and gambas3.spec, that should be clear
>
> (it's not rocket science either).

I've never even packaged for Arch now studied a PKGBUILD (as that seems to be the Arch recipe). But I did have a look at it, and I get what you are talking about. But again, how to set this up in debian?
There is a lot of documentation to read, but never real life examples to study. Documentation is always very bare bone and definitely not meant as instruction manuals. These last ones are heavily lacking when it comes to packaging for debian and if they exist they package some simple .sh file and the likes as example.

Back to PKGBUILD (https://gitlab.com/gambas/gambas/-/blob/master/.obs/PKGBUILD):

package_gambas3-gb-compress

()

{

pkgdesc

=

"Gambas compression component"

depends

=(

'gambas3-runtime'

'bzip2'

'zlib'

'zstd'

)

provides

=(

'gambas3-gb-compress-bzlib2'

'gambas3-gb-compress-zlib'

'gambas3-gb-compress-zstd'

)

_install fakeinstall/usr/lib/gambas3/gb.compress.component

_install fakeinstall/usr/share/gambas3/info/gb.compress.info

_install fakeinstall/usr/share/gambas3/info/gb.compress.list

_install fakeinstall/usr/lib/gambas3/gb.compress.so

*

}

- 1 package

package_gambas3-gb-compress-bzlib2

()

{

pkgdesc

=

"Gambas bzlib2 component"

depends

=(

'gambas3-runtime'

)

_install fakeinstall/usr/lib/gambas3/gb.compress.bzlib2.component

_install fakeinstall/usr/share/gambas3/info/gb.compress.bzlib2.info

_install fakeinstall/usr/share/gambas3/info/gb.compress.bzlib2.list

_install fakeinstall/usr/lib/gambas3/gb.compress.bzlib2.so

*

}

package_gambas3-gb-compress-zlib

()

{

pkgdesc

=

"Gambas zlib compression component"

depends

=(

'gambas3-runtime'

)

_install fakeinstall/usr/lib/gambas3/gb.compress.zlib.component

_install fakeinstall/usr/share/gambas3/info/gb.compress.zlib.info

_install fakeinstall/usr/share/gambas3/info/gb.compress.zlib.list

_install fakeinstall/usr/lib/gambas3/gb.compress.zlib.so

*

}

package_gambas3-gb-compress-zstd

()

{

pkgdesc

=

"Gambas zstd component"

depends

=(

'gambas3-runtime'

)

_install fakeinstall/usr/lib/gambas3/gb.compress.zstd.component

_install fakeinstall/usr/share/gambas3/info/gb.compress.zstd.info

_install fakeinstall/usr/share/gambas3/info/gb.compress.zstd.list

_install fakeinstall/usr/lib/gambas3/gb.compress.zstd.so

*

}

- 3 more packages

Same as I do in debian
In control file I write:
---
Package: gambas3-gb-compress
Architecture: any
Section: libdevel
Depends: ${misc:Depends},
${shlibs:Depends}
Description: Gambas compression component
Gambas is a free development environment based on a Basic interpreter
with object extensions, like Visual Basic(tm) (but it is NOT a clone!).
.
This package have the needed base libraries for the rest of compression
components.

Package: gambas3-gb-compress-bzlib2
Architecture: any
Section: libdevel
Depends: ${misc:Depends},
${shlibs:Depends},
gambas3-gb-compress (>= ${binary:Version})
Description: Gambas bzlib2 component
Gambas is a free development environment based on a Basic interpreter
with object extensions, like Visual Basic(tm) (but it is NOT a clone!).
.
This package allows you to compress/uncompress data or files with
the bzip2 algorithm.

Package: gambas3-gb-compress-zlib
Architecture: any
Section: libdevel
Depends: ${misc:Depends},
${shlibs:Depends},
gambas3-gb-compress (>= ${binary:Version})
Description: Gambas zlib compression component
Gambas is a free development environment based on a Basic interpreter
with object extensions, like Visual Basic(tm) (but it is NOT a clone!).
.
This package allows you to compress/uncompress data or files with
the gzip and PKZIP algorithm.

Package: gambas3-gb-compress-zstd
Architecture: any
Section: libdevel
Depends: ${misc:Depends},
${shlibs:Depends},
gambas3-gb-compress (>= ${binary:Version})
Description: Gambas zstd component
Gambas is a free development environment based on a Basic interpreter
with object extensions, like Visual Basic(tm) (but it is NOT a clone!).
.
This package allows you to compress/uncompress data or files with the zstd algorithm.
---

The other info (like /usr/lib/gambas3/gb.compress etc) goes into .install files named after the component

So, I have 4 packages and my understanding of above PKGBUILD is that 4 packages are made. (I'm no Arch packager, first time I have a look in such a file).

Then the gambas3.spec (does this work together with PKGBUILD or is this something different?):
---

%package gb-compress

Summary:        Gambas compression component

BuildRequires:  pkgconfig(bzip2)

BuildRequires:  pkgconfig(libzstd)

BuildRequires:  pkgconfig(zlib)

Provides:       %{name}-gb-compress-bzlib2 = %{version}

Obsoletes:      %{name}-gb-compress-bzlib2 < %{version}

Provides:       %{name}-gb-compress-zlib = %{version}

Obsoletes:      %{name}-gb-compress-zlib < %{version}

Provides:       %{name}-gb-compress-zstd = %{version}

Obsoletes:      %{name}-gb-compress-zstd < %{version}

%description gb-compress

%{_desc}

This package have the needed base libraries for the rest of compression

components.

---
This is what is you call a virtual package to my understanding, correct me if I am wrong.
What I see is the BuildRequires refering to pkgconfig(bzip2), so doesn't that mean that, somewhere you have to describe how to make that packages?
And since you do have to describe it somewhere, how does that make it easier?

I am seriously trying to understand this.

gbWilly
[Gambas3 for Debian](https://gitlab.com/gbWilly/gambas3-debian-repository)

>

Follow-Ups:
Re: Proposal for possible consolidation of the packagesmunix9 <munix9@xxxxxxxxxxxxxx>
References:
Proposal for possible consolidation of the packagesmunix9 <munix9@xxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesmunix9 <munix9@xxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesmunix9 <munix9@xxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Proposal for possible consolidation of the packagesmunix9 <munix9@xxxxxxxxxxxxxx>