]>
Commit | Line | Data |
---|---|---|
4110ab0b JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
4 | ||
232ea397 | 5 | Summary: JSON-GLib - a library providing serialization and deserialization support for the JSON format |
2292f43f | 6 | Summary(pl.UTF-8): JSON-GLib - biblioteka zapewniająca serializację i deserializację dla formatu JSON |
93e3e800 | 7 | Name: json-glib |
1d5bf659 | 8 | Version: 1.6.6 |
b070f2dc | 9 | Release: 1 |
2292f43f JB |
10 | License: LGPL v2.1+ |
11 | Group: Libraries | |
b070f2dc | 12 | Source0: https://download.gnome.org/sources/json-glib/1.6/%{name}-%{version}.tar.xz |
1d5bf659 | 13 | # Source0-md5: 9c40fcd8cdbf484dd1704480afefae14 |
6ad72b93 | 14 | URL: https://wiki.gnome.org/Projects/JsonGlib |
dec060eb | 15 | BuildRequires: docbook-dtd43-xml |
70529b14 | 16 | BuildRequires: gettext-tools >= 0.18 |
4110ab0b | 17 | %{?with_apidocs:BuildRequires: gi-docgen >= 2021.6} |
dec060eb | 18 | BuildRequires: glib2-devel >= 1:2.54.0 |
4804e6a2 | 19 | BuildRequires: gobject-introspection-devel >= 0.9.5 |
6ad72b93 | 20 | BuildRequires: libxslt-progs |
4110ab0b | 21 | BuildRequires: meson >= 0.55.3 |
dec060eb | 22 | BuildRequires: ninja >= 1.5 |
06d32e47 | 23 | BuildRequires: pkgconfig |
dec060eb | 24 | BuildRequires: python3 >= 1:3 |
4110ab0b | 25 | BuildRequires: rpm-build >= 4.6 |
b070f2dc | 26 | BuildRequires: rpmbuild(macros) >= 1.752 |
dec060eb JB |
27 | BuildRequires: tar >= 1:1.22 |
28 | BuildRequires: xz | |
29 | Requires: glib2 >= 1:2.54.0 | |
93e3e800 PZ |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
232ea397 PZ |
33 | JSON-GLib is a library providing serialization and deserialization |
34 | support for the JavaScript Object Notation (JSON) format described by | |
35 | RFC 4627. | |
93e3e800 | 36 | |
2292f43f JB |
37 | %description -l pl.UTF-8 |
38 | JSON-GLib to biblioteka zapewniająca obsługę serializacji i | |
39 | deserializacji dla formatu JSON (JavaScript Object Notation) opisanego | |
40 | w RFC 4627. | |
41 | ||
93e3e800 PZ |
42 | %package devel |
43 | Summary: Header files for the json-glib library | |
2292f43f | 44 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki json-glib |
93e3e800 PZ |
45 | Group: Development/Libraries |
46 | Requires: %{name} = %{version}-%{release} | |
dec060eb | 47 | Requires: glib2-devel >= 1:2.54.0 |
93e3e800 PZ |
48 | |
49 | %description devel | |
50 | Header files for the json-glib library. | |
51 | ||
2292f43f JB |
52 | %description devel -l pl.UTF-8 |
53 | Pliki nagłówkowe biblioteki json-glib. | |
54 | ||
6ad72b93 JB |
55 | %package static |
56 | Summary: Static json-glib library | |
57 | Summary(pl.UTF-8): Statyczna biblioteka json-glib | |
58 | Group: Development/Libraries | |
59 | Requires: %{name}-devel = %{version}-%{release} | |
60 | ||
61 | %description static | |
62 | Static json-glib library. | |
63 | ||
64 | %description static -l pl.UTF-8 | |
65 | Statyczna biblioteka json-glib. | |
66 | ||
93e3e800 PZ |
67 | %package apidocs |
68 | Summary: json-glib API documentation | |
2292f43f | 69 | Summary(pl.UTF-8): Dokumentacja API json-glib |
93e3e800 PZ |
70 | Group: Documentation |
71 | Requires: gtk-doc-common | |
8b522c93 | 72 | BuildArch: noarch |
93e3e800 PZ |
73 | |
74 | %description apidocs | |
75 | json-glib API documentation. | |
76 | ||
2292f43f JB |
77 | %description apidocs -l pl.UTF-8 |
78 | Dokumentacja API json-glib. | |
79 | ||
93e3e800 PZ |
80 | %prep |
81 | %setup -q | |
82 | ||
83 | %build | |
71553575 | 84 | %meson build \ |
4110ab0b JB |
85 | %{?with_apidocs:-Dgtk_doc=enabled} \ |
86 | -Dintrospection=enabled \ | |
6ad72b93 | 87 | -Dman=true |
913c70eb | 88 | |
dec060eb | 89 | %ninja_build -C build |
93e3e800 PZ |
90 | |
91 | %install | |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
dec060eb | 94 | %ninja_install -C build |
93e3e800 | 95 | |
87fa5f7e | 96 | %{__rm} -r $RPM_BUILD_ROOT{%{_libexecdir},%{_datadir}}/installed-tests/json-glib-1.0 |
7b984440 | 97 | |
ea35e151 JB |
98 | %find_lang %{name}-1.0 |
99 | ||
4110ab0b JB |
100 | %if %{with apidocs} |
101 | # FIXME: where to package gi-docgen generated docs? | |
102 | install -d $RPM_BUILD_ROOT%{_gtkdocdir} | |
103 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/json-glib-1.0 $RPM_BUILD_ROOT%{_gtkdocdir} | |
104 | %endif | |
105 | ||
93e3e800 PZ |
106 | %clean |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
d43e9703 PZ |
109 | %post -p /sbin/ldconfig |
110 | %postun -p /sbin/ldconfig | |
111 | ||
ea35e151 | 112 | %files -f %{name}-1.0.lang |
93e3e800 | 113 | %defattr(644,root,root,755) |
71553575 | 114 | %doc NEWS README.md |
030fd708 ŁK |
115 | %attr(755,root,root) %{_bindir}/json-glib-format |
116 | %attr(755,root,root) %{_bindir}/json-glib-validate | |
93e3e800 PZ |
117 | %attr(755,root,root) %{_libdir}/libjson-glib-1.0.so.*.*.* |
118 | %attr(755,root,root) %ghost %{_libdir}/libjson-glib-1.0.so.0 | |
715ad0b8 | 119 | %{_libdir}/girepository-1.0/Json-1.0.typelib |
030fd708 ŁK |
120 | %{_mandir}/man1/json-glib-format.1* |
121 | %{_mandir}/man1/json-glib-validate.1* | |
93e3e800 PZ |
122 | |
123 | %files devel | |
124 | %defattr(644,root,root,755) | |
125 | %attr(755,root,root) %{_libdir}/libjson-glib-1.0.so | |
715ad0b8 | 126 | %{_datadir}/gir-1.0/Json-1.0.gir |
93e3e800 PZ |
127 | %{_includedir}/json-glib-1.0 |
128 | %{_pkgconfigdir}/json-glib-1.0.pc | |
129 | ||
6ad72b93 JB |
130 | %files static |
131 | %defattr(644,root,root,755) | |
132 | %{_libdir}/libjson-glib-1.0.a | |
133 | ||
4110ab0b | 134 | %if %{with apidocs} |
93e3e800 PZ |
135 | %files apidocs |
136 | %defattr(644,root,root,755) | |
4110ab0b JB |
137 | %{_gtkdocdir}/json-glib-1.0 |
138 | %endif |