summaryrefslogtreecommitdiff
path: root/extra/manedit/PKGBUILD
blob: 684357eeaeb0e3be1ec94a890ab06f252ffe10fc (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
# $Id: PKGBUILD 143901 2011-11-30 20:13:10Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=manedit
pkgver=1.2.1
pkgrel=4
pkgdesc="An editor specifically tailored for UNIX manual pages"
arch=('i686' 'x86_64')
license=('GPL')
url="http://freecode.com/projects/manedit"
depends=('gcc-libs' 'bzip2' 'zlib' 'gtk')
source=("http://wolfsinger.com/~wolfpack/packages/${pkgname}-${pkgver}.tar.bz2"
        'manedit-1.2.1-fix-man-page.patch'
        'manedit.desktop')
md5sums=('a7ee1835e32ed3c9279412af7caf13ef'
         '60cb0c224a6659f8a8183006608f368b'
         'bac6986fc25dda6f0e27e3673eef4600')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  # Patch to fix generate man page
  patch -Np1 -i ${srcdir}/manedit-1.2.1-fix-man-page.patch

  env CFLAGS="${CFLAGS}" \
  ./configure Linux \
              --prefix=/usr \
              --mandir=/usr/share/man \
              --datadir=/usr/share \
              --enable=bzip2 \
              --enable=zlib \
              --disable="arch-i486" \
              --disable="arch-i586" \
              --disable="arch-i686" \
              --disable="arch-pentiumpro"

  make all
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  # Fix strip error (tries to strip a shell script)
  cp manedit/Makefile.install.UNIX{,.orig}
  sed -e '/INST.*FLAGS.*-s$/s:-s::' \
         manedit/Makefile.install.UNIX.orig > manedit/Makefile.install.UNIX

  # Set man dir too or FHS is violated
  make PREFIX="${pkgdir}/usr" \
       MAN_DIR="${pkgdir}/usr/share/man/man1" \
       ICONS_DIR="${pkgdir}/usr/share/pixmaps" install

  # Install desktop file
  install -Dm644 ${srcdir}/manedit.desktop "${pkgdir}/usr/share/applications/manedit.desktop"
}