3 %bcond_without static_libs # static library
5 Summary: Library for generating PDF documents
6 Summary(pl.UTF-8): Biblioteka do generowania dokumentów PDF
12 #Source0Download: https://github.com/libharu/libharu/releases
13 Source0: https://github.com/libharu/libharu/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5: 7c0e7dc0dc400ad4d6602277bb532bc4
15 Patch0: %{name}-libdir.patch
16 Patch1: %{name}-soname.patch
17 URL: http://libharu.org/
18 BuildRequires: cmake >= 3.10
19 BuildRequires: libpng-devel
20 BuildRequires: zlib-devel
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 HARU is a free, cross platform, open-sourced software library for
25 generating PDF. It supports the following features:
26 - Generating PDF files with lines, text, images.
27 - Outline, text annotation, link annotation.
28 - Compressing document with deflate-decode.
29 - Embedding PNG, Jpeg images.
30 - Embedding Type1 font and TrueType font.
31 - Creating encrypted PDF files.
32 - Using various character set (ISO8859-1~16, MSCP1250~8, KOI-8R).
33 - Supporting CJK fonts and encodings.
35 You can add the feature of PDF creation by using HARU without
36 understanding complicated internal structure of PDF.
38 %description -l pl.UTF-8
39 HARU to darmowa, dostepna na wiele platform biblioteka open source do
40 generowania dokumentów PDF. Biblioteka ta umożliwia:
41 - generowanie dokumentów PDF z liniami, tekstem czy obrazkami,
42 - oznaczanie tekstu i odnośników,
43 - kompresję dokumentu za pomocą deflate-decode,
44 - osadzanie obrazków PNG i JPEG,
45 - osadzanie czcionek Type1 i TrueType,
46 - tworzenie zaszyforwanie dokumentów PDF,
47 - wsparcie dla różnych zestawów znaków (ISO8859-1~16 MSCP1250~8,
49 - wsparcie dla czcionek i kodowań znaków CJK.
52 Summary: Header files for Haru PDF library
53 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Haru PDF
54 Group: Development/Libraries
55 Requires: %{name} = %{version}-%{release}
58 Header files for Haru PDF library.
60 %description devel -l pl.UTF-8
61 Pliki nagłówkowe biblioteki Haru PDF.
64 Summary: Static Haru PDF library
65 Summary(pl.UTF-8): Statyczna biblioteka Haru PDF
66 Group: Development/Libraries
67 Requires: %{name}-devel = %{version}-%{release}
70 Static Haru PDF library.
72 %description static -l pl.UTF-8
73 Statyczna biblioteka Haru PDF.
81 %if %{with static_libs}
82 install -d build-static
85 -DBUILD_SHARED_LIBS=OFF
98 rm -rf $RPM_BUILD_ROOT
100 %if %{with static_libs}
101 %{__make} -C build-static install \
102 DESTDIR=$RPM_BUILD_ROOT
105 %{__make} -C build install \
106 DESTDIR=$RPM_BUILD_ROOT
108 # docs packaged as %doc + bindings sources
109 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/libharu
112 rm -rf $RPM_BUILD_ROOT
114 %post -p /sbin/ldconfig
115 %postun -p /sbin/ldconfig
118 %defattr(644,root,root,755)
119 %doc CHANGES LICENSE README.md
120 %attr(755,root,root) %{_libdir}/libhpdf.so.*.*.*
121 %attr(755,root,root) %ghost %{_libdir}/libhpdf.so.2.4
124 %defattr(644,root,root,755)
125 %attr(755,root,root) %{_libdir}/libhpdf.so
126 %{_includedir}/hpdf*.h
129 %defattr(644,root,root,755)