summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJonathas2015-06-09 23:09:59 -0300
committerJonathas2015-06-09 23:09:59 -0300
commit89f2d35e4b9d8a8c468c0385060539dee05d8311 (patch)
treee17419b813688450dad372f087d950e73c250e50 /PKGBUILD
downloadaur-89f2d35e4b9d8a8c468c0385060539dee05d8311.tar.gz
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD55
1 files changed, 55 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..73fdf9c11129
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Jon Ribeiro <contact@jonathas.com>
+pkgname=perl-class-adapter
+_realname=Class-Adapter
+pkgver=1.08
+pkgrel=1
+pkgdesc="Perl implementation of the \"Adapter\" Design Pattern"
+arch=(i686 x86_64)
+license=('perl')
+url="http://search.cpan.org/~adamk/Class-Adapter"
+options=(!emptydirs)
+
+depends=('perl>=5.10.1')
+makedepends=('perl')
+
+#provides=('Class-Adapter')
+provides=('class-adapter=1.08' 'Class::Adapter::Clear=1.08' 'perl-class-adapter-clear=1.08' 'Class::Adapter=1.08' 'perl-class-adapter=1.08' 'Class::Adapter::Builder=1.08' 'perl-class-adapter-builder=1.08')
+
+source=('http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Class-Adapter-1.08.tar.gz')
+md5sums=('4a1dbb281eac71f666d2eeccf4cc8b99')
+
+package() {
+ _expected_dir="${srcdir}/${_realname}-${pkgver}"
+ if [ -d "$_expected_dir" ]; then
+ cd "$_expected_dir"
+ else
+ _expected_dir="${srcdir}/$(bsdtar -t -f $(basename $source) | head -n1)"
+ if [ -d "$_expected_dir" ]; then
+ cd "$_expected_dir"
+ else
+ _makefile=$(find $srcdir -iname Makefile.PL)
+ if [ ! -z "$_makefile" ]; then
+ _expected_dir=$(dirname $_makefile)
+ if [ -d "$_expected_dir" ]; then
+ cd "$_expected_dir"
+ else
+ echo "ERROR unable to detect source directory"
+ echo "--> this is often due to CPAN's lack of standard naming conventions"
+ echo "--> it may be possible to fix this by adjusting the build function in the PKGBUILD"
+ fi
+ fi
+ fi
+ fi
+ # install module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+ make install DESTDIR=${pkgdir} || return 1
+
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+}
+
+# vim:set ts=2 sw=2 et:
+
+