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

Re: Editing #!/usr/local/bin/perl lines in demos in new package.



> As I've mentioned, I'm putting together a new package for a perl
> module, and it has a couple of executables.  Unfortunately they're
> perl scripts that start out #!/usr/local/bin/perl.  Should I try and
> go through all the places in the source that do this and change them
> to #!/usr/bin/perl, or is this common enough that we might want to
> have a symbolic link?

I've taken to having "debian.rules" run some standard 'sed' scripts over
the files that get put into "debian-tmp".  These tend to change references
to "/usr/local" to just "/usr", but also do some other housekeeping.  Doing
this after the install but before building the package also means that I
don't need to modify any of the original files.  Here is an example from
the "cfengine" package...

    cd debian-tmp$(PREFIX)/lib/cfengine/bin; for file in * ; do \
            mv $$file /tmp ;\
            sed </tmp/$$file >$$file \
                    -e "s|/local/gnu/lib/cfengine|$(PREFIX)/lib/cfengine|g" \
                    -e "s|/iu/nexus|...wherever...|g" \
                    -e "s|/local/gnu/bin|/bin|g" \
                    -e "s|/usr/lib/cfengine/inputs|/etc|g" ;\
            rm -f /tmp/$$file ;\
    done

I also apply similar things to man pages and the like.

                                        Brian
                               ( bcwhite@verisim.com )

-------------------------------------------------------------------------------
    In theory, theory and practice are the same.  In practice, they're not.



Reply to: