Re: Source with different examples directories

2021-11-22 Thread wferi
Marc Haber  writes:

> I have a package which source tarball containst two examples
> directories:
>
> src/examples
> src/c++/examples
>
> Since both directories contain a Makefile, I would like to install
> src/examples to /usr/share/doc/package/examples and src/c++/examples to
> /usr/share/doc/package/examples/c++.
>
> This seems to be beyond dh_installexamples' capabilities.
>
> What would you suggest? I could override dh_auto_installexamples (does
> that one exist?), using dh_installexamples to install
> src/examples to /usr/share/doc/package/examples and then manually copy
> src/c++/examples to /usr/share/doc/package/examples/c++
>
> Is there a less ugly way?

Hi,

I'd use plain dh_install, maybe even for the part dh_installexamples
gets right (for symmetry), and skip dh_installexamples.
-- 
Regards,
Feri



Re: Source with different examples directories

2021-11-21 Thread Marc Haber
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



Re: Source with different examples directories

2021-11-21 Thread Paul Wise
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++/

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.

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

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part


Source with different examples directories

2021-11-21 Thread Marc Haber
Hi,

I have a package which source tarball containst two examples
directories:

src/examples
src/c++/examples

Since both directories contain a Makefile, I would like to install
src/examples to /usr/share/doc/package/examples and src/c++/examples to
/usr/share/doc/package/examples/c++.

This seems to be beyond dh_installexamples' capabilities.

What would you suggest? I could override dh_auto_installexamples (does
that one exist?), using dh_installexamples to install
src/examples to /usr/share/doc/package/examples and then manually copy
src/c++/examples to /usr/share/doc/package/examples/c++

Is there a less ugly way?

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