]>
Commit | Line | Data |
---|---|---|
3a1dfbe2 | 1 | # |
38bceebd | 2 | # Conditional build: |
054ddfee | 3 | %bcond_without apidocs # gi-docgen 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 |
674ae196 | 9 | Version: 43.0 |
960ebbdc | 10 | Release: 1 |
0328db91 | 11 | License: GPL v2+ |
20782b1d | 12 | Group: X11/Applications |
674ae196 JB |
13 | Source0: https://download.gnome.org/sources/devhelp/43/%{name}-%{version}.tar.xz |
14 | # Source0-md5: 14b56884ae13c4ad7d87036a65b9eaed | |
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 |
674ae196 JB |
23 | # gtk-webkit4-devel >= 2.26 possible as fallback |
24 | BuildRequires: gtk-webkit4.1-devel >= 2.34 | |
25 | BuildRequires: meson >= 0.57 | |
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 |
98012da6 | 31 | BuildRequires: rpmbuild(macros) >= 2.029 |
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 |
674ae196 | 54 | Requires: gtk-webkit4.1 >= 2.34 |
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 |
674ae196 | 69 | Requires: gtk-webkit4.1-devel >= 2.34 |
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 | |
16ecf66e | 93 | BuildArch: noarch |
38bceebd MB |
94 | |
95 | %description apidocs | |
96 | Devhelp API documetation. | |
97 | ||
98 | %description apidocs -l pl.UTF-8 | |
99 | Dokumentacja API Devhelp. | |
100 | ||
edc99078 JB |
101 | %package -n emacs-devhelp |
102 | Summary: Emacs integration for Devhelp | |
103 | Summary(pl.UTF-8): Integracja Emacsa z Devhelpem | |
104 | Group: Applications/Editors | |
105 | Requires: %{name} = %{version}-%{release} | |
106 | Requires: emacs-common | |
107 | BuildArch: noarch | |
108 | ||
109 | %description -n emacs-devhelp | |
110 | Emacs integration for Devhelp. | |
111 | ||
112 | %description -n emacs-devhelp -l pl.UTF-8 | |
113 | Integracja Emacsa z Devhelpem. | |
114 | ||
c1597d56 | 115 | %package -n gedit-plugin-devhelp |
e7c0fa80 | 116 | Summary: Devhelp plugin for Gedit editor |
4188d237 | 117 | Summary(pl.UTF-8): Wtyczka devhelpa dla edytora Gedit |
1cf29e7b | 118 | Group: X11/Applications |
249ab429 | 119 | Requires: %{name} = %{version}-%{release} |
c394ba8c JB |
120 | # python3 based gedit |
121 | Requires: gedit >= 3.8 | |
b4e77d9c | 122 | Requires: libpeas-loader-python3 |
c394ba8c JB |
123 | Requires: python3 >= 1:3.3 |
124 | Requires: python3-pygobject3 >= 3 | |
58979d7b | 125 | Obsoletes: gedit2-plugin-devhelp < 3.4.1-2 |
e7c0fa80 | 126 | |
c1597d56 | 127 | %description -n gedit-plugin-devhelp |
d088438f | 128 | Plugin that allows to browse API documentation in Gedit. |
e7c0fa80 | 129 | |
c1597d56 | 130 | %description -n gedit-plugin-devhelp -l pl.UTF-8 |
d088438f | 131 | Wtyczka umożliwiająca przeglądanie dokumentacji API w edytorze Gedit. |
e7c0fa80 | 132 | |
edc99078 JB |
133 | %package -n vim-plugin-devhelp |
134 | Summary: Vim integration for Devhelp | |
135 | Summary(pl.UTF-8): Integracja Vima z Devhelpem | |
136 | Group: Applications/Editors | |
137 | Requires: %{name} = %{version}-%{release} | |
138 | Requires: vim-rt | |
139 | BuildArch: noarch | |
140 | ||
141 | %description -n vim-plugin-devhelp | |
142 | Vim integration for Devhelp. | |
143 | ||
144 | %description -n vim-plugin-devhelp -l pl.UTF-8 | |
145 | Integracja Vima z Devhelpem. | |
146 | ||
20782b1d AM |
147 | %prep |
148 | %setup -q | |
c145ed5a | 149 | %patch0 -p1 |
1b04778a JB |
150 | |
151 | %if %{with static_libs} | |
7eb0b29c | 152 | %{__sed} -i '/libdevhelp_shared_lib = / s/shared_library/library/' devhelp/meson.build |
1b04778a | 153 | %endif |
20782b1d AM |
154 | |
155 | %build | |
1b04778a | 156 | %meson build \ |
edc99078 JB |
157 | %{?with_apidocs:-Dgtk_doc=true} \ |
158 | -Dplugin_emacs=true \ | |
159 | -Dplugin_gedit=true \ | |
160 | -Dplugin_vim=true | |
1b04778a JB |
161 | |
162 | %ninja_build -C build | |
20782b1d AM |
163 | |
164 | %install | |
165 | rm -rf $RPM_BUILD_ROOT | |
b4e77d9c | 166 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/{books,references,specs} |
20782b1d | 167 | |
1b04778a | 168 | %ninja_install -C build |
20782b1d | 169 | |
1b04778a JB |
170 | %py3_comp $RPM_BUILD_ROOT%{_libdir}/gedit/plugins |
171 | %py3_ocomp $RPM_BUILD_ROOT%{_libdir}/gedit/plugins | |
2dc813cf | 172 | |
db93419e | 173 | %if %{with apidocs} |
98012da6 JB |
174 | install -d $RPM_BUILD_ROOT%{_gidocdir} |
175 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/devhelp-3 $RPM_BUILD_ROOT%{_gidocdir} | |
db93419e JB |
176 | %endif |
177 | ||
1b04778a | 178 | %find_lang %{name} --with-gnome |
20782b1d AM |
179 | |
180 | %clean | |
181 | rm -rf $RPM_BUILD_ROOT | |
182 | ||
a5373a6b | 183 | %post |
b4e77d9c | 184 | %glib_compile_schemas |
18f8e10b | 185 | %update_icon_cache hicolor |
a5373a6b | 186 | |
18f8e10b | 187 | %postun |
b4e77d9c | 188 | %glib_compile_schemas |
18f8e10b | 189 | %update_icon_cache hicolor |
190 | ||
2f4b9d55 | 191 | %post libs -p /sbin/ldconfig |
192 | %postun libs -p /sbin/ldconfig | |
1609a537 | 193 | |
20782b1d AM |
194 | %files -f %{name}.lang |
195 | %defattr(644,root,root,755) | |
db93419e | 196 | %doc NEWS README.md |
f883acb4 | 197 | %attr(755,root,root) %{_bindir}/devhelp |
1b04778a JB |
198 | %dir %{_datadir}/%{name} |
199 | %{_datadir}/%{name}/assistant | |
200 | # 3 following are data dirs | |
201 | %dir %{_datadir}/%{name}/books | |
202 | %dir %{_datadir}/%{name}/references | |
203 | %dir %{_datadir}/%{name}/specs | |
204 | %{_datadir}/dbus-1/services/org.gnome.Devhelp.service | |
b4e77d9c | 205 | %{_datadir}/glib-2.0/schemas/org.gnome.devhelp.gschema.xml |
1b04778a | 206 | %{_datadir}/glib-2.0/schemas/org.gnome.libdevhelp-3.gschema.xml |
9c5bfbbd | 207 | %{_datadir}/metainfo/org.gnome.Devhelp.appdata.xml |
1b04778a JB |
208 | %{_desktopdir}/org.gnome.Devhelp.desktop |
209 | %{_iconsdir}/hicolor/scalable/apps/org.gnome.Devhelp.svg | |
210 | %{_iconsdir}/hicolor/symbolic/apps/org.gnome.Devhelp-symbolic.svg | |
2f9a8381 | 211 | %{_mandir}/man1/devhelp.1* |
1609a537 | 212 | |
64a66d5b | 213 | %files libs |
214 | %defattr(644,root,root,755) | |
2153a520 | 215 | %attr(755,root,root) %{_libdir}/libdevhelp-3.so.*.*.* |
1b04778a | 216 | %attr(755,root,root) %ghost %{_libdir}/libdevhelp-3.so.6 |
38bceebd | 217 | %{_libdir}/girepository-1.0/Devhelp-3.0.typelib |
64a66d5b | 218 | |
1609a537 | 219 | %files devel |
220 | %defattr(644,root,root,755) | |
2153a520 | 221 | %attr(755,root,root) %{_libdir}/libdevhelp-3.so |
38bceebd | 222 | %{_datadir}/gir-1.0/Devhelp-3.0.gir |
2153a520 | 223 | %{_pkgconfigdir}/libdevhelp-3.0.pc |
1b04778a | 224 | %{_includedir}/devhelp-3 |
1609a537 | 225 | |
67b3e91e | 226 | %if %{with static_libs} |
1609a537 | 227 | %files static |
228 | %defattr(644,root,root,755) | |
2153a520 | 229 | %{_libdir}/libdevhelp-3.a |
67b3e91e | 230 | %endif |
e7c0fa80 | 231 | |
38bceebd MB |
232 | %if %{with apidocs} |
233 | %files apidocs | |
234 | %defattr(644,root,root,755) | |
98012da6 | 235 | %{_gidocdir}/devhelp-3 |
38bceebd MB |
236 | %endif |
237 | ||
edc99078 JB |
238 | %files -n emacs-devhelp |
239 | %defattr(644,root,root,755) | |
240 | %{_datadir}/emacs/site-lisp/devhelp.el | |
241 | ||
c1597d56 | 242 | %files -n gedit-plugin-devhelp |
e7c0fa80 | 243 | %defattr(644,root,root,755) |
2153a520 | 244 | %{_libdir}/gedit/plugins/devhelp.plugin |
39f04eae | 245 | %{_libdir}/gedit/plugins/devhelp.py |
1b04778a | 246 | %{_libdir}/gedit/plugins/__pycache__/devhelp.cpython-*.py[co] |
edc99078 JB |
247 | |
248 | %files -n vim-plugin-devhelp | |
249 | %defattr(644,root,root,755) | |
250 | %{_datadir}/vim/vimfiles/plugin/devhelp.vim |