]>
Commit | Line | Data |
---|---|---|
ad8bb7e7 JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | ||
9130a7d7 JP |
5 | Summary: A simple library for font loading and glyph rasterization |
6 | Name: fcft | |
02e27edb | 7 | Version: 3.1.8 |
9130a7d7 JP |
8 | Release: 1 |
9 | License: MIT | |
10 | Group: Development/Libraries | |
11 | Source0: https://codeberg.org/dnkl/fcft/archive/%{version}.tar.gz | |
02e27edb | 12 | # Source0-md5: e06225fba9a9b6c9a68a38da9bb1b983 |
9130a7d7 JP |
13 | URL: https://codeberg.org/dnkl/fcft |
14 | BuildRequires: fontconfig-devel | |
1a4d35d2 | 15 | BuildRequires: freetype-devel >= 2.12.0 |
9130a7d7 JP |
16 | BuildRequires: harfbuzz-devel |
17 | BuildRequires: libutf8proc-devel | |
1a4d35d2 | 18 | BuildRequires: meson >= 0.58.0 |
9130a7d7 JP |
19 | BuildRequires: ninja |
20 | BuildRequires: pixman-devel | |
21 | BuildRequires: pkgconfig | |
22 | BuildRequires: rpmbuild(macros) >= 1.736 | |
23 | BuildRequires: scdoc | |
24 | BuildRequires: tllist-devel >= 1.0.1 | |
25 | BuildRequires: wayland-devel | |
26 | BuildRequires: wayland-protocols | |
1a4d35d2 | 27 | Requires: freetype >= 2.12.0 |
9130a7d7 JP |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
31 | fcft is a small font loading and glyph rasterization library built | |
32 | on-top of FontConfig, FreeType2 and pixman. | |
33 | ||
34 | It can load and cache fonts from a fontconfig-formatted name string, | |
35 | e.g. Monospace:size=12, optionally with user configured fallback | |
36 | fonts. | |
37 | ||
38 | After a font has been loaded, you can rasterize glyphs. When doing so, | |
39 | the primary font is first considered. If it does not have the | |
40 | requested glyph, the user configured fallback fonts (if any) are | |
41 | considered. If none of the user configured fallback fonts has the | |
42 | requested glyph, the FontConfig generated list of fallback fonts are | |
43 | checked. | |
44 | ||
45 | %package devel | |
46 | Summary: Header files for the fcft library | |
47 | Group: Development/Libraries | |
48 | Requires: %{name} = %{version}-%{release} | |
eaa3c13b JP |
49 | Requires: fontconfig-devel |
50 | Requires: freetype-devel >= 2 | |
51 | Requires: harfbuzz-devel | |
52 | Requires: libutf8proc-devel | |
53 | Requires: pixman-devel | |
54 | Requires: tllist-devel >= 1.0.1 | |
9130a7d7 JP |
55 | |
56 | %description devel | |
57 | Header files for the fcft library. | |
58 | ||
59 | %package static | |
60 | Summary: Static fcft library | |
61 | Group: Development/Libraries | |
62 | Requires: %{name}-devel = %{version}-%{release} | |
63 | ||
64 | %description static | |
65 | Static fcft library. | |
66 | ||
67 | %prep | |
68 | %setup -q -n %{name} | |
69 | ||
70 | %build | |
ad8bb7e7 JP |
71 | %meson build \ |
72 | %{!?with_static_libs:--default-library=shared} | |
9130a7d7 JP |
73 | |
74 | %ninja_build -C build | |
75 | ||
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %ninja_install -C build | |
80 | ||
81 | %clean | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %post -p /sbin/ldconfig | |
85 | %postun -p /sbin/ldconfig | |
86 | ||
87 | %files | |
88 | %defattr(644,root,root,755) | |
89 | %doc CHANGELOG.md README.md | |
90 | %attr(755,root,root) %{_libdir}/libfcft.so.*.* | |
a65db5f1 | 91 | %attr(755,root,root) %ghost %{_libdir}/libfcft.so.4 |
9130a7d7 JP |
92 | |
93 | %files devel | |
94 | %defattr(644,root,root,755) | |
95 | %attr(755,root,root) %{_libdir}/libfcft.so | |
96 | %dir %{_includedir}/fcft | |
97 | %{_includedir}/fcft/fcft.h | |
98 | %{_includedir}/fcft/stride.h | |
99 | %{_pkgconfigdir}/fcft.pc | |
100 | %{_mandir}/man3/fcft_*.3* | |
101 | ||
ad8bb7e7 | 102 | %if %{with static_libs} |
9130a7d7 JP |
103 | %files static |
104 | %defattr(644,root,root,755) | |
105 | %{_libdir}/libfcft.a | |
ad8bb7e7 | 106 | %endif |