]>
Commit | Line | Data |
---|---|---|
818c8d7d JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
4 | # | |
5 | Summary: Spellchecking library for GTK 4 | |
6 | Summary(pl.UTF-8): Biblioteka sprawdzania pisowni dla GTK 4 | |
7 | Name: libspelling | |
6af3ad4c | 8 | Version: 0.2.1 |
818c8d7d JB |
9 | Release: 1 |
10 | License: LGPL v2.1+ | |
11 | Group: Libraries | |
12 | Source0: https://download.gnome.org/sources/libspelling/0.2/%{name}-%{version}.tar.xz | |
6af3ad4c | 13 | # Source0-md5: 94cb8c37d83c432e8b8935c3952bf4a4 |
818c8d7d JB |
14 | URL: https://gitlab.gnome.org/chergert/libspelling |
15 | BuildRequires: enchant2-devel >= 2 | |
16 | %{?with_apidocs:BuildRequires: gi-docgen} | |
17 | BuildRequires: glib2-devel >= 2.0 | |
18 | BuildRequires: gtk4-devel >= 4.8 | |
19 | BuildRequires: gtksourceview5-devel >= 5.6 | |
20 | BuildRequires: libicu-devel | |
21 | BuildRequires: meson >= 0.62.0 | |
22 | BuildRequires: ninja >= 1.5 | |
23 | BuildRequires: pkgconfig | |
24 | BuildRequires: rpm-build >= 4.6 | |
25 | BuildRequires: rpmbuild(macros) >= 2.029 | |
26 | BuildRequires: tar >= 1:1.22 | |
27 | BuildRequires: vala >= 2:0.44 | |
8b09231b | 28 | BuildRequires: vala-gtksourceview5 >= 5.6 |
818c8d7d JB |
29 | BuildRequires: xz |
30 | Requires: gtk4 >= 4.8 | |
31 | Requires: gtksourceview5 >= 5.6 | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | Spellchecking library for GTK 4. It's heavily based upon GNOME Text | |
36 | Editor and GNOME Builder's spellcheck implementation. | |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | Biblioteka sprawdzania pisowni dla GTK 4. Jest w dużej części oparta | |
40 | na implementacji sprawdzania pisowni aplikacji GNOME Text Editor i | |
41 | GNOME Builder. | |
42 | ||
43 | %package devel | |
44 | Summary: Header files for libspelling library | |
45 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libspelling | |
46 | Group: Development/Libraries | |
47 | Requires: %{name} = %{version}-%{release} | |
48 | Requires: glib2-devel >= 2.0 | |
49 | Requires: gtk4-devel >= 4.8 | |
50 | Requires: gtksourceview5-devel >= 5.6 | |
51 | ||
52 | %description devel | |
53 | Header files for libspelling library. | |
54 | ||
55 | %description devel -l pl.UTF-8 | |
56 | Pliki nagłówkowe biblioteki libspelling. | |
57 | ||
58 | %package -n vala-libspelling | |
59 | Summary: Vala API for libspelling library | |
60 | Summary(pl.UTF-8): API języka Vala do biblioteki libspelling | |
61 | Group: Development/Libraries | |
62 | Requires: %{name}-devel = %{version}-%{release} | |
63 | # with gtk4 binding | |
64 | Requires: vala >= 2:0.44 | |
65 | Requires: vala-gtksourceview5 >= 5.6 | |
66 | BuildArch: noarch | |
67 | ||
68 | %description -n vala-libspelling | |
69 | Vala API for libspelling library. | |
70 | ||
71 | %description -n vala-libspelling -l pl.UTF-8 | |
72 | API języka Vala do biblioteki libspelling. | |
73 | ||
74 | %package apidocs | |
75 | Summary: API documentation for libspelling library | |
76 | Summary(pl.UTF-8): Dokumentacja API biblioteki libspelling | |
77 | Group: Documentation | |
78 | BuildArch: noarch | |
79 | ||
80 | %description apidocs | |
81 | API documentation for libspelling library. | |
82 | ||
83 | %description apidocs -l pl.UTF-8 | |
84 | Dokumentacja API biblioteki libspelling. | |
85 | ||
86 | %prep | |
87 | %setup -q | |
88 | ||
89 | %build | |
90 | %meson build \ | |
91 | %{!?with_apidocs:-Ddocs=false} | |
92 | ||
93 | %ninja_build -C build | |
94 | ||
95 | %install | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %ninja_install -C build | |
99 | ||
100 | %if %{with apidocs} | |
101 | install -d $RPM_BUILD_ROOT%{_gidocdir} | |
102 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/libspelling-1 $RPM_BUILD_ROOT%{_gidocdir} | |
103 | %endif | |
104 | ||
105 | %clean | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
108 | %post -p /sbin/ldconfig | |
109 | %postun -p /sbin/ldconfig | |
110 | ||
111 | %files | |
112 | %defattr(644,root,root,755) | |
113 | %doc NEWS README.md | |
114 | %attr(755,root,root) %{_libdir}/libspelling-1.so.*.*.* | |
115 | %attr(755,root,root) %ghost %{_libdir}/libspelling-1.so.1 | |
116 | %{_libdir}/girepository-1.0/Spelling-1.typelib | |
117 | ||
118 | %files devel | |
119 | %defattr(644,root,root,755) | |
120 | %attr(755,root,root) %{_libdir}/libspelling-1.so | |
121 | %{_includedir}/libspelling-1 | |
122 | %{_datadir}/gir-1.0/Spelling-1.gir | |
123 | %{_pkgconfigdir}/libspelling-1.pc | |
124 | ||
125 | %files -n vala-libspelling | |
126 | %defattr(644,root,root,755) | |
127 | %{_datadir}/vala/vapi/libspelling-1.deps | |
128 | %{_datadir}/vala/vapi/libspelling-1.vapi | |
129 | ||
130 | %if %{with apidocs} | |
131 | %files apidocs | |
132 | %defattr(644,root,root,755) | |
133 | %{_gidocdir}/libspelling-1 | |
134 | %endif |