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/5.0/gtksourceview-%{version}.tar.xz
15 # Source0-md5: 5e2241325697706341b5f6e6edba617e
16 URL: https://wiki.gnome.org/Projects/GtkSourceView
17 BuildRequires: docbook-dtd412-xml
18 BuildRequires: fribidi-devel >= 0.19.7
19 BuildRequires: gettext-tools >= 0.19.4
20 BuildRequires: glib2-devel >= 1:2.66
21 BuildRequires: gobject-introspection-devel >= 1.42.0
22 BuildRequires: gtk4-devel >= 4.1
23 %{?with_apidocs:BuildRequires: gtk-doc >= 1.25}
24 BuildRequires: itstool
25 BuildRequires: libxml2-devel >= 1:2.6.31
26 BuildRequires: meson >= 0.53.0
27 BuildRequires: ninja >= 1.5
28 BuildRequires: pcre2-8-devel >= 10.21
29 BuildRequires: pkgconfig
30 BuildRequires: rpm-build >= 4.6
31 BuildRequires: rpm-pythonprov
32 BuildRequires: rpmbuild(macros) >= 1.736
33 BuildRequires: sed >= 4.0
34 BuildRequires: tar >= 1:1.22
37 Requires: fribidi >= 0.19.7
38 Requires: glib2 >= 1:2.66
40 Requires: libxml2 >= 1:2.6.31
41 Requires: pcre2-8 >= 10.21
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 GtkSourceView is a text widget that extends the standard GTK+ 3.x text
46 widget GtkTextView. It improves GtkTextView by implementing syntax
47 highlighting and other features typical of a source editor.
49 %description -l pl.UTF-8
50 GtkSourceView to widget tekstowy rozszerzający standardowy widget
51 tekstowy GtkTextView z GTK+ 3.x. Ulepsza GtkTextView poprzez
52 zaimplementowanie podświetlania składni i innych możliwości typowych
56 Summary: Header files for GtkSourceView
57 Summary(pl.UTF-8): Pliki nagłówkowe dla GtkSourceView
58 Group: X11/Development/Libraries
59 Requires: %{name} = %{version}-%{release}
60 Requires: fribidi-devel >= 0.19.7
61 Requires: glib2-devel >= 1:2.66
62 Requires: gtk4-devel >= 4.1
63 Requires: libxml2-devel >= 1:2.6.31
64 Requires: pcre2-8-devel >= 10.21
67 Header files for GtkSourceView.
69 %description devel -l pl.UTF-8
70 Pliki nagłówkowe dla GtkSourceView.
73 Summary: Static GtkSourceView library
74 Summary(pl.UTF-8): Statyczna biblioteka GtkSourceView
75 Group: X11/Development/Libraries
76 Requires: %{name}-devel = %{version}-%{release}
79 Static GtkSourceView library.
81 %description static -l pl.UTF-8
82 Statyczna biblioteka GtkSourceView.
85 Summary: GtkSourceView API documentation
86 Summary(pl.UTF-8): Dokumentacja API GtkSourceView
88 Requires: gtk-doc-common
92 GtkSourceView API documentation.
94 %description apidocs -l pl.UTF-8
95 Dokumentacja API GtkSourceView.
97 %package -n vala-gtksourceview5
98 Summary: GtkSourceView API for Vala language
99 Summary(pl.UTF-8): API GtkSourceView dla języka Vala
100 Group: Development/Libraries
101 Requires: %{name}-devel = %{version}-%{release}
105 %description -n vala-gtksourceview5
106 GtkSourceView API for Vala language.
108 %description -n vala-gtksourceview5 -l pl.UTF-8
109 API GtkSourceView dla języka Vala.
112 %setup -q -n gtksourceview-%{version}
114 %if %{with static_libs}
115 %{__sed} -i -e 's/gtksource_lib = shared_library/gtksource_lib = library/' gtksourceview/meson.build
120 %{?with_apidocs:-Dgtk_doc=true}
122 %ninja_build -C build
125 rm -rf $RPM_BUILD_ROOT
127 %ninja_install -C build
129 %find_lang gtksourceview-5
132 rm -rf $RPM_BUILD_ROOT
134 %post -p /sbin/ldconfig
135 %postun -p /sbin/ldconfig
137 %files -f gtksourceview-5.lang
138 %defattr(644,root,root,755)
139 %attr(755,root,root) %{_libdir}/libgtksourceview-5.so.*.*.*
140 %attr(755,root,root) %ghost %{_libdir}/libgtksourceview-5.so.0
141 %{_datadir}/gtksourceview-5
142 %{_libdir}/girepository-1.0/GtkSource-5.typelib
143 %{_iconsdir}/hicolor/scalable/actions/completion-*-symbolic.svg
144 %{_iconsdir}/hicolor/scalable/actions/lang-*-symbolic.svg
147 %defattr(644,root,root,755)
148 %attr(755,root,root) %{_libdir}/libgtksourceview-5.so
149 %{_includedir}/gtksourceview-5
150 %{_pkgconfigdir}/gtksourceview-5.pc
151 %{_datadir}/gir-1.0/GtkSource-5.gir
153 %if %{with static_libs}
155 %defattr(644,root,root,755)
156 %{_libdir}/libgtksourceview-5.a
161 %defattr(644,root,root,755)
162 %{_gtkdocdir}/gtksourceview-5.0
166 %files -n vala-gtksourceview5
167 %defattr(644,root,root,755)
168 %{_datadir}/vala/vapi/gtksourceview-5.deps
169 %{_datadir}/vala/vapi/gtksourceview-5.vapi