]> git.pld-linux.org Git - packages/phantomjs.git/blob - phantomjs.spec
5906722677161e0450de3202d871fbe82eedf320
[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:        2
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:         phantomjs-qt.patch
11 Patch1:         phantomjs-env.patch
12
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}
26 BuildRequires:  unzip
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
49 %patch3 -p1
50 %patch4 -p1
51 %patch5 -p1
52 %patch6 -p1
53 %{?with_system_qcommandline:%patch7 -p1}
54
55 %build
56 qmake-qt5
57 %{__make} \
58         CXX="%{__cxx}" \
59         CXXFLAGS="%{rpmcxxflags} -fPIC"
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT%{_bindir}
64 install -p bin/phantomjs $RPM_BUILD_ROOT%{_bindir}
65
66 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
67 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %files
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}
This page took 0.053236 seconds and 2 git commands to generate.