summaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf-opt.spec
blob: 08b1d539cccd9b3036ec48ef5dd3cb97964b851a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# remirepo/fedora spec file for wkhtmltopdf-opt
#
# Copyright (c) 2017-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%global debug_package %{nil}
%global __debug_install_post /bin/true
%if 0%{?fedora} >= 27
%global _build_id_links none
%endif

%global gh_owner     wkhtmltopdf
%global gh_project   wkhtmltopdf

# See https://github.com/wkhtmltopdf/wkhtmltopdf/releases
%global upstream_version 0.12.4
#global upstream_prever  RC1

Name:    %{gh_project}-opt
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 1%{?dist}
Group:   System Environment/Libraries
Summary: Tools and library to render HTML into PDF
License: LGPLv3
URL:     https://github.com/%{gh_owner}/%{gh_project}
Source0: %{url}/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
Source1: %{url}/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-i386.tar.xz
Source2: https://raw.githubusercontent.com/%{gh_owner}/%{gh_project}/master/LICENSE

# Filter shared private - always as not in standard library path
%{?filter_provides_in:   %filter_provides_in /opt/%{gh_project}/%{_lib}/.*$}
%{?filter_from_requires: %filter_from_requires /libwkhtmltox/d}
%{?filter_setup}


%description
wkhtmltopdf and wkhtmltoimage are command line tools to render HTML into PDF
and various image formats using the QT Webkit rendering engine. These run
entirely "headless" and do not require a display or display service.

This package provides upstream binaries, statically built against a patch QT
version to drop the need of an running X11 server.

All files are installed in /opt/%{gh_project}.


%prep
%setup -qcT
%ifarch x86_64
tar xf %{SOURCE0}
mv wkhtmltox/lib wkhtmltox/%{_lib}
%else
tar xf %{SOURCE1}
%endif
cp %{SOURCE2} LICENSE


%build
# We use upstream binary


%install
mkdir -p %{buildroot}/opt
cp -pr wkhtmltox %{buildroot}/opt/%{gh_project}


%files
%{!?_licensedir:%global license %%doc}
%license LICENSE
/opt/%{gh_project}


%changelog
* Sun Nov 12 2017 Remi Collet <remi@remirepo.net> - 0.12.4-1
- initial package