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: %{name}-qt.patch
11 Patch1: %{name}-env.patch
12 Patch3: 0003-unbundle-mongoose.patch
13 Patch4: %{name}-disable-breakpad.patch
14 Patch5: 0005-unbundle-qt.patch
15 Patch6: 0006-unbundle-linenoise.patch
16 Patch7: 0007-unbundle-QCommandLine.patch
17 URL: http://phantomjs.org/
18 BuildRequires: Qt5PrintSupport-devel
19 BuildRequires: Qt5WebKit-devel
20 BuildRequires: coffee-script
21 BuildRequires: giflib-devel
22 BuildRequires: linenoise-devel
23 BuildRequires: mongoose-devel
24 %{?with_system_qcommandline:BuildRequires: qcommandline-devel}
26 Requires: Qt5Gui-platform-xcb
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}
52 %{?with_system_qcommandline:%patch7 -p1}
58 CXXFLAGS="%{rpmcxxflags} -fPIC"
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT%{_bindir}
63 install -p bin/phantomjs $RPM_BUILD_ROOT%{_bindir}
65 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
66 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
69 rm -rf $RPM_BUILD_ROOT
72 %defattr(644,root,root,755)
73 %doc README.md LICENSE.BSD CONTRIBUTING.md ChangeLog
74 %attr(755,root,root) %{_bindir}/%{name}
75 %{_examplesdir}/%{name}-%{version}