Re: dh_install by file suffix

2023-07-17 Thread Ole Streicher

Hi Niels,

On 16.07.23 09:32, Niels Thykier wrote:
The "iraf" source package needs to divide these files into user 
related files (for the "iraf" and "iraf-noao" packages) and 
development related files (for "iraf-dev" and "iraf-noao-dev"). The 
problem is now, that the division is (mainly) by extension:

[...]
Alternatively, you can just make the .install executable in general and 
have it output what you want. That option also works.


I think this is the best solution; what I will do is and executable

- debian/iraf.install -
#!/bin/sh

cat <

Re: dh_install by file suffix

2023-07-16 Thread Andreas Metzler
On 2023-07-15 Ole Streicher  wrote:
> Hi,

> I am upgrading one of my packages (iraf) to a new version. The new version
> comes with a "make install", which installs everything under /usr/lib/iraf/
> (and some other places).

> The "iraf" source package needs to divide these files into user related
> files (for the "iraf" and "iraf-noao" packages) and development related
> files (for "iraf-dev" and "iraf-noao-dev"). The problem is now, that the
> division is (mainly) by extension:

> - *.cl, *.hd, *.men, *.par (... and some other extensions) should go to
>   the user packages

> - *.a, *.h should go to the development packages

> (the "iraf" and "iraf-noao" package differ mainly by that "iraf" collects
> them in the pkg/ subdir, and "iraf-noao" in the noao subdir).

> The main question here is: how can I do a dh_install selective by file
> suffix? Otherwise, I would need to list the (~1000) files in the "install"
> files, which is not very robust.

Hello Olaf,

dh_install(1)
  debian/package.install
[...] The format is a set of lines, where each line lists a
file or files to install, and at the end of the line tells the
directory it should be installed in.
[...] You may use wildcards in the names of the files to install.

debian/tmp/usr/lib/iraf/*.cl /targetdirfor_cl/

cu Andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'



Re: dh_install by file suffix

2023-07-16 Thread Niels Thykier

Ole Streicher:

Hi again,

I think youe way could be to put the file list into a variable in 
d/rules, and expand the list the .install, like:


-- debian/iraf.install -
etc/iraf/
usr/lib/iraf/bin/ecl.e
[... other fixed content]
${env:IRAF_FILES}
8<--

--- debian/rules ---

override_dh_install:
 IRAF_FILES=$$(cd debian/tmp; \
     find usr/lib/iraf/pkg usr/lib/iraf/unix/hlib \
  -name \*.hlp \
   -o -name \*.hd \
   [...] \
   -o -name \*.fits) \
     dh_install

8<--

where the same procedure however would required for all four binary 
packages. This does not look very nice, and also according to the 
debhelper manpage, one can only expand to 4096 chars (I'd need ~40,000).


Any better idea?

Best

Ole


On 15.07.23 21:01, Ole Streicher wrote:

Hi,

I am upgrading one of my packages (iraf) to a new version. The new 
version comes with a "make install", which installs everything under 
/usr/lib/iraf/ (and some other places).


The "iraf" source package needs to divide these files into user 
related files (for the "iraf" and "iraf-noao" packages) and 
development related files (for "iraf-dev" and "iraf-noao-dev"). The 
problem is now, that the division is (mainly) by extension:


- *.cl, *.hd, *.men, *.par (... and some other extensions) should go to
   the user packages

- *.a, *.h should go to the development packages

(the "iraf" and "iraf-noao" package differ mainly by that "iraf" 
collects them in the pkg/ subdir, and "iraf-noao" in the noao subdir).


The main question here is: how can I do a dh_install selective by file 
suffix? Otherwise, I would need to list the (~1000) files in the 
"install" files, which is not very robust.


Cheers

Ole




Hi,

This would also not work as substitution is applied /after/ "word 
splitting". That is ${env:IRAF_FILES} would be treated as a single file 
(with a lot of spaces) even if you could do the expansion.


The order is deliberate as it is the way debhelper supports files with 
spaces (by using substitution variables to introduce them post split).


However, using dh-exec (as proposed elsewhere) might be an option as 
then the substitution happens before the split and dh-exec does not have 
the substitution limit either. I believe you can make dh-exec env 
variables as well. However, it has a different syntax then debhelper.


Alternatively, you can just make the .install executable in general and 
have it output what you want. That option also works.


Best regards,
Niels



Re: dh_install by file suffix

2023-07-15 Thread Andrey Rakhmatullin
On Sat, Jul 15, 2023 at 09:01:19PM +0200, Ole Streicher wrote:
> Hi,
> 
> I am upgrading one of my packages (iraf) to a new version. The new version
> comes with a "make install", which installs everything under /usr/lib/iraf/
> (and some other places).
> 
> The "iraf" source package needs to divide these files into user related
> files (for the "iraf" and "iraf-noao" packages) and development related
> files (for "iraf-dev" and "iraf-noao-dev"). The problem is now, that the
> division is (mainly) by extension:
> 
> - *.cl, *.hd, *.men, *.par (... and some other extensions) should go to
>   the user packages
> 
> - *.a, *.h should go to the development packages
> 
> (the "iraf" and "iraf-noao" package differ mainly by that "iraf" collects
> them in the pkg/ subdir, and "iraf-noao" in the noao subdir).
> 
> The main question here is: how can I do a dh_install selective by file
> suffix? Otherwise, I would need to list the (~1000) files in the "install"
> files, which is not very robust.
You can always skip dh_install and do manual cp/mv/install/whatever
commands in override_dh_install.
Or you could probably use dh-exec.



Re: dh_install by file suffix

2023-07-15 Thread Ole Streicher

Hi again,

I think youe way could be to put the file list into a variable in 
d/rules, and expand the list the .install, like:


-- debian/iraf.install -
etc/iraf/
usr/lib/iraf/bin/ecl.e
[... other fixed content]
${env:IRAF_FILES}
8<--

--- debian/rules ---

override_dh_install:
IRAF_FILES=$$(cd debian/tmp; \
find usr/lib/iraf/pkg usr/lib/iraf/unix/hlib \
 -name \*.hlp \
  -o -name \*.hd \
  [...] \
  -o -name \*.fits) \
dh_install

8<--

where the same procedure however would required for all four binary 
packages. This does not look very nice, and also according to the 
debhelper manpage, one can only expand to 4096 chars (I'd need ~40,000).


Any better idea?

Best

Ole


On 15.07.23 21:01, Ole Streicher wrote:

Hi,

I am upgrading one of my packages (iraf) to a new version. The new 
version comes with a "make install", which installs everything under 
/usr/lib/iraf/ (and some other places).


The "iraf" source package needs to divide these files into user related 
files (for the "iraf" and "iraf-noao" packages) and development related 
files (for "iraf-dev" and "iraf-noao-dev"). The problem is now, that the 
division is (mainly) by extension:


- *.cl, *.hd, *.men, *.par (... and some other extensions) should go to
   the user packages

- *.a, *.h should go to the development packages

(the "iraf" and "iraf-noao" package differ mainly by that "iraf" 
collects them in the pkg/ subdir, and "iraf-noao" in the noao subdir).


The main question here is: how can I do a dh_install selective by file 
suffix? Otherwise, I would need to list the (~1000) files in the 
"install" files, which is not very robust.


Cheers

Ole




dh_install by file suffix

2023-07-15 Thread Ole Streicher

Hi,

I am upgrading one of my packages (iraf) to a new version. The new 
version comes with a "make install", which installs everything under 
/usr/lib/iraf/ (and some other places).


The "iraf" source package needs to divide these files into user related 
files (for the "iraf" and "iraf-noao" packages) and development related 
files (for "iraf-dev" and "iraf-noao-dev"). The problem is now, that the 
division is (mainly) by extension:


- *.cl, *.hd, *.men, *.par (... and some other extensions) should go to
  the user packages

- *.a, *.h should go to the development packages

(the "iraf" and "iraf-noao" package differ mainly by that "iraf" 
collects them in the pkg/ subdir, and "iraf-noao" in the noao subdir).


The main question here is: how can I do a dh_install selective by file 
suffix? Otherwise, I would need to list the (~1000) files in the 
"install" files, which is not very robust.


Cheers

Ole