]>
Commit | Line | Data |
---|---|---|
3a1dfbe2 | 1 | # |
38bceebd MB |
2 | # Conditional build: |
3 | %bcond_without apidocs # disable gtk-doc | |
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 |
b12a556c | 9 | Version: 3.38.1 |
960ebbdc | 10 | Release: 1 |
0328db91 | 11 | License: GPL v2+ |
20782b1d | 12 | Group: X11/Applications |
b12a556c JB |
13 | Source0: https://download.gnome.org/sources/devhelp/3.38/%{name}-%{version}.tar.xz |
14 | # Source0-md5: ec7631b34d7017cb5a8b5f5b23fa2b1a | |
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 |
0192a9ae | 29 | BuildRequires: rpm-pythonprov |
b12a556c | 30 | BuildRequires: rpmbuild(macros) >= 1.752 |
1b04778a | 31 | BuildRequires: sed >= 4.0 |
edc65cdd MB |
32 | BuildRequires: tar >= 1:1.22 |
33 | BuildRequires: xz | |
16f64fd4 | 34 | Requires(post,postun): gtk-update-icon-cache |
64a66d5b | 35 | Requires: %{name}-libs = %{version}-%{release} |
1b04778a | 36 | Requires: amtk >= 5.0 |
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 | ||
c1597d56 | 102 | %package -n gedit-plugin-devhelp |
e7c0fa80 | 103 | Summary: Devhelp plugin for Gedit editor |
4188d237 | 104 | Summary(pl.UTF-8): Wtyczka devhelpa dla edytora Gedit |
1cf29e7b | 105 | Group: X11/Applications |
249ab429 | 106 | Requires: %{name} = %{version}-%{release} |
c394ba8c JB |
107 | # python3 based gedit |
108 | Requires: gedit >= 3.8 | |
b4e77d9c | 109 | Requires: libpeas-loader-python3 |
c394ba8c JB |
110 | Requires: python3 >= 1:3.3 |
111 | Requires: python3-pygobject3 >= 3 | |
8777def3 | 112 | Obsoletes: gedit2-plugin-devhelp |
e7c0fa80 | 113 | |
c1597d56 | 114 | %description -n gedit-plugin-devhelp |
d088438f | 115 | Plugin that allows to browse API documentation in Gedit. |
e7c0fa80 | 116 | |
c1597d56 | 117 | %description -n gedit-plugin-devhelp -l pl.UTF-8 |
d088438f | 118 | Wtyczka umożliwiająca przeglądanie dokumentacji API w edytorze Gedit. |
e7c0fa80 | 119 | |
20782b1d AM |
120 | %prep |
121 | %setup -q | |
c145ed5a | 122 | %patch0 -p1 |
1b04778a JB |
123 | |
124 | %if %{with static_libs} | |
7eb0b29c | 125 | %{__sed} -i '/libdevhelp_shared_lib = / s/shared_library/library/' devhelp/meson.build |
1b04778a | 126 | %endif |
20782b1d AM |
127 | |
128 | %build | |
1b04778a JB |
129 | %meson build \ |
130 | %{?with_apidocs:-Dgtk_doc=true} | |
131 | ||
132 | %ninja_build -C build | |
20782b1d AM |
133 | |
134 | %install | |
135 | rm -rf $RPM_BUILD_ROOT | |
b4e77d9c | 136 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/{books,references,specs} |
20782b1d | 137 | |
1b04778a | 138 | %ninja_install -C build |
20782b1d | 139 | |
1b04778a JB |
140 | %py3_comp $RPM_BUILD_ROOT%{_libdir}/gedit/plugins |
141 | %py3_ocomp $RPM_BUILD_ROOT%{_libdir}/gedit/plugins | |
2dc813cf | 142 | |
1b04778a | 143 | %find_lang %{name} --with-gnome |
20782b1d AM |
144 | |
145 | %clean | |
146 | rm -rf $RPM_BUILD_ROOT | |
147 | ||
a5373a6b | 148 | %post |
b4e77d9c | 149 | %glib_compile_schemas |
18f8e10b | 150 | %update_icon_cache hicolor |
a5373a6b | 151 | |
18f8e10b | 152 | %postun |
b4e77d9c | 153 | %glib_compile_schemas |
18f8e10b | 154 | %update_icon_cache hicolor |
155 | ||
2f4b9d55 | 156 | %post libs -p /sbin/ldconfig |
157 | %postun libs -p /sbin/ldconfig | |
1609a537 | 158 | |
20782b1d AM |
159 | %files -f %{name}.lang |
160 | %defattr(644,root,root,755) | |
7eb0b29c | 161 | %doc AUTHORS NEWS README.md TODO |
f883acb4 | 162 | %attr(755,root,root) %{_bindir}/devhelp |
1b04778a JB |
163 | %dir %{_datadir}/%{name} |
164 | %{_datadir}/%{name}/assistant | |
165 | # 3 following are data dirs | |
166 | %dir %{_datadir}/%{name}/books | |
167 | %dir %{_datadir}/%{name}/references | |
168 | %dir %{_datadir}/%{name}/specs | |
169 | %{_datadir}/dbus-1/services/org.gnome.Devhelp.service | |
b4e77d9c | 170 | %{_datadir}/glib-2.0/schemas/org.gnome.devhelp.gschema.xml |
1b04778a | 171 | %{_datadir}/glib-2.0/schemas/org.gnome.libdevhelp-3.gschema.xml |
9c5bfbbd | 172 | %{_datadir}/metainfo/org.gnome.Devhelp.appdata.xml |
1b04778a JB |
173 | %{_desktopdir}/org.gnome.Devhelp.desktop |
174 | %{_iconsdir}/hicolor/scalable/apps/org.gnome.Devhelp.svg | |
175 | %{_iconsdir}/hicolor/symbolic/apps/org.gnome.Devhelp-symbolic.svg | |
2f9a8381 | 176 | %{_mandir}/man1/devhelp.1* |
1609a537 | 177 | |
64a66d5b | 178 | %files libs |
179 | %defattr(644,root,root,755) | |
2153a520 | 180 | %attr(755,root,root) %{_libdir}/libdevhelp-3.so.*.*.* |
1b04778a | 181 | %attr(755,root,root) %ghost %{_libdir}/libdevhelp-3.so.6 |
38bceebd | 182 | %{_libdir}/girepository-1.0/Devhelp-3.0.typelib |
64a66d5b | 183 | |
1609a537 | 184 | %files devel |
185 | %defattr(644,root,root,755) | |
2153a520 | 186 | %attr(755,root,root) %{_libdir}/libdevhelp-3.so |
38bceebd | 187 | %{_datadir}/gir-1.0/Devhelp-3.0.gir |
2153a520 | 188 | %{_pkgconfigdir}/libdevhelp-3.0.pc |
1b04778a | 189 | %{_includedir}/devhelp-3 |
1609a537 | 190 | |
67b3e91e | 191 | %if %{with static_libs} |
1609a537 | 192 | %files static |
193 | %defattr(644,root,root,755) | |
2153a520 | 194 | %{_libdir}/libdevhelp-3.a |
67b3e91e | 195 | %endif |
e7c0fa80 | 196 | |
38bceebd MB |
197 | %if %{with apidocs} |
198 | %files apidocs | |
199 | %defattr(644,root,root,755) | |
200 | %{_gtkdocdir}/devhelp-3 | |
201 | %endif | |
202 | ||
c1597d56 | 203 | %files -n gedit-plugin-devhelp |
e7c0fa80 | 204 | %defattr(644,root,root,755) |
2153a520 | 205 | %{_libdir}/gedit/plugins/devhelp.plugin |
39f04eae | 206 | %{_libdir}/gedit/plugins/devhelp.py |
1b04778a | 207 | %{_libdir}/gedit/plugins/__pycache__/devhelp.cpython-*.py[co] |