]>
Commit | Line | Data |
---|---|---|
3a1dfbe2 | 1 | # |
38bceebd | 2 | # Conditional build: |
edc99078 | 3 | %bcond_without apidocs # gtk-doc based API documentation |
38bceebd MB |
4 | %bcond_without static_libs # static library |
5 | ||
18f8e10b | 6 | Summary: API documentation browser for GNOME |
4188d237 | 7 | Summary(pl.UTF-8): Przeglądarka dokumentacji API dla GNOME |
20782b1d | 8 | Name: devhelp |
58979d7b | 9 | Version: 41.3 |
960ebbdc | 10 | Release: 1 |
0328db91 | 11 | License: GPL v2+ |
20782b1d | 12 | Group: X11/Applications |
db93419e | 13 | Source0: https://download.gnome.org/sources/devhelp/41/%{name}-%{version}.tar.xz |
58979d7b | 14 | # Source0-md5: f9638a5ef090c83e2ad1543beabe31ea |
40506027 | 15 | Patch0: %{name}-bookdir.patch |
c394ba8c | 16 | URL: https://wiki.gnome.org/Apps/Devhelp |
38bceebd | 17 | BuildRequires: gettext-tools >= 0.19.7 |
db93419e | 18 | %{?with_apidocs:BuildRequires: gi-docgen >= 2021.6} |
7eb0b29c | 19 | BuildRequires: glib2-devel >= 1:2.64 |
38bceebd | 20 | BuildRequires: gobject-introspection-devel >= 1.30.0 |
1b04778a | 21 | BuildRequires: gsettings-desktop-schemas-devel |
9c5bfbbd | 22 | BuildRequires: gtk+3-devel >= 3.22.0 |
db93419e | 23 | # libsoup3 (webkit2gtk-4.1, >= 2.34) variant is preferred |
7eb0b29c | 24 | BuildRequires: gtk-webkit4-devel >= 2.26 |
58979d7b | 25 | BuildRequires: meson >= 0.55 |
1b04778a | 26 | BuildRequires: ninja >= 1.5 |
0328db91 | 27 | BuildRequires: pkgconfig |
1b04778a | 28 | BuildRequires: python3-devel >= 1:3.3 |
edc99078 | 29 | BuildRequires: rpm-build >= 4.6 |
0192a9ae | 30 | BuildRequires: rpm-pythonprov |
b12a556c | 31 | BuildRequires: rpmbuild(macros) >= 1.752 |
1b04778a | 32 | BuildRequires: sed >= 4.0 |
edc65cdd MB |
33 | BuildRequires: tar >= 1:1.22 |
34 | BuildRequires: xz | |
16f64fd4 | 35 | Requires(post,postun): gtk-update-icon-cache |
64a66d5b | 36 | Requires: %{name}-libs = %{version}-%{release} |
7eb0b29c | 37 | Requires: glib2 >= 1:2.64 |
1b04778a | 38 | Requires: gsettings-desktop-schemas |
2153a520 | 39 | Requires: hicolor-icon-theme |
20782b1d AM |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
20782b1d | 42 | %description |
18f8e10b | 43 | API documentation browser for GNOME. |
20782b1d | 44 | |
d20ab5a4 JR |
45 | %description -l pl.UTF-8 |
46 | Przeglądarka dokumentacji API dla GNOME. | |
20782b1d | 47 | |
64a66d5b | 48 | %package libs |
49 | Summary: Library to embed Devhelp in other applications | |
4188d237 | 50 | Summary(pl.UTF-8): Biblioteka do osadzania Devhelp w innych aplikacjach |
f883acb4 | 51 | Group: X11/Libraries |
7eb0b29c | 52 | Requires: glib2 >= 1:2.64 |
1b04778a | 53 | Requires: gtk+3 >= 3.22.0 |
7eb0b29c | 54 | Requires: gtk-webkit4 >= 2.26 |
64a66d5b | 55 | |
56 | %description libs | |
18f8e10b | 57 | Library of Devhelp for embedding into other applications. |
64a66d5b | 58 | |
d20ab5a4 | 59 | %description libs -l pl.UTF-8 |
18f8e10b | 60 | Biblioteka Devhelp do osadzania w innych aplikacjach. |
64a66d5b | 61 | |
1609a537 | 62 | %package devel |
64a66d5b | 63 | Summary: Headers for Devhelp library |
4188d237 | 64 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Devhelp |
f883acb4 | 65 | Group: X11/Development/Libraries |
64a66d5b | 66 | Requires: %{name}-libs = %{version}-%{release} |
7eb0b29c | 67 | Requires: glib2-devel >= 1:2.64 |
9c5bfbbd | 68 | Requires: gtk+3-devel >= 3.22.0 |
7eb0b29c | 69 | Requires: gtk-webkit4-devel >= 2.26 |
1609a537 | 70 | |
71 | %description devel | |
64a66d5b | 72 | Headers for Devhelp library. |
1609a537 | 73 | |
d20ab5a4 JR |
74 | %description devel -l pl.UTF-8 |
75 | Pliki nagłówkowe biblioteki Devhelp. | |
1609a537 | 76 | |
77 | %package static | |
64a66d5b | 78 | Summary: Static Devhelp library |
4188d237 | 79 | Summary(pl.UTF-8): Statyczna biblioteka Devhelp |
f883acb4 | 80 | Group: X11/Development/Libraries |
64a66d5b | 81 | Requires: %{name}-devel = %{version}-%{release} |
1609a537 | 82 | |
83 | %description static | |
64a66d5b | 84 | Static version of Devhelp library. |
1609a537 | 85 | |
d20ab5a4 | 86 | %description static -l pl.UTF-8 |
64a66d5b | 87 | Statyczna biblioteka Devhelp. |
1609a537 | 88 | |
38bceebd MB |
89 | %package apidocs |
90 | Summary: Devhelp API documetation | |
91 | Summary(pl.UTF-8): Dokumentacja API Devhelp | |
92 | Group: Documentation | |
93 | Requires: gtk-doc-common | |
16ecf66e | 94 | BuildArch: noarch |
38bceebd MB |
95 | |
96 | %description apidocs | |
97 | Devhelp API documetation. | |
98 | ||
99 | %description apidocs -l pl.UTF-8 | |
100 | Dokumentacja API Devhelp. | |
101 | ||
edc99078 JB |
102 | %package -n emacs-devhelp |
103 | Summary: Emacs integration for Devhelp | |
104 | Summary(pl.UTF-8): Integracja Emacsa z Devhelpem | |
105 | Group: Applications/Editors | |
106 | Requires: %{name} = %{version}-%{release} | |
107 | Requires: emacs-common | |
108 | BuildArch: noarch | |
109 | ||
110 | %description -n emacs-devhelp | |
111 | Emacs integration for Devhelp. | |
112 | ||
113 | %description -n emacs-devhelp -l pl.UTF-8 | |
114 | Integracja Emacsa z Devhelpem. | |
115 | ||
c1597d56 | 116 | %package -n gedit-plugin-devhelp |
e7c0fa80 | 117 | Summary: Devhelp plugin for Gedit editor |
4188d237 | 118 | Summary(pl.UTF-8): Wtyczka devhelpa dla edytora Gedit |
1cf29e7b | 119 | Group: X11/Applications |
249ab429 | 120 | Requires: %{name} = %{version}-%{release} |
c394ba8c JB |
121 | # python3 based gedit |
122 | Requires: gedit >= 3.8 | |
b4e77d9c | 123 | Requires: libpeas-loader-python3 |
c394ba8c JB |
124 | Requires: python3 >= 1:3.3 |
125 | Requires: python3-pygobject3 >= 3 | |
58979d7b | 126 | Obsoletes: gedit2-plugin-devhelp < 3.4.1-2 |
e7c0fa80 | 127 | |
c1597d56 | 128 | %description -n gedit-plugin-devhelp |
d088438f | 129 | Plugin that allows to browse API documentation in Gedit. |
e7c0fa80 | 130 | |
c1597d56 | 131 | %description -n gedit-plugin-devhelp -l pl.UTF-8 |
d088438f | 132 | Wtyczka umożliwiająca przeglądanie dokumentacji API w edytorze Gedit. |
e7c0fa80 | 133 | |
edc99078 JB |
134 | %package -n vim-plugin-devhelp |
135 | Summary: Vim integration for Devhelp | |
136 | Summary(pl.UTF-8): Integracja Vima z Devhelpem | |
137 | Group: Applications/Editors | |
138 | Requires: %{name} = %{version}-%{release} | |
139 | Requires: vim-rt | |
140 | BuildArch: noarch | |
141 | ||
142 | %description -n vim-plugin-devhelp | |
143 | Vim integration for Devhelp. | |
144 | ||
145 | %description -n vim-plugin-devhelp -l pl.UTF-8 | |
146 | Integracja Vima z Devhelpem. | |
147 | ||
20782b1d AM |
148 | %prep |
149 | %setup -q | |
c145ed5a | 150 | %patch0 -p1 |
1b04778a JB |
151 | |
152 | %if %{with static_libs} | |
7eb0b29c | 153 | %{__sed} -i '/libdevhelp_shared_lib = / s/shared_library/library/' devhelp/meson.build |
1b04778a | 154 | %endif |
20782b1d AM |
155 | |
156 | %build | |
1b04778a | 157 | %meson build \ |
edc99078 JB |
158 | %{?with_apidocs:-Dgtk_doc=true} \ |
159 | -Dplugin_emacs=true \ | |
160 | -Dplugin_gedit=true \ | |
161 | -Dplugin_vim=true | |
1b04778a JB |
162 | |
163 | %ninja_build -C build | |
20782b1d AM |
164 | |
165 | %install | |
166 | rm -rf $RPM_BUILD_ROOT | |
b4e77d9c | 167 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/{books,references,specs} |
20782b1d | 168 | |
1b04778a | 169 | %ninja_install -C build |
20782b1d | 170 | |
1b04778a JB |
171 | %py3_comp $RPM_BUILD_ROOT%{_libdir}/gedit/plugins |
172 | %py3_ocomp $RPM_BUILD_ROOT%{_libdir}/gedit/plugins | |
2dc813cf | 173 | |
db93419e JB |
174 | %if %{with apidocs} |
175 | # FIXME: where to package gi-docgen generated docs? | |
176 | install -d $RPM_BUILD_ROOT%{_gtkdocdir} | |
177 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/devhelp-3 $RPM_BUILD_ROOT%{_gtkdocdir} | |
178 | %endif | |
179 | ||
1b04778a | 180 | %find_lang %{name} --with-gnome |
20782b1d AM |
181 | |
182 | %clean | |
183 | rm -rf $RPM_BUILD_ROOT | |
184 | ||
a5373a6b | 185 | %post |
b4e77d9c | 186 | %glib_compile_schemas |
18f8e10b | 187 | %update_icon_cache hicolor |
a5373a6b | 188 | |
18f8e10b | 189 | %postun |
b4e77d9c | 190 | %glib_compile_schemas |
18f8e10b | 191 | %update_icon_cache hicolor |
192 | ||
2f4b9d55 | 193 | %post libs -p /sbin/ldconfig |
194 | %postun libs -p /sbin/ldconfig | |
1609a537 | 195 | |
20782b1d AM |
196 | %files -f %{name}.lang |
197 | %defattr(644,root,root,755) | |
db93419e | 198 | %doc NEWS README.md |
f883acb4 | 199 | %attr(755,root,root) %{_bindir}/devhelp |
1b04778a JB |
200 | %dir %{_datadir}/%{name} |
201 | %{_datadir}/%{name}/assistant | |
202 | # 3 following are data dirs | |
203 | %dir %{_datadir}/%{name}/books | |
204 | %dir %{_datadir}/%{name}/references | |
205 | %dir %{_datadir}/%{name}/specs | |
206 | %{_datadir}/dbus-1/services/org.gnome.Devhelp.service | |
b4e77d9c | 207 | %{_datadir}/glib-2.0/schemas/org.gnome.devhelp.gschema.xml |
1b04778a | 208 | %{_datadir}/glib-2.0/schemas/org.gnome.libdevhelp-3.gschema.xml |
9c5bfbbd | 209 | %{_datadir}/metainfo/org.gnome.Devhelp.appdata.xml |
1b04778a JB |
210 | %{_desktopdir}/org.gnome.Devhelp.desktop |
211 | %{_iconsdir}/hicolor/scalable/apps/org.gnome.Devhelp.svg | |
212 | %{_iconsdir}/hicolor/symbolic/apps/org.gnome.Devhelp-symbolic.svg | |
2f9a8381 | 213 | %{_mandir}/man1/devhelp.1* |
1609a537 | 214 | |
64a66d5b | 215 | %files libs |
216 | %defattr(644,root,root,755) | |
2153a520 | 217 | %attr(755,root,root) %{_libdir}/libdevhelp-3.so.*.*.* |
1b04778a | 218 | %attr(755,root,root) %ghost %{_libdir}/libdevhelp-3.so.6 |
38bceebd | 219 | %{_libdir}/girepository-1.0/Devhelp-3.0.typelib |
64a66d5b | 220 | |
1609a537 | 221 | %files devel |
222 | %defattr(644,root,root,755) | |
2153a520 | 223 | %attr(755,root,root) %{_libdir}/libdevhelp-3.so |
38bceebd | 224 | %{_datadir}/gir-1.0/Devhelp-3.0.gir |
2153a520 | 225 | %{_pkgconfigdir}/libdevhelp-3.0.pc |
1b04778a | 226 | %{_includedir}/devhelp-3 |
1609a537 | 227 | |
67b3e91e | 228 | %if %{with static_libs} |
1609a537 | 229 | %files static |
230 | %defattr(644,root,root,755) | |
2153a520 | 231 | %{_libdir}/libdevhelp-3.a |
67b3e91e | 232 | %endif |
e7c0fa80 | 233 | |
38bceebd MB |
234 | %if %{with apidocs} |
235 | %files apidocs | |
236 | %defattr(644,root,root,755) | |
237 | %{_gtkdocdir}/devhelp-3 | |
238 | %endif | |
239 | ||
edc99078 JB |
240 | %files -n emacs-devhelp |
241 | %defattr(644,root,root,755) | |
242 | %{_datadir}/emacs/site-lisp/devhelp.el | |
243 | ||
c1597d56 | 244 | %files -n gedit-plugin-devhelp |
e7c0fa80 | 245 | %defattr(644,root,root,755) |
2153a520 | 246 | %{_libdir}/gedit/plugins/devhelp.plugin |
39f04eae | 247 | %{_libdir}/gedit/plugins/devhelp.py |
1b04778a | 248 | %{_libdir}/gedit/plugins/__pycache__/devhelp.cpython-*.py[co] |
edc99078 JB |
249 | |
250 | %files -n vim-plugin-devhelp | |
251 | %defattr(644,root,root,755) | |
252 | %{_datadir}/vim/vimfiles/plugin/devhelp.vim |