1 # TODO: use gtk4-update-icon-cache
4 %bcond_without apidocs # API documentation
5 %bcond_without static_libs # static library
6 %bcond_with sysprof # sysprof profiler support
7 %bcond_without vala # do not build Vala API
9 Summary: Text widget that extends the standard GTK+ 3.x
10 Summary(pl.UTF-8): Widget tekstowy rozszerzający standardowy z GTK+ 3.x
14 License: LGPL v2+ (library), GPL v2+ (some language specs files)
16 Source0: https://download.gnome.org/sources/gtksourceview/5.8/gtksourceview-%{version}.tar.xz
17 # Source0-md5: 7ea7348d059c210b8bf7428af4ddbcbc
18 Patch0: %{name}-no-update.patch
19 URL: https://wiki.gnome.org/Projects/GtkSourceView
20 BuildRequires: docbook-dtd412-xml
21 BuildRequires: fontconfig-devel
22 BuildRequires: fribidi-devel >= 0.19.7
23 BuildRequires: gettext-tools >= 0.19.4
24 %{?with_apidocs:BuildRequires: gi-docgen}
25 BuildRequires: glib2-devel >= 1:2.72
26 BuildRequires: gobject-introspection-devel >= 1.70.0
27 BuildRequires: gtk4-devel >= 4.6
28 BuildRequires: itstool
29 BuildRequires: libxml2-devel >= 1:2.6.31
30 BuildRequires: meson >= 0.60.0
31 BuildRequires: ninja >= 1.5
32 BuildRequires: pango-devel
33 BuildRequires: pcre2-8-devel >= 10.21
34 BuildRequires: pkgconfig
35 BuildRequires: rpm-build >= 4.6
36 BuildRequires: rpm-pythonprov
37 BuildRequires: rpmbuild(macros) >= 1.736
38 BuildRequires: sed >= 4.0
39 %{?with_sysprof:BuildRequires: sysprof-devel >= 3.38}
40 BuildRequires: tar >= 1:1.22
43 Requires: fribidi >= 0.19.7
44 Requires: glib2 >= 1:2.72
46 Requires: libxml2 >= 1:2.6.31
47 Requires: pcre2-8 >= 10.21
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 GtkSourceView is a text widget that extends the standard GTK+ 3.x text
52 widget GtkTextView. It improves GtkTextView by implementing syntax
53 highlighting and other features typical of a source editor.
55 %description -l pl.UTF-8
56 GtkSourceView to widget tekstowy rozszerzający standardowy widget
57 tekstowy GtkTextView z GTK+ 3.x. Ulepsza GtkTextView poprzez
58 zaimplementowanie podświetlania składni i innych możliwości typowych
62 Summary: Header files for GtkSourceView
63 Summary(pl.UTF-8): Pliki nagłówkowe dla GtkSourceView
64 Group: X11/Development/Libraries
65 Requires: %{name} = %{version}-%{release}
66 Requires: fribidi-devel >= 0.19.7
67 Requires: glib2-devel >= 1:2.72
68 Requires: gtk4-devel >= 4.6
69 Requires: libxml2-devel >= 1:2.6.31
70 Requires: pcre2-8-devel >= 10.21
73 Header files for GtkSourceView.
75 %description devel -l pl.UTF-8
76 Pliki nagłówkowe dla GtkSourceView.
79 Summary: Static GtkSourceView library
80 Summary(pl.UTF-8): Statyczna biblioteka GtkSourceView
81 Group: X11/Development/Libraries
82 Requires: %{name}-devel = %{version}-%{release}
85 Static GtkSourceView library.
87 %description static -l pl.UTF-8
88 Statyczna biblioteka GtkSourceView.
91 Summary: GtkSourceView API documentation
92 Summary(pl.UTF-8): Dokumentacja API GtkSourceView
94 Requires: gtk-doc-common
98 GtkSourceView API documentation.
100 %description apidocs -l pl.UTF-8
101 Dokumentacja API GtkSourceView.
103 %package -n vala-gtksourceview5
104 Summary: GtkSourceView API for Vala language
105 Summary(pl.UTF-8): API GtkSourceView dla języka Vala
106 Group: Development/Libraries
107 Requires: %{name}-devel = %{version}-%{release}
111 %description -n vala-gtksourceview5
112 GtkSourceView API for Vala language.
114 %description -n vala-gtksourceview5 -l pl.UTF-8
115 API GtkSourceView dla języka Vala.
118 %setup -q -n gtksourceview-%{version}
121 %if %{with static_libs}
122 %{__sed} -i -e 's/gtksource_lib = shared_library/gtksource_lib = library/' gtksourceview/meson.build
127 %{?with_apidocs:-Dgtk_doc=true} \
128 %{?with_sysprof:-Dsysprof=true}
130 %ninja_build -C build
133 rm -rf $RPM_BUILD_ROOT
135 %ninja_install -C build
138 # FIXME: where to package gi-docgen generated docs?
139 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
140 %{__mv} $RPM_BUILD_ROOT%{_docdir}/gtksourceview5 $RPM_BUILD_ROOT%{_gtkdocdir}
143 %find_lang gtksourceview-5
146 rm -rf $RPM_BUILD_ROOT
148 %post -p /sbin/ldconfig
149 %postun -p /sbin/ldconfig
151 %files -f gtksourceview-5.lang
152 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_libdir}/libgtksourceview-5.so.*.*.*
154 %attr(755,root,root) %ghost %{_libdir}/libgtksourceview-5.so.0
155 %{_datadir}/gtksourceview-5
156 %{_libdir}/girepository-1.0/GtkSource-5.typelib
157 %{_iconsdir}/hicolor/scalable/actions/completion-*-symbolic.svg
158 %{_iconsdir}/hicolor/scalable/actions/lang-*-symbolic.svg
161 %defattr(644,root,root,755)
162 %attr(755,root,root) %{_libdir}/libgtksourceview-5.so
163 %{_includedir}/gtksourceview-5
164 %{_pkgconfigdir}/gtksourceview-5.pc
165 %{_datadir}/gir-1.0/GtkSource-5.gir
167 %if %{with static_libs}
169 %defattr(644,root,root,755)
170 %{_libdir}/libgtksourceview-5.a
175 %defattr(644,root,root,755)
176 %{_gtkdocdir}/gtksourceview5
180 %files -n vala-gtksourceview5
181 %defattr(644,root,root,755)
182 %{_datadir}/vala/vapi/gtksourceview-5.deps
183 %{_datadir}/vala/vapi/gtksourceview-5.vapi