PKGBUILDs/community/xloadimage/PKGBUILD
2009-10-09 21:15:33 -05:00

45 lines
1.8 KiB
Bash

# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Eric Belanger <belanger@astro.umontreal.ca>
# Contributor: Link Dupont <link@subpop.net>
pkgname=xloadimage
pkgver=4.1
pkgrel=7
pkgdesc="An utility to view many different types of images under X11"
arch=(i686 x86_64)
url="http://world.std.com/~jimf/xloadimage.html"
license=("MIT")
depends=('libtiff' 'libpng' 'libx11')
makedepends=('patch')
source=(ftp://ftp.x.org/R5contrib/$pkgname.$pkgver.tar.gz \
http://archlinux-stuff.googlecode.com/files/xloadimage-$pkgver-gentoo.diff.bz2 \
$pkgname-$pkgver-include-errno_h.patch \
license.txt)
md5sums=('7331850fc04056ab8ae6b5725d1fb3d2'
'8f5cc72c54ea730ba99026f006e71e10'
'c411c977cc7ae79dd96aad933980dbb2'
'cc16a51aeb5083b8ff07939dfe244130')
build() {
cd $startdir/src/$pkgname.$pkgver
patch -p1 < $startdir/src/$pkgname-$pkgver-gentoo.diff || return 1
patch -p1 < $startdir/src/$pkgname-$pkgver-include-errno_h.patch || return 1
sed -i "s:OPT_FLAGS=:OPT_FLAGS=$CFLAGS:" Make.conf
sed -i "s:^#include <varargs.h>:#include <stdarg.h>:" rlelib.c
chmod +x configure
./configure --prefix=/usr || return 1
make || return 1
install -D -m755 xloadimage $startdir/pkg/usr/bin/xloadimage && \
install -D -m755 uufilter $startdir/pkg/usr/bin/uufilter && \
install -D -m644 xloadimagerc $startdir/pkg/etc/xloadimagerc.example && \
install -D -m644 xloadimage.man $startdir/pkg/usr/man/man1/xloadimage.1x && \
install -D -m644 uufilter.man $startdir/pkg/usr/man/man1/uufilter.1x && \
install -D -m644 $startdir/src/license.txt $startdir/pkg/usr/share/licenses/$pkgname/license.txt && \
ln -s /usr/bin/xloadimage $startdir/pkg/usr/bin/xsetbg || return 1
mv $startdir/pkg/usr/man $startdir/pkg/usr/share/
}