File wkhtmltopdf.spec of Package wkhtmltopdf
#
# spec file for package
#
# Copyright (c) 2014 SUSE LINUX Products 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/
#
# ** This version of wkhtmltopdf is build against an unpatched version of QT **
%define wk_name wkhtmltox
BuildRequires: -post-build-checks
Name: wkhtmltopdf
Version: 0.12.2.1
Release: 1.1
License: LGPL-3.0
Summary: Convert HTML into PDF and various image formats
Url: http://wkhtmltopdf.org
Group: Productivity/Publishing/PDF
Source: wkhtmltox-%{version}.tar.bz2
Source1: wkhtmltopdf.man
Source2: wkhtmltoimage.man
BuildRequires: libQtWebKit-devel
BuildRequires: libjpeg8-devel
%if 0%{?suse_version} > 1140
%libqt4_requires
%endif
Provides: wkhtmltoimage
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
wkhtmltopdf and wkhtmltoimage are open source (LGPL) 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.
%package -n libwkhtmltox0
Summary: Shared library from wkhtmltopdf
Group: Development/Libraries/C and C++
%description -n libwkhtmltox0
wkhtmltopdf and wkhtmltoimage are open source (LGPL) 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.
%prep
%setup -q -n %{wk_name}-%{version}
%build
qmake %{name}.pro
make %{?_smp_mflags}
%install
install -D %{_builddir}/%{wk_name}-%{version}/bin/%{name} %{buildroot}%{_bindir}/%{name}
install -D %{_builddir}/%{wk_name}-%{version}/bin/wkhtmltoimage %{buildroot}%{_bindir}/wkhtmltoimage
install -D %{_builddir}/%{wk_name}-%{version}/bin/libwkhtmltox.so.0.12.2 %{buildroot}%{_libdir}/libwkhtmltox.so.0.12.2
ln -s %{_libdir}/libwkhtmltox.so.0.12.2 %{buildroot}%{_libdir}/libwkhtmltox.so
ln -s %{_libdir}/libwkhtmltox.so.0.12.2 %{buildroot}%{_libdir}/libwkhtmltox.so.0
ln -s %{_libdir}/libwkhtmltox.so.0.12.2 %{buildroot}%{_libdir}/libwkhtmltox.so.0.12
install -D %{SOURCE1} %{buildroot}%{_mandir}/man1/wkhtmltopdf.1
install -D %{SOURCE2} %{buildroot}%{_mandir}/man1/wkhtmltoimage.1
%post -n libwkhtmltox0 -p /sbin/ldconfig
%postun -n libwkhtmltox0 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc CHANGELOG-OLD CHANGELOG.md README.md COPYING
%{_bindir}/%{name}
%{_bindir}/wkhtmltoimage
%{_mandir}/man1/wkhtmltopdf.1.gz
%{_mandir}/man1/wkhtmltoimage.1.gz
%files -n libwkhtmltox0
%defattr(-,root,root)
%{_libdir}/libwkhtmltox.so
%{_libdir}/libwkhtmltox.so.0
%{_libdir}/libwkhtmltox.so.0.12
%{_libdir}/libwkhtmltox.so.0.12.2
%changelog
* Wed Jul 16 2014 hot123tea123@gmail.com
- Initial package building