]>
Commit | Line | Data |
---|---|---|
896eb13d MB |
1 | # |
2 | # Conditional build: | |
fa1469d8 | 3 | %bcond_without apidocs # API documentation (broken in 4.99) |
349c23b4 JB |
4 | %bcond_without static_libs # static library |
5 | %bcond_without vala # do not build Vala API | |
4564cf84 | 6 | |
44df7ec3 AF |
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 | |
fa1469d8 JB |
9 | Name: gtksourceview5 |
10 | Version: 4.99.0 | |
b2467359 | 11 | Release: 1 |
2a83e144 | 12 | License: LGPL v2+ (library), GPL v2+ (some language specs files) |
44df7ec3 | 13 | Group: X11/Libraries |
fa1469d8 JB |
14 | Source0: https://download.gnome.org/sources/gtksourceview/4.99/gtksourceview-%{version}.tar.xz |
15 | # Source0-md5: 7b7a6f74d2dc459b8687f9bf6ae13bfa | |
16 | Patch0: %{name}-meson.patch | |
71b49bd9 | 17 | URL: https://wiki.gnome.org/Projects/GtkSourceView |
44df7ec3 | 18 | BuildRequires: docbook-dtd412-xml |
349c23b4 | 19 | BuildRequires: fribidi-devel >= 0.19.7 |
ede2878d | 20 | BuildRequires: gettext-tools >= 0.19.4 |
fa1469d8 | 21 | BuildRequires: glib2-devel >= 1:2.62 |
ad61f4ae | 22 | BuildRequires: gobject-introspection-devel >= 1.42.0 |
fa1469d8 | 23 | BuildRequires: gtk4-devel >= 3.99 |
349c23b4 | 24 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.25} |
0b911454 | 25 | BuildRequires: itstool |
44df7ec3 | 26 | BuildRequires: libxml2-devel >= 1:2.6.31 |
6b45c26a | 27 | BuildRequires: meson >= 0.50.0 |
349c23b4 | 28 | BuildRequires: ninja >= 1.5 |
fa1469d8 | 29 | BuildRequires: pcre2-8-devel >= 10.21 |
44df7ec3 | 30 | BuildRequires: pkgconfig |
d1fa7142 | 31 | BuildRequires: rpm-build >= 4.6 |
44df7ec3 | 32 | BuildRequires: rpm-pythonprov |
79ee4bba | 33 | BuildRequires: rpmbuild(macros) >= 1.736 |
349c23b4 | 34 | BuildRequires: sed >= 4.0 |
67ae3529 | 35 | BuildRequires: tar >= 1:1.22 |
f5853990 | 36 | BuildRequires: vala |
67ae3529 | 37 | BuildRequires: xz |
349c23b4 | 38 | Requires: fribidi >= 0.19.7 |
fa1469d8 JB |
39 | Requires: glib2 >= 1:2.62 |
40 | Requires: gtk4 >= 3.99 | |
6a1741b2 | 41 | Requires: libxml2 >= 1:2.6.31 |
fa1469d8 | 42 | Requires: pcre2-8 >= 10.21 |
44df7ec3 AF |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
44 | ||
45 | %description | |
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. | |
49 | ||
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 | |
54 | dla edytora źródeł. | |
55 | ||
44df7ec3 AF |
56 | %package devel |
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} | |
349c23b4 | 61 | Requires: fribidi-devel >= 0.19.7 |
fa1469d8 JB |
62 | Requires: glib2-devel >= 1:2.62 |
63 | Requires: gtk4-devel >= 3.99 | |
44df7ec3 | 64 | Requires: libxml2-devel >= 1:2.6.31 |
fa1469d8 | 65 | Requires: pcre2-8-devel >= 10.21 |
44df7ec3 AF |
66 | |
67 | %description devel | |
68 | Header files for GtkSourceView. | |
69 | ||
70 | %description devel -l pl.UTF-8 | |
71 | Pliki nagłówkowe dla GtkSourceView. | |
72 | ||
73 | %package static | |
74 | Summary: Static GtkSourceView library | |
75 | Summary(pl.UTF-8): Statyczna biblioteka GtkSourceView | |
76 | Group: X11/Development/Libraries | |
77 | Requires: %{name}-devel = %{version}-%{release} | |
78 | ||
79 | %description static | |
80 | Static GtkSourceView library. | |
81 | ||
82 | %description static -l pl.UTF-8 | |
83 | Statyczna biblioteka GtkSourceView. | |
84 | ||
349c23b4 JB |
85 | %package apidocs |
86 | Summary: GtkSourceView API documentation | |
87 | Summary(pl.UTF-8): Dokumentacja API GtkSourceView | |
88 | Group: Documentation | |
89 | Requires: gtk-doc-common | |
349c23b4 | 90 | BuildArch: noarch |
349c23b4 JB |
91 | |
92 | %description apidocs | |
93 | GtkSourceView API documentation. | |
94 | ||
95 | %description apidocs -l pl.UTF-8 | |
96 | Dokumentacja API GtkSourceView. | |
97 | ||
fa1469d8 | 98 | %package -n vala-gtksourceview5 |
f5853990 MB |
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} | |
103 | Requires: vala | |
4564cf84 | 104 | BuildArch: noarch |
f5853990 | 105 | |
fa1469d8 | 106 | %description -n vala-gtksourceview5 |
f5853990 MB |
107 | GtkSourceView API for Vala language. |
108 | ||
fa1469d8 | 109 | %description -n vala-gtksourceview5 -l pl.UTF-8 |
f5853990 MB |
110 | API GtkSourceView dla języka Vala. |
111 | ||
44df7ec3 AF |
112 | %prep |
113 | %setup -q -n gtksourceview-%{version} | |
fa1469d8 | 114 | %patch0 -p1 |
44df7ec3 | 115 | |
349c23b4 JB |
116 | %if %{with static_libs} |
117 | %{__sed} -i -e 's/gtksource_lib = shared_library/gtksource_lib = library/' gtksourceview/meson.build | |
118 | %endif | |
d5fd6af8 | 119 | |
44df7ec3 | 120 | %build |
349c23b4 | 121 | %meson build \ |
349c23b4 JB |
122 | %{?with_apidocs:-Dgtk_doc=true} |
123 | ||
124 | %ninja_build -C build | |
44df7ec3 AF |
125 | |
126 | %install | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | ||
349c23b4 | 129 | %ninja_install -C build |
e40ce944 | 130 | |
fa1469d8 | 131 | %find_lang gtksourceview-5 |
44df7ec3 AF |
132 | |
133 | %clean | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
136 | %post -p /sbin/ldconfig | |
137 | %postun -p /sbin/ldconfig | |
138 | ||
fa1469d8 | 139 | %files -f gtksourceview-5.lang |
44df7ec3 | 140 | %defattr(644,root,root,755) |
fa1469d8 JB |
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 | |
44df7ec3 | 147 | |
44df7ec3 AF |
148 | %files devel |
149 | %defattr(644,root,root,755) | |
fa1469d8 JB |
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 | |
44df7ec3 | 154 | |
f03d635d | 155 | %if %{with static_libs} |
44df7ec3 AF |
156 | %files static |
157 | %defattr(644,root,root,755) | |
fa1469d8 | 158 | %{_libdir}/libgtksourceview-5.a |
f03d635d | 159 | %endif |
44df7ec3 | 160 | |
349c23b4 JB |
161 | %if %{with apidocs} |
162 | %files apidocs | |
163 | %defattr(644,root,root,755) | |
fa1469d8 | 164 | %{_gtkdocdir}/gtksourceview-5.0 |
44df7ec3 | 165 | %endif |
f5853990 MB |
166 | |
167 | %if %{with vala} | |
fa1469d8 | 168 | %files -n vala-gtksourceview5 |
f5853990 | 169 | %defattr(644,root,root,755) |
fa1469d8 JB |
170 | %{_datadir}/vala/vapi/gtksourceview-5.deps |
171 | %{_datadir}/vala/vapi/gtksourceview-5.vapi | |
f5853990 | 172 | %endif |