summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 827786d242768407526d1c4d27df57f18a7da88f (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
43
44
45
46
# Maintainer: Damien Molinier <damien-43\N{COMMERCIAL AT}gmx.fr>

_distname='CBOR-XS'

pkgname=perl-cbor-xs
pkgver=1.7
pkgrel=1
pkgdesc='Concise Binary Object Representation'
arch=('x86_64' 'i686')
license=('GPL')
options=('!emptydirs')
depends=('perl' 'perl-types-serialiser' 'perl-common-sense')
url="https://metacpan.org/release/${_distname}"
source=("https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/${_distname}-${pkgver}.tar.gz"
        "kill-canary.patch")
sha512sums=('13f5a0db0e983929fe7a670caf23ef130ed18f1974cf471d77d20e9e5d78c8afcad9a3440f198906d8e30625da7f8cb1d3a8919fd896442101f3865f0af5614c'
            '930bea1d5cfad6bfdf09db9a6532ce4eb584adda3182d34d00f547bc918a0c9eb7cefbd2ace5a8eb7acda9275f4143961b0581747d6cc795988891e99c638ead')

prepare() {
  cd "${srcdir}/${_distname}-${pkgver}"
  patch -p1 < "${srcdir}/kill-canary.patch"
}

build() {
  cd "${srcdir}/${_distname}-${pkgver}"
  unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT='1' PERL_AUTOINSTALL='--skipdeps'
  perl Makefile.PL INSTALLDIRS='vendor'
  make
}

check() {
  cd "${srcdir}/${_distname}-${pkgver}"
  unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1
  make test
}

package() {
  cd "${srcdir}/${_distname}-${pkgver}"
  unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
  make install DESTDIR="${pkgdir}"
  find "${pkgdir}" \( -name .packlist -or -name perllocal.pod \) -delete
}

# vim:set ts=2 sw=2 et: