SHA256
1
0
forked from pool/mupdf
mupdf/mupdf.spec
OBS User mrdocs ad06e3c1b7 Accepting request 173632 from home:Reki:leechcraft:masterbranch
A hack to prevent 3d-party software linking error:
[ 2226s] Linking CXX shared library libleechcraft_monocle_mu.so
[ 2226s] /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../lib64/libfitz.a(dev_null.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
[ 2226s] /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../lib64/libfitz.a: could not read symbols: Bad value
[ 2226s] collect2: error: ld returned 1 exit status
[ 2226s] make[2]: *** [plugins/monocle/plugins/mu/libleechcraft_monocle_mu.so] Error 1
[ 2226s] make[1]: *** [plugins/monocle/plugins/mu/CMakeFiles/leechcraft_monocle_mu.dir/all] Error 2
[ 2226s] make[1]: *** Waiting for unfinished jobs....

OBS-URL: https://build.opensuse.org/request/show/173632
OBS-URL: https://build.opensuse.org/package/show/Publishing/mupdf?expand=0&rev=5
2013-04-29 04:18:56 +00:00

112 lines
3.4 KiB
RPMSpec

#
# spec file for package mupdf
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 Guido Berhoerster.
#
# 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: mupdf
Version: 1.2
Release: 0
Summary: Lightweight PDF and XPS Viewer and Parser and Rendering Library
License: AGPL-3.0+
Group: Productivity/Office/Other
Url: http://mupdf.com/
Source: http://mupdf.googlecode.com/files/mupdf-%{version}-source.zip
BuildRequires: freetype-devel
BuildRequires: gcc-c++
BuildRequires: jbig2dec-devel
BuildRequires: libjpeg-devel
BuildRequires: openjpeg-devel
BuildRequires: unzip
BuildRequires: update-desktop-files
BuildRequires: v8-devel
BuildRequires: v8-private-headers-devel
BuildRequires: xorg-x11-devel
BuildRequires: zlib-devel
Requires: xdg-utils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
MuPDF is a lightweight PDF and XPS viewer and parser/rendering library.
The renderer in MuPDF is tailored for high quality anti-aliased graphics. It
renders text with metrics and spacing accurate to within fractions of a pixel
for the highest fidelity in reproducing the look of a printed page on screen.
MuPDF is also small, fast, and yet complete. It supports PDF 1.7 with
transparency, encryption, hyperlinks, annotations, search and many other bells
and whistles. MuPDF can also read XPS documents (OpenXPS/ECMA-388).
%package devel-static
Summary: Development Files for mupdf
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel-static
This package contains development files needed for developing applications
based on mupdf.
%prep
%setup -q -n %{name}-%{version}-source
# do not use the inlined copies of build dpendencies
rm -rf thirdparty
%build
export CFLAGS="%{optflags} -fPIC"
export XCFLAGS="%{optflags}"
make %{?_smp_mflags} verbose=1
ls -1 build/debug
%install
%make_install prefix=%{_prefix} libdir=%{_libdir}
# mutool is missing from the install target
install -p -m 755 build/debug/mutool %{buildroot}%{_bindir}/mutool
chmod 0644 %{buildroot}%{_includedir}/*.h \
%{buildroot}%{_libdir}/*.a \
%{buildroot}%{_mandir}/man1/*
sed -e '/^Type=/aNoDisplay=true' -e '/\[Desktop Action View\]/,$d' \
debian/mupdf.desktop > debian/mupdf.desktop.new
install -D -p -m 644 debian/mupdf.desktop.new \
%{buildroot}%{_datadir}/applications/%{name}.desktop
install -D -p -m 644 debian/mupdf.png \
%{buildroot}%{_datadir}/pixmaps/%{name}.png
%suse_update_desktop_file mupdf
%post
%desktop_database_post
%postun
%desktop_database_postun
%files
%defattr(-,root,root)
%doc README COPYING
%{_bindir}/mupdf
%{_bindir}/mudraw
%{_bindir}/mutool
%{_datadir}/applications/mupdf.desktop
%{_datadir}/pixmaps/mupdf.png
%{_mandir}/man1/mu*.1*
%files devel-static
%defattr(-,root,root,-)
%{_includedir}/*.h
%{_libdir}/libfitz.a
%changelog