Name: phantomjs Version: 1.9.7 Release: 1%{?dist} Summary: Headless WebKit with a JavaScript API License: BSD URL: http://phantomjs.org/ Source0: https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-%{version}-source.zip Patch1: 0001-gifwriter-bgcolor-narrowing.patch Patch2: 0002-unbundle-giflib.patch Patch3: 0003-unbundle-mongoose.patch Patch4: 0004-unbundle-breakpad.patch Patch5: 0005-unbundle-qt.patch Patch6: 0006-unbundle-linenoise.patch Patch7: 0007-unbundle-QCommandLine.patch Patch8: 0008-unbundle-coffee-script.patch BuildRequires: giflib-devel BuildRequires: mongoose-devel BuildRequires: qtwebkit-devel BuildRequires: linenoise-devel BuildRequires: qcommandline-devel BuildRequires: coffee-script-common Requires: coffee-script-common %description PhantomJS is a headless WebKit with JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG. It can be used for screen scraping and web testing. It includes an implementation of the WebDriver API. %prep %setup -q # remove bundled sources rm -r src/gif/config.h rm -r src/gif/egif_lib.c rm -r src/gif/gif_err.c rm -r src/gif/gif_hash.c rm -r src/gif/gif_hash.h rm -r src/gif/gif_lib.h rm -r src/gif/gif_lib_private.h rm -r src/gif/gifalloc.c rm -r src/gif/quantize.c rm -r src/mongoose rm -r src/qt rm -r src/linenoise rm -r src/qcommandline rm -r src/coffee-script %patch1 -p1 -b.gifwriter-bgcolor-narrowing %patch2 -p1 -b.giflib %patch3 -p1 -b.mongoose %patch4 -p1 -b.breakpad %patch5 -p1 -b.qt %patch6 -p1 -b.linenoise %patch7 -p1 -b.qcommandline %patch8 -p1 -b.coffee-script %build export CFLAGS="%{optflags}" qmake-qt4 make %{?_smp_mflags} %install mkdir -p %{buildroot}%{_bindir} cp bin/phantomjs %{buildroot}%{_bindir}/ %files %doc README.md LICENSE.BSD CONTRIBUTING.md ChangeLog examples/ %{_bindir}/%{name} %changelog * Sat May 24 2014 Dan Callaghan - 1.9.7-1 - new upstream release 1.9.7 * Thu May 09 2013 Dan Callaghan - 1.9.0-1 - new upstream release 1.9.0 - unbundled linenoise, qcommandline, and coffee-script * Thu Jan 03 2013 Dan Callaghan - 1.8.0-1 - update to final 1.8.0 release * Mon Dec 10 2012 Dan Callaghan - 1.8-0.1.git4c285c4 - initial version