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

Re: Source with different examples directories



On Mon, Nov 22, 2021 at 09:05:02AM +0800, Paul Wise wrote:
> On Sun, 2021-11-21 at 21:22 +0100, Marc Haber wrote:
> 
> > Is there a less ugly way?
> 
> Send upstream a patch to create a directory structure like this:
> 
> src/
>   examples/
>      c/
>      c++/

I would find that inappropriate. In the structure of upstream's code,
the examples split does totally make sense, they have also split their C
and c++ bindings into two subdirectories.

I am reluctant to ask upstream to change their structure because of a
shortcoming in our tools. I will file a wishlist bug against debhelper
to support a target directory for lines in foo.examples.

> If you're only after workarounds, there are two options:
> 
> Run dh_installexamples twice. First install the C++ examples, then
> mkdir c++, then mv * c++, then install the C examples.

That won't work with the foo.examples file approach. But I might not be
awake yet.

> Read the dh_installexamples code and adapt the `cd && find | sort |
> xargs cp` command that dh_installexamples is just a wrapper for.

That's the "install manually" approach. I will probably do that in my
package.

Thanks for helping!

Greetings
Marc


-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421


Reply to: