3 %bcond_without apidocs # API documentation (broken in 4.99)
4 %bcond_without static_libs # static library
5 %bcond_without vala # do not build Vala API
7 Summary: Text widget that extends the standard GTK+ 3.x
8 Summary(pl.UTF-8): Widget tekstowy rozszerzający standardowy z GTK+ 3.x
12 License: LGPL v2+ (library), GPL v2+ (some language specs files)
14 Source0: https://download.gnome.org/sources/gtksourceview/4.99/gtksourceview-%{version}.tar.xz
15 # Source0-md5: 7b7a6f74d2dc459b8687f9bf6ae13bfa
16 Patch0: %{name}-meson.patch
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.62
22 BuildRequires: gobject-introspection-devel >= 1.42.0
23 BuildRequires: gtk4-devel >= 3.99
24 %{?with_apidocs:BuildRequires: gtk-doc >= 1.25}
25 BuildRequires: itstool
26 BuildRequires: libxml2-devel >= 1:2.6.31
27 BuildRequires: meson >= 0.50.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 BuildRequires: tar >= 1:1.22
38 Requires: fribidi >= 0.19.7
39 Requires: glib2 >= 1:2.62
40 Requires: gtk4 >= 3.99
41 Requires: libxml2 >= 1:2.6.31
42 Requires: pcre2-8 >= 10.21
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 GtkSourceView is a text widget that extends the standard GTK+ 3.x text
47 widget GtkTextView. It improves GtkTextView by implementing syntax
48 highlighting and other features typical of a source editor.
50 %description -l pl.UTF-8
51 GtkSourceView to widget tekstowy rozszerzający standardowy widget
52 tekstowy GtkTextView z GTK+ 3.x. Ulepsza GtkTextView poprzez
53 zaimplementowanie podświetlania składni i innych możliwości typowych
57 Summary: Header files for GtkSourceView
58 Summary(pl.UTF-8): Pliki nagłówkowe dla GtkSourceView
59 Group: X11/Development/Libraries
60 Requires: %{name} = %{version}-%{release}
61 Requires: fribidi-devel >= 0.19.7
62 Requires: glib2-devel >= 1:2.62
63 Requires: gtk4-devel >= 3.99
64 Requires: libxml2-devel >= 1:2.6.31
65 Requires: pcre2-8-devel >= 10.21
68 Header files for GtkSourceView.
70 %description devel -l pl.UTF-8
71 Pliki nagłówkowe dla GtkSourceView.
74 Summary: Static GtkSourceView library
75 Summary(pl.UTF-8): Statyczna biblioteka GtkSourceView
76 Group: X11/Development/Libraries
77 Requires: %{name}-devel = %{version}-%{release}
80 Static GtkSourceView library.
82 %description static -l pl.UTF-8
83 Statyczna biblioteka GtkSourceView.
86 Summary: GtkSourceView API documentation
87 Summary(pl.UTF-8): Dokumentacja API GtkSourceView
89 Requires: gtk-doc-common
93 GtkSourceView API documentation.
95 %description apidocs -l pl.UTF-8
96 Dokumentacja API GtkSourceView.
98 %package -n vala-gtksourceview5
99 Summary: GtkSourceView API for Vala language
100 Summary(pl.UTF-8): API GtkSourceView dla języka Vala
101 Group: Development/Libraries
102 Requires: %{name}-devel = %{version}-%{release}
106 %description -n vala-gtksourceview5
107 GtkSourceView API for Vala language.
109 %description -n vala-gtksourceview5 -l pl.UTF-8
110 API GtkSourceView dla języka Vala.
113 %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}
124 %ninja_build -C build
127 rm -rf $RPM_BUILD_ROOT
129 %ninja_install -C build
131 %find_lang gtksourceview-5
134 rm -rf $RPM_BUILD_ROOT
136 %post -p /sbin/ldconfig
137 %postun -p /sbin/ldconfig
139 %files -f gtksourceview-5.lang
140 %defattr(644,root,root,755)
141 %attr(755,root,root) %{_libdir}/libgtksourceview-5.so.*.*.*
142 %attr(755,root,root) %ghost %{_libdir}/libgtksourceview-5.so.0
143 %{_datadir}/gtksourceview-5
144 %{_libdir}/girepository-1.0/GtkSource-5.typelib
145 %{_iconsdir}/hicolor/scalable/actions/completion-*-symbolic.svg
146 %{_iconsdir}/hicolor/scalable/actions/lang-*-symbolic.svg
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_libdir}/libgtksourceview-5.so
151 %{_includedir}/gtksourceview-5
152 %{_pkgconfigdir}/gtksourceview-5.pc
153 %{_datadir}/gir-1.0/GtkSource-5.gir
155 %if %{with static_libs}
157 %defattr(644,root,root,755)
158 %{_libdir}/libgtksourceview-5.a
163 %defattr(644,root,root,755)
164 %{_gtkdocdir}/gtksourceview-5.0
168 %files -n vala-gtksourceview5
169 %defattr(644,root,root,755)
170 %{_datadir}/vala/vapi/gtksourceview-5.deps
171 %{_datadir}/vala/vapi/gtksourceview-5.vapi