]>
Commit | Line | Data |
---|---|---|
fa593225 | 1 | # TODO: use gtk4-update-icon-cache |
896eb13d MB |
2 | # |
3 | # Conditional build: | |
b02f970b | 4 | %bcond_without apidocs # API documentation |
349c23b4 | 5 | %bcond_without static_libs # static library |
b02f970b | 6 | %bcond_with sysprof # sysprof profiler support |
349c23b4 | 7 | %bcond_without vala # do not build Vala API |
4564cf84 | 8 | |
44df7ec3 AF |
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 | |
fa1469d8 | 11 | Name: gtksourceview5 |
4a0ef04c | 12 | Version: 5.4.2 |
b2467359 | 13 | Release: 1 |
2a83e144 | 14 | License: LGPL v2+ (library), GPL v2+ (some language specs files) |
44df7ec3 | 15 | Group: X11/Libraries |
9cbed56f | 16 | Source0: https://download.gnome.org/sources/gtksourceview/5.4/gtksourceview-%{version}.tar.xz |
4a0ef04c | 17 | # Source0-md5: f0cba1f8f0552cb98f0b247bea3b1651 |
fa593225 | 18 | Patch0: %{name}-no-update.patch |
71b49bd9 | 19 | URL: https://wiki.gnome.org/Projects/GtkSourceView |
44df7ec3 | 20 | BuildRequires: docbook-dtd412-xml |
9cbed56f | 21 | BuildRequires: fontconfig-devel |
349c23b4 | 22 | BuildRequires: fribidi-devel >= 0.19.7 |
ede2878d | 23 | BuildRequires: gettext-tools >= 0.19.4 |
9cbed56f JB |
24 | %{?with_apidocs:BuildRequires: gi-docgen} |
25 | BuildRequires: glib2-devel >= 1:2.70 | |
26 | BuildRequires: gobject-introspection-devel >= 1.70.0 | |
27 | BuildRequires: gtk4-devel >= 4.5 | |
0b911454 | 28 | BuildRequires: itstool |
44df7ec3 | 29 | BuildRequires: libxml2-devel >= 1:2.6.31 |
9cbed56f | 30 | BuildRequires: meson >= 0.59.0 |
349c23b4 | 31 | BuildRequires: ninja >= 1.5 |
9cbed56f | 32 | BuildRequires: pango-devel |
fa1469d8 | 33 | BuildRequires: pcre2-8-devel >= 10.21 |
44df7ec3 | 34 | BuildRequires: pkgconfig |
d1fa7142 | 35 | BuildRequires: rpm-build >= 4.6 |
44df7ec3 | 36 | BuildRequires: rpm-pythonprov |
79ee4bba | 37 | BuildRequires: rpmbuild(macros) >= 1.736 |
349c23b4 | 38 | BuildRequires: sed >= 4.0 |
b02f970b | 39 | %{?with_sysprof:BuildRequires: sysprof-devel >= 3.38} |
67ae3529 | 40 | BuildRequires: tar >= 1:1.22 |
f5853990 | 41 | BuildRequires: vala |
67ae3529 | 42 | BuildRequires: xz |
349c23b4 | 43 | Requires: fribidi >= 0.19.7 |
9cbed56f JB |
44 | Requires: glib2 >= 1:2.70 |
45 | Requires: gtk4 >= 4.5 | |
6a1741b2 | 46 | Requires: libxml2 >= 1:2.6.31 |
fa1469d8 | 47 | Requires: pcre2-8 >= 10.21 |
44df7ec3 AF |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
49 | ||
50 | %description | |
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. | |
54 | ||
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 | |
59 | dla edytora źródeł. | |
60 | ||
44df7ec3 AF |
61 | %package devel |
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} | |
349c23b4 | 66 | Requires: fribidi-devel >= 0.19.7 |
9cbed56f JB |
67 | Requires: glib2-devel >= 1:2.70 |
68 | Requires: gtk4-devel >= 4.5 | |
44df7ec3 | 69 | Requires: libxml2-devel >= 1:2.6.31 |
fa1469d8 | 70 | Requires: pcre2-8-devel >= 10.21 |
44df7ec3 AF |
71 | |
72 | %description devel | |
73 | Header files for GtkSourceView. | |
74 | ||
75 | %description devel -l pl.UTF-8 | |
76 | Pliki nagłówkowe dla GtkSourceView. | |
77 | ||
78 | %package static | |
79 | Summary: Static GtkSourceView library | |
80 | Summary(pl.UTF-8): Statyczna biblioteka GtkSourceView | |
81 | Group: X11/Development/Libraries | |
82 | Requires: %{name}-devel = %{version}-%{release} | |
83 | ||
84 | %description static | |
85 | Static GtkSourceView library. | |
86 | ||
87 | %description static -l pl.UTF-8 | |
88 | Statyczna biblioteka GtkSourceView. | |
89 | ||
349c23b4 JB |
90 | %package apidocs |
91 | Summary: GtkSourceView API documentation | |
92 | Summary(pl.UTF-8): Dokumentacja API GtkSourceView | |
93 | Group: Documentation | |
94 | Requires: gtk-doc-common | |
349c23b4 | 95 | BuildArch: noarch |
349c23b4 JB |
96 | |
97 | %description apidocs | |
98 | GtkSourceView API documentation. | |
99 | ||
100 | %description apidocs -l pl.UTF-8 | |
101 | Dokumentacja API GtkSourceView. | |
102 | ||
fa1469d8 | 103 | %package -n vala-gtksourceview5 |
f5853990 MB |
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} | |
108 | Requires: vala | |
4564cf84 | 109 | BuildArch: noarch |
f5853990 | 110 | |
fa1469d8 | 111 | %description -n vala-gtksourceview5 |
f5853990 MB |
112 | GtkSourceView API for Vala language. |
113 | ||
fa1469d8 | 114 | %description -n vala-gtksourceview5 -l pl.UTF-8 |
f5853990 MB |
115 | API GtkSourceView dla języka Vala. |
116 | ||
44df7ec3 AF |
117 | %prep |
118 | %setup -q -n gtksourceview-%{version} | |
fa593225 | 119 | %patch0 -p1 |
44df7ec3 | 120 | |
349c23b4 JB |
121 | %if %{with static_libs} |
122 | %{__sed} -i -e 's/gtksource_lib = shared_library/gtksource_lib = library/' gtksourceview/meson.build | |
123 | %endif | |
d5fd6af8 | 124 | |
44df7ec3 | 125 | %build |
349c23b4 | 126 | %meson build \ |
b02f970b JB |
127 | %{?with_apidocs:-Dgtk_doc=true} \ |
128 | %{?with_sysprof:-Dsysprof=true} | |
349c23b4 JB |
129 | |
130 | %ninja_build -C build | |
44df7ec3 AF |
131 | |
132 | %install | |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
349c23b4 | 135 | %ninja_install -C build |
e40ce944 | 136 | |
9cbed56f JB |
137 | %if %{with apidocs} |
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} | |
141 | %endif | |
142 | ||
fa1469d8 | 143 | %find_lang gtksourceview-5 |
44df7ec3 AF |
144 | |
145 | %clean | |
146 | rm -rf $RPM_BUILD_ROOT | |
147 | ||
148 | %post -p /sbin/ldconfig | |
149 | %postun -p /sbin/ldconfig | |
150 | ||
fa1469d8 | 151 | %files -f gtksourceview-5.lang |
44df7ec3 | 152 | %defattr(644,root,root,755) |
fa1469d8 JB |
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 | |
44df7ec3 | 159 | |
44df7ec3 AF |
160 | %files devel |
161 | %defattr(644,root,root,755) | |
fa1469d8 JB |
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 | |
44df7ec3 | 166 | |
f03d635d | 167 | %if %{with static_libs} |
44df7ec3 AF |
168 | %files static |
169 | %defattr(644,root,root,755) | |
fa1469d8 | 170 | %{_libdir}/libgtksourceview-5.a |
f03d635d | 171 | %endif |
44df7ec3 | 172 | |
349c23b4 JB |
173 | %if %{with apidocs} |
174 | %files apidocs | |
175 | %defattr(644,root,root,755) | |
9cbed56f | 176 | %{_gtkdocdir}/gtksourceview5 |
44df7ec3 | 177 | %endif |
f5853990 MB |
178 | |
179 | %if %{with vala} | |
fa1469d8 | 180 | %files -n vala-gtksourceview5 |
f5853990 | 181 | %defattr(644,root,root,755) |
fa1469d8 JB |
182 | %{_datadir}/vala/vapi/gtksourceview-5.deps |
183 | %{_datadir}/vala/vapi/gtksourceview-5.vapi | |
f5853990 | 184 | %endif |