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

52 lines
1.8 KiB
Bash

# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>
pkgname=fbreader
pkgver=0.10.7
pkgrel=1
pkgdesc="An e-book reader for Linux"
arch=('i686' 'x86_64')
url="http://www.fbreader.org/"
license=('GPL')
depends=(fribidi bzip2 curl gtk2)
source=(http://only.mawhrin.net/fbreader/fbreader-sources-$pkgver.tgz \
http://archlinux-stuff.googlecode.com/files/liblinebreak-20080321.tar.gz)
md5sums=('145f4d2ba24c54288bad2d66ddd2baf2'
'adec1484446029222dcedcd12f7e635e')
build() {
cd $startdir/src/liblinebreak-20080321
make CFLAGS=-fPIC || return 1
export CPPFLAGS="-I/usr/include/cairo"
export TARGET_ARCH=desktop
export UI_TYPE=gtk
export TARGET_STATUS=release
cd $startdir/src/fbreader-$pkgver
patch -p0 makefiles/config.mk <<EOF
diff -wbBur fbreader-0.8.17/makefiles/config.mk fbreader-0.8.17.my/makefiles/config.mk
--- fbreader-0.8.17/makefiles/config.mk 2008-03-22 16:00:31.000000000 +0300
+++ fbreader-0.8.17.my/makefiles/config.mk 2008-03-24 21:01:30.000000000 +0300
@@ -12,11 +12,13 @@
SHAREDIR ?= \$(INSTALLDIR)/share
BASEDIR ?= \$(SHAREDIR)
-CFLAGS += -DINSTALLDIR=\"\$(INSTALLDIR)\" -DBASEDIR=\"\$(BASEDIR)\" -DLIBDIR=\"\$(LIBDIR)\" -DIMAGEDIR=\"\$(IMAGEDIR)\" -DAPPIMAGEDIR=\"\$(APPIMAGEDIR)\" -DVERSION=\"\$(VERSION)\"
+CFLAGS += -I$startdir/src/liblinebreak-20080321 -DINSTALLDIR=\"\$(INSTALLDIR)\" -DBASEDIR=\"\$(BASEDIR)\" -DLIBDIR=\"\$(LIBDIR)\" -DIMAGEDIR=\"\$(IMAGEDIR)\" -DAPPIMAGEDIR=\"\$(APPIMAGEDIR)\" -DVERSION=\"\$(VERSION)\"
ifeq "\$(ZLSHARED)" "yes"
CFLAGS += -fPIC -DZLSHARED
endif
+LDFLAGS += -L$startdir/src/liblinebreak-20080321/DebugDir
+
ifeq "\$(TARGET_STATUS)" "release"
CFLAGS += -O3
LDFLAGS += -s
EOF
make INSTALLDIR=/usr || return 1
make INSTALLDIR=/usr DESTDIR=$startdir/pkg install
}