summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ff7922d522c2ccda1e8851bc6a228c0f3502c198 (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
55
56
57
58
59
60
61
62
63
# Maintainer: jason ryan <jasonwryan@gmail.com>
# Contributor: Andreas Wagner <Andreas dot Wagner at em dot uni-frankfurt dot de>
# Contributor: Giorgio Lando <patroclo7@gmail.com>

pkgname=muttprint
pkgver=0.73_4
_mainver=0.73
pkgrel=6
arch=("i686" "x86_64")
pkgdesc="An app to print email from CLI mail clients, mutt in particular"
license=("GPL")
arch=("i686" "x86_64")
depends=('texlive-latexextra' 'perl-timedate' 'perl-file-which' 'perl-text-iconv' 'psutils' 'dialog')
optdepends=('texlive-fontsextra:         Adds the CMBright font')
makedepends=('imagemagick')
url="http://muttprint.sf.net"
backup=('etc/Muttprintrc')
source=(http://downloads.sf.net/$pkgname/$pkgname-$_mainver.tar.gz
        'muttprint_0.73-4.diff' 'regex.patch' 'two_edge.patch')
md5sums=('39b76058b838e3078df93236eda2c316'
         '4a97e45b6df024272a8683403c9b73e6'
         '3e338bb7dbe33401e59dc53ca830508d'
         '11846b8ebfba2b784ae64fb32abb7cfd')

prepare(){
   cd $pkgname-$_mainver
   patch -p1 < ../muttprint_0.73-4.diff
   patch -p1 < ../regex.patch
   patch -p1 < ../two_edge.patch
   # fix sample configs
   find . -type f -name 'sample*' -exec sed -i 's/-P$PRINTER/-p$PRINTER/' {} \;
   # convert images (and make pics/ build work)
   cd pics/ && \
     convert -flop BabyTuX.eps BabyTuX.eps
     for i in BabyTuX_color.eps BabyTuX.eps Debian_color.eps Debian.eps \
       Gentoo.eps Gentoo_color.eps ; do \
       convert $i $(basename $i .eps).png; \
     done && \
     convert penguin.eps penguin.jpg
}

build() {
   cd $pkgname-$_mainver

   aclocal
   automake --add-missing --copy
   autoconf
   ./configure --prefix=/usr
   make PREFIX=/usr
}

package() {
   cd $pkgname-$_mainver
   make PREFIX=/usr DESTDIR=$pkgdir install
   for i in README* CREDITS ChangeLog CHANGES AUTHORS ; do \
     install -m644 $i $pkgdir/usr/share/doc/muttprint/$i ; \
   done

   mkdir -p $pkgdir/etc
   install -m644 sample-muttprintrc-en 	 $pkgdir/etc/Muttprintrc
}

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