• Source with different examples directories

    From Marc Haber@21:1/5 to All on Sun Nov 21 21:30:02 2021
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Wise@21:1/5 to Marc Haber on Mon Nov 22 02:10:02 2021
    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

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEYQsotVz8/kXqG1Y7MRa6Xp/6aaMFAmGa7LoACgkQMRa6Xp/6 aaOnzw/7BG+rMVcwykWHYWY5UKBWXTDmXoRJTC1K5LtIK6oRr+NkJoAS1U+qLr4N fFYwXtBD/CRBM5rn5+1cxm5BSyGcExS0mzlGhxysoS9uHCtiTwAzLm/JTd74B72a xYTvmj1lajYKkVSf3XEWYLnjDF9QAXNpfaAMKLqAE8LVrDa1QzTaav99egUQ8nYM 9mISGod4vy9f/9/kSgDe4q6iHGojO70rxXGaM5TAun9UGfvQvnY0GjXwvVuNCzwb sGeok/ErDseH/4x/cRb6Hpf2viD45ov6LP8zQ5u4zVOaFM6ZGn1mbYeUbcJJptPU qAnCfdxCMXew6socjN7EPmVWXkE8B/barN/xrjooOiEtRF9otCE1OwQ6iGzE/POs w8FH/YhULMVHDkblTqrx/d+DO9mINtM4uKtywwSZTfA/EU4NB+n0CYDJjqu/ybFI vpoqFaVfqudKTNm5uAJlfPx36Ut2EUe2Fahp60WbTQD094US1Gxcuk8szLuRaoYZ brXCLFK9sLlYaTYNd2CVDE8Ns9ME+1++9aBZJ53oGq3s6mxd7IEFvXo2QKjGR5GC 67WUDfbOzajSqWUk3ABej4YtkRvl9GLHYoamVXgl7G2PddnBg11mJsuOetiuKUnG QqwTN9ehNItQOdHpKSCpP82gb2Ak/gVqWzSBnJDNFffaSfX/Gvs=
    =rcvb
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Paul Wise on Mon Nov 22 06:40:02 2021
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wferi@niif.hu@21:1/5 to Marc Haber on Mon Nov 22 16:00:02 2021
    Marc Haber <mh+debian-mentors@zugschlus.de> 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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)