summaryrefslogtreecommitdiffstats
path: root/perl/Pkgfile
blob: d37f425254f9fa40ec534a7b90e7a67d11f325eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
description="Perl programming language"
packager="CRUX System Team <core-ports AT crux DOT nu>"
maintainer="Lukc <lukc AT upyum DOT com>"
url="http://www.perl.org/"
depends=(db gdbm)

name=perl
version=5.12.2
release=1
source=(http://www.cpan.org/src/5.0/$name-$version.tar.bz2)
build () 
{ 
	cd $name-$version;
	./Configure -des \
		-Dprefix=$prefix \
		-Dprivlib=$libdir/perl5/${version%.*} \
		-Dsitelib=$libdir/perl5/site_perl/${version%.*} \
		-Darchname=linux \
		-Dman1ext=1pm \
		-Dman3ext=3pm \
		-Dman1dir=$mandir/man1 \
		-Dman3dir=$mandir/man3 \
		-Di_gdbm -Di_db -Duseshrplib -Dusethreads \
		-Doptimize="$CFLAGS";
	make;
	make DESTDIR=$PKG install;
	ln -sf perl$version $PKG$bindir/perl;
	ln -sf c2ph $PKG$bindir/pstruct;
	ln -sf s2p $PKG$bindir/psed;
	ln -sf c2ph.1pm $PKG$mandir/man1/pstruct.1pm;
	ln -sf s2p.1pm $PKG$mandir/man1/psed.1pm;
	find $PKG \
		-iname 'TODO*' \
		-or -iname 'Change*' \
		-or -iname 'README*' \
		-or -name '*.bs' \
		-or -name '.packlist' \
		-or -name 'perllocal.pod' \
		| xargs rm;
	find $PKG -depth -empty -exec rmdir {} \;;
	chmod -R +w $PKG
}