You are not logged in.

#1 2005-09-11 15:35:28

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Package requiring certain perl modules

I just recently installed UT on my system, and found that the sourceforge project UmodPack is probably the best way to get Umod files installed. Since I'm taking an interest in making packages of software I install if I can't find it in the repos, I wanted to package this up, maybe submit it to AUR too.  However, the install requires certain perl modules to be installed from CPAN.

From the INSTALL file:

UmodPack requires/makes use of:
* Perl 5 (required)
* Tie::IxHash (required, for .ini file access)
* Archive::Zip and Compress::Zlib (required, for zip file support)
* Perl/Tk (optional, for the GUI)

UNIX
----
[...]

To install Perl/Tk first use "perl -MCPAN -e shell" to get into the CPAN
shell;  and then enter "install Tie::IxHash", "install Data::Dumper",
"install Compress::Zlib", "install Archive::Zip" and then "install Tk".

To install UmodPack change to the directory in which the distribution
files are unpacked.  Type "perl Makefile.PL" and then "make install".

I am not sure how to automate this installation of perl modules within a PKGBUILD.  Does anyone have an idea as to how I would accomplish it?

Offline

#2 2005-09-11 19:16:53

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Package requiring certain perl modules

You should do one PKGBUILD for each perl module (that's how I would do it).  Just put the needed commands in the build function.

Offline

#3 2005-09-19 06:21:19

FJ
Member
From: Ontario, Canada
Registered: 2005-03-17
Posts: 75
Website

Re: Package requiring certain perl modules

For all of the perl modules I need to install, this was sufficient to put in the build{}:

perl Makefile.PL
  make || return 1
  make PREFIX=$startdir/pkg/usr SITEPREFIX=$startdir/pkg/usr install

An example PKGBUILD:

pkgname=perl-term-animation
pkgver=2.1
pkgrel=1
pkgdesc="Module that provides a framework to produce sprite animations using ASCII art."
url="http://search.cpan.org/~kbaucom/Term-Animation-$pkgver/lib/Term/Animation.pm"
depends=('perl-curses')
source="http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-$pkgver.tar.gz"
md5sums=('8bfb8225be9318f95e0b1e1718da9691')

build() {
  cd $startdir/src/Term-Animation-$pkgver
  perl Makefile.PL
  make || return 1
  make PREFIX=$startdir/pkg/usr SITEPREFIX=$startdir/pkg/usr install
}

Offline

Board footer

Powered by FluxBB