3 %bcond_without apidocs # API documentation
4 %bcond_without static_libs # static library
5 %bcond_with sysprof # sysprof profiler support
6 %bcond_without vala # do not build Vala API
8 Summary: Text widget that extends the standard GTK+ 3.x
9 Summary(pl.UTF-8): Widget tekstowy rozszerzający standardowy z GTK+ 3.x
13 License: LGPL v2+ (library), GPL v2+ (some language specs files)
15 Source0: https://download.gnome.org/sources/gtksourceview/5.2/gtksourceview-%{version}.tar.xz
16 # Source0-md5: 0258374209704cc595b00000e93e3c4d
17 URL: https://wiki.gnome.org/Projects/GtkSourceView
18 BuildRequires: docbook-dtd412-xml
19 BuildRequires: fribidi-devel >= 0.19.7
20 BuildRequires: gettext-tools >= 0.19.4
21 BuildRequires: glib2-devel >= 1:2.66
22 BuildRequires: gobject-introspection-devel >= 1.42.0
23 BuildRequires: gtk4-devel >= 4.2
24 %{?with_apidocs:BuildRequires: gtk-doc >= 1.25}
25 BuildRequires: itstool
26 BuildRequires: libxml2-devel >= 1:2.6.31
27 BuildRequires: meson >= 0.53.0
28 BuildRequires: ninja >= 1.5
29 BuildRequires: pcre2-8-devel >= 10.21
30 BuildRequires: pkgconfig
31 BuildRequires: rpm-build >= 4.6
32 BuildRequires: rpm-pythonprov
33 BuildRequires: rpmbuild(macros) >= 1.736
34 BuildRequires: sed >= 4.0
35 %{?with_sysprof:BuildRequires: sysprof-devel >= 3.38}
36 BuildRequires: tar >= 1:1.22
39 Requires: fribidi >= 0.19.7
40 Requires: glib2 >= 1:2.66
42 Requires: libxml2 >= 1:2.6.31
43 Requires: pcre2-8 >= 10.21
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 GtkSourceView is a text widget that extends the standard GTK+ 3.x text
48 widget GtkTextView. It improves GtkTextView by implementing syntax
49 highlighting and other features typical of a source editor.
51 %description -l pl.UTF-8
52 GtkSourceView to widget tekstowy rozszerzający standardowy widget
53 tekstowy GtkTextView z GTK+ 3.x. Ulepsza GtkTextView poprzez
54 zaimplementowanie podświetlania składni i innych możliwości typowych
58 Summary: Header files for GtkSourceView
59 Summary(pl.UTF-8): Pliki nagłówkowe dla GtkSourceView
60 Group: X11/Development/Libraries
61 Requires: %{name} = %{version}-%{release}
62 Requires: fribidi-devel >= 0.19.7
63 Requires: glib2-devel >= 1:2.66
64 Requires: gtk4-devel >= 4.2
65 Requires: libxml2-devel >= 1:2.6.31
66 Requires: pcre2-8-devel >= 10.21
69 Header files for GtkSourceView.
71 %description devel -l pl.UTF-8
72 Pliki nagłówkowe dla GtkSourceView.
75 Summary: Static GtkSourceView library
76 Summary(pl.UTF-8): Statyczna biblioteka GtkSourceView
77 Group: X11/Development/Libraries
78 Requires: %{name}-devel = %{version}-%{release}
81 Static GtkSourceView library.
83 %description static -l pl.UTF-8
84 Statyczna biblioteka GtkSourceView.
87 Summary: GtkSourceView API documentation
88 Summary(pl.UTF-8): Dokumentacja API GtkSourceView
90 Requires: gtk-doc-common
94 GtkSourceView API documentation.
96 %description apidocs -l pl.UTF-8
97 Dokumentacja API GtkSourceView.
99 %package -n vala-gtksourceview5
100 Summary: GtkSourceView API for Vala language
101 Summary(pl.UTF-8): API GtkSourceView dla języka Vala
102 Group: Development/Libraries
103 Requires: %{name}-devel = %{version}-%{release}
107 %description -n vala-gtksourceview5
108 GtkSourceView API for Vala language.
110 %description -n vala-gtksourceview5 -l pl.UTF-8
111 API GtkSourceView dla języka Vala.
114 %setup -q -n gtksourceview-%{version}
116 %if %{with static_libs}
117 %{__sed} -i -e 's/gtksource_lib = shared_library/gtksource_lib = library/' gtksourceview/meson.build
122 %{?with_apidocs:-Dgtk_doc=true} \
123 %{?with_sysprof:-Dsysprof=true}
125 %ninja_build -C build
128 rm -rf $RPM_BUILD_ROOT
130 %ninja_install -C build
132 %find_lang gtksourceview-5
135 rm -rf $RPM_BUILD_ROOT
137 %post -p /sbin/ldconfig
138 %postun -p /sbin/ldconfig
140 %files -f gtksourceview-5.lang
141 %defattr(644,root,root,755)
142 %attr(755,root,root) %{_libdir}/libgtksourceview-5.so.*.*.*
143 %attr(755,root,root) %ghost %{_libdir}/libgtksourceview-5.so.0
144 %{_datadir}/gtksourceview-5
145 %{_libdir}/girepository-1.0/GtkSource-5.typelib
146 %{_iconsdir}/hicolor/scalable/actions/completion-*-symbolic.svg
147 %{_iconsdir}/hicolor/scalable/actions/lang-*-symbolic.svg
150 %defattr(644,root,root,755)
151 %attr(755,root,root) %{_libdir}/libgtksourceview-5.so
152 %{_includedir}/gtksourceview-5
153 %{_pkgconfigdir}/gtksourceview-5.pc
154 %{_datadir}/gir-1.0/GtkSource-5.gir
156 %if %{with static_libs}
158 %defattr(644,root,root,755)
159 %{_libdir}/libgtksourceview-5.a
164 %defattr(644,root,root,755)
165 %{_gtkdocdir}/gtksourceview-5.0
169 %files -n vala-gtksourceview5
170 %defattr(644,root,root,755)
171 %{_datadir}/vala/vapi/gtksourceview-5.deps
172 %{_datadir}/vala/vapi/gtksourceview-5.vapi