Problems making a Perl/Tk package.
I finally decided to try making a package, and the one I was going to
play around with was Perl/Tk. For those of you who don't know, it's a
perl module that allows you to use Tk directly from perl (bypassing
Tcl altogether). I've had some problems though, and I thought I'd
solicit opinions.
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?
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 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?
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?
Thanks
--
Rob
Reply to: