3 %bcond_without apidocs # API documentation
4 %bcond_without static_libs # static library
6 Summary: template-glib - generate text based on a template and user defined state
7 Summary(pl.UTF-8): template-glib - generowanie tekstu w oparciu o szablon i stan przekazany przez użytkownika
13 Source0: http://ftp.gnome.org/pub/GNOME/sources/template-glib/3.34/%{name}-%{version}.tar.xz
14 # Source0-md5: 78a64d7c6324ed2dec0b8088428d6774
15 URL: https://gitlab.gnome.org/GNOME/template-glib
17 BuildRequires: docbook-dtd412-xml
18 BuildRequires: gettext-tools >= 0.18
20 BuildRequires: glib2-devel >= 1:2.44.0
21 BuildRequires: gobject-introspection-devel >= 0.9.5
22 %{?with_apidocs:BuildRequires: gtk-doc >= 1.20}
23 BuildRequires: meson >= 0.50.0
24 BuildRequires: ninja >= 1.5
25 BuildRequires: pkgconfig
26 BuildRequires: rpmbuild(macros) >= 1.736
28 Requires: glib2 >= 1:2.44.0
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Template-GLib is a library to help you generate text based on a
33 template and user defined state. Template-GLib does not use a language
34 runtime, so it is safe to use from any GObject-Introspectable
37 Template-GLib allows you to access properties on GObjects as well as
38 call simple methods via GObject-Introspection.
40 %description -l pl.UTF-8
41 Template-GLib to biblioteka pomagająca generować tekst w oparciu o
42 szablon oraz stan przekazany przez użytkownika. Nie wykorzystuje
43 bibliotek językowych, więc bezpiecznie można jej używać z dowolnego
44 języka obsługującego GObject-Introspection.
46 Template-GLib pozwala na dostęp do właściwości obiektów GObject, a
47 także wywoływanie prostych metod poprzez GObject-Introspection.
50 Summary: Header files for the template-glib library
51 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki template-glib
52 Group: Development/Libraries
53 Requires: %{name} = %{version}-%{release}
54 Requires: glib2-devel >= 1:2.44.0
55 Requires: gobject-introspection-devel >= 0.9.5
58 Header files for the template-glib library.
60 %description devel -l pl.UTF-8
61 Pliki nagłówkowe biblioteki template-glib.
64 Summary: Static template-glib library
65 Summary(pl.UTF-8): Biblioteka statyczna template-glib
66 Group: Development/Libraries
67 Requires: %{name}-devel = %{version}-%{release}
70 Static template-glib library.
72 %description static -l pl.UTF-8
73 Biblioteka statyczna template-glib.
76 Summary: template-glib API documentation
77 Summary(pl.UTF-8): Dokumentacja API template-glib
79 Requires: gtk-doc-common
80 %if "%{_rpmversion}" >= "5"
85 Template-glib API documentation.
87 %description apidocs -l pl.UTF-8
88 Dokumentacja API template-glib.
90 %package -n vala-template-glib
91 Summary: template-glib API for Vala language
92 Summary(pl.UTF-8): API template-glib dla języka Vala
93 Group: Development/Libraries
94 Requires: %{name}-devel = %{version}-%{release}
95 Requires: vala >= 2:0.18.0
96 %if "%{_rpmversion}" >= "5"
100 %description -n vala-template-glib
101 Template-glib API for Vala language.
103 %description -n vala-template-glib -l pl.UTF-8
104 API template-glib dla języka Vala.
111 %{!?with_static_libs:--default-library=shared} \
112 -Dintrospection=true \
113 %{?with_apidocs:-Denable_gtk_doc=true}
115 %ninja_build -C build
118 rm -rf $RPM_BUILD_ROOT
120 %ninja_install -C build
122 %find_lang %{name} --with-gnome
125 rm -rf $RPM_BUILD_ROOT
127 %post -p /sbin/ldconfig
128 %postun -p /sbin/ldconfig
130 %files -f %{name}.lang
131 %defattr(644,root,root,755)
132 %doc AUTHORS NEWS README.md
133 %attr(755,root,root) %{_libdir}/libtemplate_glib-1.0.so.*.*.*
134 %attr(755,root,root) %ghost %{_libdir}/libtemplate_glib-1.0.so.0
135 %{_libdir}/girepository-1.0/Template-1.0.typelib
138 %defattr(644,root,root,755)
139 %attr(755,root,root) %{_libdir}/libtemplate_glib-1.0.so
140 %{_datadir}/gir-1.0/Template-1.0.gir
141 %{_includedir}/template-glib-1.0
142 %{_pkgconfigdir}/template-glib-1.0.pc
144 %if %{with static_libs}
146 %defattr(644,root,root,755)
147 %{_libdir}/libtemplate_glib-1.0.a
152 %defattr(644,root,root,755)
153 %{_gtkdocdir}/template-glib
156 %files -n vala-template-glib
157 %defattr(644,root,root,755)
158 %{_datadir}/vala/vapi/template-glib-1.0.deps
159 %{_datadir}/vala/vapi/template-glib-1.0.vapi