1 Summary: Headless WebKit with a JavaScript API
6 Group: Applications/Networking
7 URL: http://phantomjs.org/
8 Source0: http://phantomjs.googlecode.com/files/%{name}-%{version}-source.zip
9 # Source0-md5: a779eb301cac2df9f366be5b2d17cef7
10 Patch1: 0001-gifwriter-bgcolor-narrowing.patch
11 Patch2: 0002-unbundle-giflib.patch
12 Patch3: 0003-unbundle-mongoose.patch
13 Patch4: 0004-unbundle-breakpad.patch
14 Patch5: 0005-unbundle-qt.patch
15 Patch6: 0006-unbundle-linenoise.patch
16 Patch7: 0007-unbundle-QCommandLine.patch
17 Patch8: 0008-unbundle-coffee-script.patch
18 BuildRequires: QtWebKit-devel
19 BuildRequires: coffee-script
20 BuildRequires: giflib-devel
21 BuildRequires: linenoise-devel
22 BuildRequires: mongoose-devel
23 BuildRequires: qcommandline-devel
25 Requires: coffee-script
28 PhantomJS is a headless WebKit with JavaScript API. It has fast and
29 native support for various web standards: DOM handling, CSS selector,
30 JSON, Canvas, and SVG. It can be used for screen scraping and web
31 testing. It includes an implementation of the WebDriver API.
36 # remove bundled sources
37 rm -r src/gif/config.h
38 rm -r src/gif/egif_lib.c
39 rm -r src/gif/gif_err.c
40 rm -r src/gif/gif_hash.c
41 rm -r src/gif/gif_hash.h
42 rm -r src/gif/gif_lib.h
43 rm -r src/gif/gif_lib_private.h
44 rm -r src/gif/gifalloc.c
45 rm -r src/gif/quantize.c
49 rm -r src/qcommandline
50 rm -r src/coffee-script
52 %patch1 -p1 -b.gifwriter-bgcolor-narrowing
54 %patch3 -p1 -b.mongoose
55 %patch4 -p1 -b.breakpad
57 %patch6 -p1 -b.linenoise
58 %patch7 -p1 -b.qcommandline
59 %patch8 -p1 -b.coffee-script
62 export CFLAGS="%{rpmcflags}"
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT%{_bindir}
70 cp bin/phantomjs $RPM_BUILD_ROOT%{_bindir}/
73 rm -rf $RPM_BUILD_ROOT
76 %defattr(644,root,root,755)
77 %doc README.md LICENSE.BSD CONTRIBUTING.md ChangeLog examples/
78 %attr(755,root,root) %{_bindir}/%{name}