File phantomjs.spec of Package phantomjs

#
# spec file for package phantomjs
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           phantomjs
Version:        2.1.1+git20160526.6090f54
Release:        0
Summary:        Scriptable Headless WebKit
License:        BSD-3-Clause
Group:          Development/Languages/NodeJS
Url:            http://phantomjs.org
Source:         %{name}-%{version}.tar.xz
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  fontconfig-devel
BuildRequires:  freetype2-devel
BuildRequires:  gcc-c++
BuildRequires:  gperf
BuildRequires:  libX11-devel
BuildRequires:  libXext-devel
BuildRequires:  libicu-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libopenssl-devel
BuildRequires:  libpng16-devel
BuildRequires:  perl
BuildRequires:  python
BuildRequires:  python-xml
BuildRequires:  ruby
BuildRequires:  sqlite3-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.

%prep
%setup -q

%build
# github issue #13930
touch src/qt/qtbase/.git
touch src/qt/qtwebkit/.git
touch src/qt/3rdparty/.git
python build.py --confirm --release

%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/%{name}/examples
cp bin/%{name} %{buildroot}%{_bindir}/%{name}
cp examples/* %{buildroot}%{_datadir}/%{name}/examples/

%files
%defattr(-,root,root)
%doc ChangeLog CONTRIBUTING.md LICENSE.BSD README.md
%{_bindir}/%{name}
%{_datadir}/%{name}

%changelog
openSUSE Build Service is sponsored by