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