]>
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 |
adddab4a | 8 | Version: 1.8.0 |
b070f2dc | 9 | Release: 1 |
2292f43f JB |
10 | License: LGPL v2.1+ |
11 | Group: Libraries | |
adddab4a JB |
12 | Source0: https://download.gnome.org/sources/json-glib/1.8/%{name}-%{version}.tar.xz |
13 | # Source0-md5: f1aac2b8a17fd68646653cc4d8426486 | |
6ad72b93 | 14 | URL: https://wiki.gnome.org/Projects/JsonGlib |
dec060eb | 15 | BuildRequires: docbook-dtd43-xml |
a7721583 | 16 | BuildRequires: docbook-style-xsl-nons |
70529b14 | 17 | BuildRequires: gettext-tools >= 0.18 |
4110ab0b | 18 | %{?with_apidocs:BuildRequires: gi-docgen >= 2021.6} |
dec060eb | 19 | BuildRequires: glib2-devel >= 1:2.54.0 |
4804e6a2 | 20 | BuildRequires: gobject-introspection-devel >= 0.9.5 |
6ad72b93 | 21 | BuildRequires: libxslt-progs |
adddab4a | 22 | BuildRequires: meson >= 0.62.0 |
dec060eb | 23 | BuildRequires: ninja >= 1.5 |
06d32e47 | 24 | BuildRequires: pkgconfig |
dec060eb | 25 | BuildRequires: python3 >= 1:3 |
4110ab0b | 26 | BuildRequires: rpm-build >= 4.6 |
5bec1bbc | 27 | BuildRequires: rpmbuild(macros) >= 2.029 |
dec060eb JB |
28 | BuildRequires: tar >= 1:1.22 |
29 | BuildRequires: xz | |
30 | Requires: glib2 >= 1:2.54.0 | |
93e3e800 PZ |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | %description | |
232ea397 PZ |
34 | JSON-GLib is a library providing serialization and deserialization |
35 | support for the JavaScript Object Notation (JSON) format described by | |
36 | RFC 4627. | |
93e3e800 | 37 | |
2292f43f JB |
38 | %description -l pl.UTF-8 |
39 | JSON-GLib to biblioteka zapewniająca obsługę serializacji i | |
40 | deserializacji dla formatu JSON (JavaScript Object Notation) opisanego | |
41 | w RFC 4627. | |
42 | ||
93e3e800 PZ |
43 | %package devel |
44 | Summary: Header files for the json-glib library | |
2292f43f | 45 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki json-glib |
93e3e800 PZ |
46 | Group: Development/Libraries |
47 | Requires: %{name} = %{version}-%{release} | |
dec060eb | 48 | Requires: glib2-devel >= 1:2.54.0 |
93e3e800 PZ |
49 | |
50 | %description devel | |
51 | Header files for the json-glib library. | |
52 | ||
2292f43f JB |
53 | %description devel -l pl.UTF-8 |
54 | Pliki nagłówkowe biblioteki json-glib. | |
55 | ||
6ad72b93 JB |
56 | %package static |
57 | Summary: Static json-glib library | |
58 | Summary(pl.UTF-8): Statyczna biblioteka json-glib | |
59 | Group: Development/Libraries | |
60 | Requires: %{name}-devel = %{version}-%{release} | |
61 | ||
62 | %description static | |
63 | Static json-glib library. | |
64 | ||
65 | %description static -l pl.UTF-8 | |
66 | Statyczna biblioteka json-glib. | |
67 | ||
93e3e800 PZ |
68 | %package apidocs |
69 | Summary: json-glib API documentation | |
2292f43f | 70 | Summary(pl.UTF-8): Dokumentacja API json-glib |
93e3e800 PZ |
71 | Group: Documentation |
72 | Requires: gtk-doc-common | |
8b522c93 | 73 | BuildArch: noarch |
93e3e800 PZ |
74 | |
75 | %description apidocs | |
76 | json-glib API documentation. | |
77 | ||
2292f43f JB |
78 | %description apidocs -l pl.UTF-8 |
79 | Dokumentacja API json-glib. | |
80 | ||
93e3e800 PZ |
81 | %prep |
82 | %setup -q | |
83 | ||
84 | %build | |
71553575 | 85 | %meson build \ |
4110ab0b JB |
86 | %{?with_apidocs:-Dgtk_doc=enabled} \ |
87 | -Dintrospection=enabled \ | |
6ad72b93 | 88 | -Dman=true |
913c70eb | 89 | |
dec060eb | 90 | %ninja_build -C build |
93e3e800 PZ |
91 | |
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
dec060eb | 95 | %ninja_install -C build |
93e3e800 | 96 | |
87fa5f7e | 97 | %{__rm} -r $RPM_BUILD_ROOT{%{_libexecdir},%{_datadir}}/installed-tests/json-glib-1.0 |
7b984440 | 98 | |
ea35e151 JB |
99 | %find_lang %{name}-1.0 |
100 | ||
4110ab0b | 101 | %if %{with apidocs} |
5bec1bbc JB |
102 | install -d $RPM_BUILD_ROOT%{_gidocdir} |
103 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/json-glib-1.0 $RPM_BUILD_ROOT%{_gidocdir} | |
4110ab0b JB |
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) | |
5bec1bbc | 137 | %{_gidocdir}/json-glib-1.0 |
4110ab0b | 138 | %endif |