#793076 Support for PHP PEAR, PECL and Composer packages

Package:
debmake
Source:
debmake
Submitter:
Mathieu Parent
Date:
2023-10-29 05:15:02 UTC
Severity:
wishlist
Tags:
#793076#5
Date:
2015-07-21 05:08:44 UTC
From:
To:
Hello,

I've prepared a patch to add support for PEAR and PECL packages.

I couldn't get the following to work:
- binary deps are skipped (and reverted to Depends: ${misc:Depends},
  ${shlibs:Depends})
- How to pass arch?
- Vcs-* fields are not in control field (even commented out)

Once I understand this, I will also add Composer support.

NB: some other things that we know with thoses kind of pakages:
- Maintainer/Uploaders field
- (sometimes) Home page
- (sometimes) upstream tarball (debian/watch)

Regards

Mathieu Parent

#793076#10
Date:
2015-07-21 05:17:34 UTC
From:
To:
of course, I forgot the actual patch...
#793076#15
Date:
2015-08-02 01:36:39 UTC
From:
To:
Hi,

Thanks for your code.

I see.  This is for packaging PHP ecosystem packages written in PHP and
other languages which I have almost no idea :-)

I think their data are generated in debs.py.

You are trying to add recommend and suggests and break support.
+        elif t == 'phppear': # dh_phppear
+            dp.update({'${phppear:Debian-Depends}'})
+            rec.update({'${phppear:Debian-Recommends}'})
+            sug.update({'${phppear:Debian-Suggests}'})
+            br.update({'${phppear:Debian-Breaks}'})

These look very interesting since debmake does minimal work.

But the following code looks odd.
             ',\n\t'.join(deb['depends']),
+            recommends,
+            suggests,
+            breaks,

I wonder why you are not coding these 3 additions in the same way as
',\n\t'.join(deb['depends']),

If you can identify bin package type:
PEAR a = 'all'
PECL a = 'any'

I need to think again but if you can detect PECL before debs.py,

Something along ...
+            elif match_prefix(t, 'phppecl'): # PHP PECL
+                a = 'any'
+                m = 'same'
+                t = 'phppecl'
+            elif match_prefix(t, 'phppear'): # PHP PEAR
+                a = 'all
+                m = 'foreign'
+                t = 'phppear'

Quite frankly, I did not take care similar situation for Python, Perl,
... and left them all arch all.  I was not even sure how to detect such
case reliably.

in control.py
 guess_vcsvcs(vcsvcs)
 guess_vcsbrowser(vcsbrowser)
These set values

Your idea of having option to set them may be good idea.

If you update these and settles, we need debmake-doc updated too to get
the proper manpage and documentation.

Please note development is on devel branch.

Currently we are not forcing group maintenance as default.
That may be good idea to use such as default.

Currently, we copy
extra1/watch

Adding @WATCHLINE@ and setting that value via substlist in debian.py if needed
may be good idea.

extra1/watch: (NOW)
# You must remove unused comment lines for the released package.
###
### watch control file for uscan
###
### See uscan(1) for how to set this file properly
...

extra1/watch: (UPDATED)
# You must remove unused comment lines for the released package.
@WATCHLINE@
###
### watch control file for uscan
###
### See uscan(1) for how to set this file properly
...

I still have not tested your code but made very quick view on it.

I hope my initial response helps you.

Osamu