summaryrefslogtreecommitdiff
path: root/extra/manedit/PKGBUILD
blob: 194b4d474bffd02c37b5a1d51c01d2bf896ba3b1 (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
# $Id: PKGBUILD 59169 2009-11-20 17:44:19Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=manedit
pkgver=1.2.1
pkgrel=3
pkgdesc="An editor specifically tailored for UNIX manual pages"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL')
url="http://www.battlefieldlinux.com/wolfpack/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 || return 1

  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 || return 1

  # 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 || return 1

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