summaryrefslogtreecommitdiff
path: root/pcr/mhonarc/PKGBUILD
blob: 1753b66f5599b22a6af522bb2277c92554367cb6 (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
47
48
49
50
51
52
53
54
# Maintainer (AUR): Chris Severance aur.severach AatT spamgourmet.com
# Contributor (AUR): Abhishek Dasgupta <abhidg@gmail.com>
# Contributor (AUR): Billy Congo <billycongo@gmail.com>
# Contributor (AUR): froggie <sullivanva@gmail.com>
# Contributor (AUR): Lukas Martini <hello@lutoma.org>

# paraboal changes and rationale:
#  - removed superfluous set -u

_pkgnameu='MHonArc'
pkgname="${_pkgnameu,,}"
pkgver='2.6.19'
pkgrel='2'
pkgdesc="a Perl mail-to-HTML converter"
arch=('any')
url='http://www.mhonarc.org/'
license=('GPL')
depends=('perl>=5.6.1')
optdepends=(
  'perl-digest-perl-md5: creating IDs for messages without message-ids.'
  'perl-file-temp: more secure temp file management'
  'perl-mime-base64: efficient base64 decoding'
  'perl-posix-strftime-compiler: improved time string formatting'
)
_verwatch=("${url}release/${_pkgnameu}/tar/" "${_pkgnameu}-\([^-]*\)\.tar\.bz2" 'l')
source=("${_verwatch[0]}${_pkgnameu}-${pkgver}.tar.bz2"
  'Debian_816638.diff::https://bugs.debian.org/cgi-bin/bugreport.cgi?filename=816638.diff;att=1;msg=17;bug=816638') # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=816638#17

sha256sums=('08912eae8323997b940b94817c83149d2ee3ed11d44f29b3ef4ed2a39de7f480'
            '76b1c608a971bd090a3a0eb60ff98f40a141fb7535763dde55c714b92f183eb6')

prepare() {
  set -u
  cd "MHonArc-${pkgver}"
  patch -f -p1 < "${srcdir}/Debian_816638.diff" || :
  PERL_MM_USE_DEFAULT=1 perl 'Makefile.PL' INSTALLDIRS='vendor' PREFIX="${pkgdir}/usr/"
  set +u
}

build() {
  cd "MHonArc-${pkgver}"
  make
}

package() {
  cd "MHonArc-${pkgver}"
  make install

  # move /usr/doc to /usr/share/doc for FHS-compliance. 
  mv "${pkgdir}/usr/doc" "${pkgdir}/usr/share/"
  # remove perllocal.pod and .packlist (these don't seem to exist any more)
  find "${pkgdir}" -name 'perllocal.pod' -delete
  find "${pkgdir}" -name '.packlist' -delete
}