1 %bcond_with system_qcommandline
2 Summary: Headless WebKit with a JavaScript API
7 Group: Applications/Networking
8 Source0: https://bitbucket.org/ariya/phantomjs/downloads/%{name}-%{version}-source.zip
9 # Source0-md5: feabe9064100e241d21347739312e64d
10 Patch0: phantomjs-qt.patch
11 Patch1: phantomjs-env.patch
13 Patch3: 0003-unbundle-mongoose.patch
14 Patch4: phantomjs-disable-breakpad.patch
15 Patch5: 0005-unbundle-qt.patch
16 Patch6: 0006-unbundle-linenoise.patch
17 Patch7: 0007-unbundle-QCommandLine.patch
18 URL: http://phantomjs.org/
19 BuildRequires: Qt5WebKit-devel
20 BuildRequires: Qt5PrintSupport-devel
21 BuildRequires: coffee-script
22 BuildRequires: giflib-devel
23 BuildRequires: linenoise-devel
24 BuildRequires: mongoose-devel
25 %{?with_system_qcommandline:BuildRequires: qcommandline-devel}
27 Requires: coffee-script
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 PhantomJS is a headless WebKit with JavaScript API. It has fast and
32 native support for various web standards: DOM handling, CSS selector,
33 JSON, Canvas, and SVG. It can be used for screen scraping and web
34 testing. It includes an implementation of the WebDriver API.
39 # remove bundled sources
43 %{?with_system_qcommandline:rm -r src/qcommandline}
53 %{?with_system_qcommandline:%patch7 -p1}
59 CXXFLAGS="%{rpmcxxflags} -fPIC"
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT%{_bindir}
64 install -p bin/phantomjs $RPM_BUILD_ROOT%{_bindir}
66 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
67 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
70 rm -rf $RPM_BUILD_ROOT
73 %defattr(644,root,root,755)
74 %doc README.md LICENSE.BSD CONTRIBUTING.md ChangeLog
75 %attr(755,root,root) %{_bindir}/%{name}
76 %{_examplesdir}/%{name}-%{version}