]> git.pld-linux.org Git - packages/phantomjs.git/blob - phantomjs.spec
requires Qt5Gui-platform-xcb
[packages/phantomjs.git] / phantomjs.spec
1 %bcond_with     system_qcommandline
2 Summary:        Headless WebKit with a JavaScript API
3 Name:           phantomjs
4 Version:        2.0.0
5 Release:        3
6 License:        BSD
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}
25 BuildRequires:  unzip
26 Requires:       Qt5Gui-platform-xcb
27 Requires:       coffee-script
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
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.
35
36 %prep
37 %setup -q
38
39 # remove bundled sources
40 rm -r src/mongoose
41 rm -r src/qt
42 rm -r src/linenoise
43 %{?with_system_qcommandline:rm -r src/qcommandline}
44 rm -r src/breakpad
45
46 %patch0 -p1
47 %patch1 -p1
48 %patch3 -p1
49 %patch4 -p1
50 %patch5 -p1
51 %patch6 -p1
52 %{?with_system_qcommandline:%patch7 -p1}
53
54 %build
55 qmake-qt5
56 %{__make} \
57         CXX="%{__cxx}" \
58         CXXFLAGS="%{rpmcxxflags} -fPIC"
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT%{_bindir}
63 install -p bin/phantomjs $RPM_BUILD_ROOT%{_bindir}
64
65 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
66 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %files
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}
This page took 0.036287 seconds and 3 git commands to generate.