]> git.pld-linux.org Git - packages/gtksourceview5.git/blob - gtksourceview5.spec
dfa6314c279de1d1d237ed4644884e1adbe40232
[packages/gtksourceview5.git] / gtksourceview5.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation
4 %bcond_without  static_libs     # static library
5 %bcond_with     sysprof         # sysprof profiler support
6 %bcond_without  vala            # do not build Vala API
7
8 Summary:        Text widget that extends the standard GTK+ 3.x
9 Summary(pl.UTF-8):      Widget tekstowy rozszerzający standardowy z GTK+ 3.x
10 Name:           gtksourceview5
11 Version:        5.4.0
12 Release:        1
13 License:        LGPL v2+ (library), GPL v2+ (some language specs files)
14 Group:          X11/Libraries
15 Source0:        https://download.gnome.org/sources/gtksourceview/5.4/gtksourceview-%{version}.tar.xz
16 # Source0-md5:  ab90544ba01611b1bbe914798ea73e67
17 URL:            https://wiki.gnome.org/Projects/GtkSourceView
18 BuildRequires:  docbook-dtd412-xml
19 BuildRequires:  fontconfig-devel
20 BuildRequires:  fribidi-devel >= 0.19.7
21 BuildRequires:  gettext-tools >= 0.19.4
22 %{?with_apidocs:BuildRequires:  gi-docgen}
23 BuildRequires:  glib2-devel >= 1:2.70
24 BuildRequires:  gobject-introspection-devel >= 1.70.0
25 BuildRequires:  gtk4-devel >= 4.5
26 BuildRequires:  itstool
27 BuildRequires:  libxml2-devel >= 1:2.6.31
28 BuildRequires:  meson >= 0.59.0
29 BuildRequires:  ninja >= 1.5
30 BuildRequires:  pango-devel
31 BuildRequires:  pcre2-8-devel >= 10.21
32 BuildRequires:  pkgconfig
33 BuildRequires:  rpm-build >= 4.6
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.736
36 BuildRequires:  sed >= 4.0
37 %{?with_sysprof:BuildRequires:  sysprof-devel >= 3.38}
38 BuildRequires:  tar >= 1:1.22
39 BuildRequires:  vala
40 BuildRequires:  xz
41 Requires:       fribidi >= 0.19.7
42 Requires:       glib2 >= 1:2.70
43 Requires:       gtk4 >= 4.5
44 Requires:       libxml2 >= 1:2.6.31
45 Requires:       pcre2-8 >= 10.21
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 GtkSourceView is a text widget that extends the standard GTK+ 3.x text
50 widget GtkTextView. It improves GtkTextView by implementing syntax
51 highlighting and other features typical of a source editor.
52
53 %description -l pl.UTF-8
54 GtkSourceView to widget tekstowy rozszerzający standardowy widget
55 tekstowy GtkTextView z GTK+ 3.x. Ulepsza GtkTextView poprzez
56 zaimplementowanie podświetlania składni i innych możliwości typowych
57 dla edytora źródeł.
58
59 %package devel
60 Summary:        Header files for GtkSourceView
61 Summary(pl.UTF-8):      Pliki nagłówkowe dla GtkSourceView
62 Group:          X11/Development/Libraries
63 Requires:       %{name} = %{version}-%{release}
64 Requires:       fribidi-devel >= 0.19.7
65 Requires:       glib2-devel >= 1:2.70
66 Requires:       gtk4-devel >= 4.5
67 Requires:       libxml2-devel >= 1:2.6.31
68 Requires:       pcre2-8-devel >= 10.21
69
70 %description devel
71 Header files for GtkSourceView.
72
73 %description devel -l pl.UTF-8
74 Pliki nagłówkowe dla GtkSourceView.
75
76 %package static
77 Summary:        Static GtkSourceView library
78 Summary(pl.UTF-8):      Statyczna biblioteka GtkSourceView
79 Group:          X11/Development/Libraries
80 Requires:       %{name}-devel = %{version}-%{release}
81
82 %description static
83 Static GtkSourceView library.
84
85 %description static -l pl.UTF-8
86 Statyczna biblioteka GtkSourceView.
87
88 %package apidocs
89 Summary:        GtkSourceView API documentation
90 Summary(pl.UTF-8):      Dokumentacja API GtkSourceView
91 Group:          Documentation
92 Requires:       gtk-doc-common
93 BuildArch:      noarch
94
95 %description apidocs
96 GtkSourceView API documentation.
97
98 %description apidocs -l pl.UTF-8
99 Dokumentacja API GtkSourceView.
100
101 %package -n vala-gtksourceview5
102 Summary:        GtkSourceView API for Vala language
103 Summary(pl.UTF-8):      API GtkSourceView dla języka Vala
104 Group:          Development/Libraries
105 Requires:       %{name}-devel = %{version}-%{release}
106 Requires:       vala
107 BuildArch:      noarch
108
109 %description -n vala-gtksourceview5
110 GtkSourceView API for Vala language.
111
112 %description -n vala-gtksourceview5 -l pl.UTF-8
113 API GtkSourceView dla języka Vala.
114
115 %prep
116 %setup -q -n gtksourceview-%{version}
117
118 %if %{with static_libs}
119 %{__sed} -i -e 's/gtksource_lib = shared_library/gtksource_lib = library/' gtksourceview/meson.build
120 %endif
121
122 %build
123 %meson build \
124         %{?with_apidocs:-Dgtk_doc=true} \
125         %{?with_sysprof:-Dsysprof=true}
126
127 %ninja_build -C build
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131
132 %ninja_install -C build
133
134 %if %{with apidocs}
135 # FIXME: where to package gi-docgen generated docs?
136 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
137 %{__mv} $RPM_BUILD_ROOT%{_docdir}/gtksourceview5 $RPM_BUILD_ROOT%{_gtkdocdir}
138 %endif
139
140 %find_lang gtksourceview-5
141
142 %clean
143 rm -rf $RPM_BUILD_ROOT
144
145 %post   -p /sbin/ldconfig
146 %postun -p /sbin/ldconfig
147
148 %files -f gtksourceview-5.lang
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_libdir}/libgtksourceview-5.so.*.*.*
151 %attr(755,root,root) %ghost %{_libdir}/libgtksourceview-5.so.0
152 %{_datadir}/gtksourceview-5
153 %{_libdir}/girepository-1.0/GtkSource-5.typelib
154 %{_iconsdir}/hicolor/scalable/actions/completion-*-symbolic.svg
155 %{_iconsdir}/hicolor/scalable/actions/lang-*-symbolic.svg
156
157 %files devel
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_libdir}/libgtksourceview-5.so
160 %{_includedir}/gtksourceview-5
161 %{_pkgconfigdir}/gtksourceview-5.pc
162 %{_datadir}/gir-1.0/GtkSource-5.gir
163
164 %if %{with static_libs}
165 %files static
166 %defattr(644,root,root,755)
167 %{_libdir}/libgtksourceview-5.a
168 %endif
169
170 %if %{with apidocs}
171 %files apidocs
172 %defattr(644,root,root,755)
173 %{_gtkdocdir}/gtksourceview5
174 %endif
175
176 %if %{with vala}
177 %files -n vala-gtksourceview5
178 %defattr(644,root,root,755)
179 %{_datadir}/vala/vapi/gtksourceview-5.deps
180 %{_datadir}/vala/vapi/gtksourceview-5.vapi
181 %endif
This page took 0.053178 seconds and 2 git commands to generate.