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

Re: Problems making a Perl/Tk package.



osiris@cs.utexas.edu writes ("Problems making a Perl/Tk package."):
...
> First of all, there's a naming issue.  If you look on CPAN
> (Comprehensive Perl Archive Network), the Perl/Tk distribution is just
> named Tk-b9.01.tar.gz.  This is obviously a bad name since it looks
> like you mean Tk, not a perl module providing Tk to perl.  So I was
> going to name the debian package perl-tk.  In that case should the
> debian source file untar to a directory named Tk-version or one named
> perl-tk-version?

perl-tk-version.

> Next problem.  To build a perl module you normally build the
> Makefile(s) by calling perl on a Makefile.PL file.  The Makefile.PL
> file is parsed by the perl module MakeMaker which does some kind of
> black magic to determine where to install the files, but you can
> specify a PREFIX definition like this: "perl Makefile.PL PREFIX=/usr".
> 
> The first of two make problems surfaces here.  With the command above,
> the Makefiles will be set up so that most of the files will actually
> be installed in /usr/local/lib/site_perl/...  Only the man pages and a
> few binaries (demos etc.) will be installed in /usr.  In other words
> they insist that most of the files go in a local/lib/site_perl subdir
> of PREFIX.  I would assume (but I don't know) that other perl modules
> will behave similarly; it seems to be a perl convention.  If so, how
> should we handle this?

The Makefile.PL or the MakeMaker module or whatever it is that's
making the path contain /usr/local/lib rather than using /usr/lib
needs to be fixed.  I don't know whether this is in the Perl code
itself or in the module, but it's broken IMO.

> The second make problem is that when you try to install to debian-tmp
> by using "make PREFIX=debian-tmp/usr install" you will get garbage
> because the path name is relative and the make process descends into a
> ./blib tree to copy the files that have been built.  You can fix this
> by using an absolute path in debian.rules like "make
> PREFIX=`pwd`/debian-tmp/usr install".  Is that OK?

Yes, that's OK.

> Finally, the last part of a perl module install normally appends some
> information to /usr/lib/perl5/i486-linux/5.002/perllocal.pod.  How
> should this be handled, and how could I make it work right given
> repeated installs of this package and perhaps other perl modules that
> append to this same file?

The Perl package(s) need to provide a program to manipulate this .pod
file.  Is it in a difficult format ?

Ian.



Reply to: