]> git.pld-linux.org Git - SPECS.git/blob - libharu.spec
SPECS updated Thu 20 Jun 12:52:02 CEST 2024
[SPECS.git] / libharu.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4
5 Summary:        Library for generating PDF documents
6 Summary(pl.UTF-8):      Biblioteka do generowania dokumentów PDF
7 Name:           libharu
8 Version:        2.4.3
9 Release:        1
10 License:        MIT-like
11 Group:          Libraries
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)
22
23 %description
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.
34
35 You can add the feature of PDF creation by using HARU without
36 understanding complicated internal structure of PDF.
37
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,
48   KOI-8R),
49 - wsparcie dla czcionek i kodowań znaków CJK.
50
51 %package devel
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}
56
57 %description devel
58 Header files for Haru PDF library.
59
60 %description devel -l pl.UTF-8
61 Pliki nagłówkowe biblioteki Haru PDF.
62
63 %package static
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}
68
69 %description static
70 Static Haru PDF library.
71
72 %description static -l pl.UTF-8
73 Statyczna biblioteka Haru PDF.
74
75 %prep
76 %setup -q
77 %patch0 -p1
78 %patch1 -p1
79
80 %build
81 %if %{with static_libs}
82 install -d build-static
83 cd build-static
84 %cmake .. \
85         -DBUILD_SHARED_LIBS=OFF
86
87 %{__make}
88 cd ..
89 %endif
90
91 install -d build
92 cd build
93 %cmake ..
94
95 %{__make}
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99
100 %if %{with static_libs}
101 %{__make} -C build-static install \
102         DESTDIR=$RPM_BUILD_ROOT
103 %endif
104
105 %{__make} -C build install \
106         DESTDIR=$RPM_BUILD_ROOT
107
108 # docs packaged as %doc + bindings sources
109 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/libharu
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %post   -p /sbin/ldconfig
115 %postun -p /sbin/ldconfig
116
117 %files
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
122
123 %files devel
124 %defattr(644,root,root,755)
125 %attr(755,root,root) %{_libdir}/libhpdf.so
126 %{_includedir}/hpdf*.h
127
128 %files static
129 %defattr(644,root,root,755)
130 %{_libdir}/libhpdf.a
This page took 0.059224 seconds and 4 git commands to generate.