Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[flatpak] Create json-glib package. JB#46927
  • Loading branch information
Andrew Branson authored and abranson committed Jan 30, 2020
0 parents commit e1c11a7
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "upstream"]
path = upstream
url = https://gitlab.gnome.org/GNOME/json-glib.git
83 changes: 83 additions & 0 deletions rpm/json-glib.spec
@@ -0,0 +1,83 @@
Name: json-glib
Version: 1.4.4
Release: 1
Summary: Library for JavaScript Object Notation format
License: LGPL-2.1-or-later
URL: https://gitlab.gnome.org/GNOME/json-glib/
Source0: http://download.gnome.org/sources/json-glib/1.4/%{name}-%{version}.tar.xz
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: gobject-introspection-devel
BuildRequires: meson
BuildRequires: gettext

%description
JSON-GLib provides a parser and a generator GObject classes and various
wrappers for the complex data types employed by JSON, such as arrays
and objects.

JSON-GLib uses GLib native data types and the generic value container
GValue for ease of development. It also provides integration with the
GObject classes for direct serialization into, and deserialization from,
JSON data streams.

%package -n libjson-glib
Summary: Library for JavaScript Object Notation format
Provides: %{name} = %{version}

%description -n libjson-glib
JSON is a lightweight data-interchange format. It is comparatively
easy for humans to read and write, and for machines to parse and generate.

JSON-GLib provides a parser and a generator GObject classes and various
wrappers for the complex data types employed by JSON, such as arrays
and objects.

JSON-GLib uses GLib native data types and the generic value container
GValue for ease of development. It also provides integration with the
GObject classes for direct serialization into, and deserialization from,
JSON data streams.

%package devel
Summary: Development files for libjson-glib
Requires: libjson-glib = %{version}

%description devel
JSON-GLib provides a parser and a generator GObject classes and various
wrappers for the complex data types employed by JSON, such as arrays
and objects.

This package contains development files needed to develop with the
json-glib library.

%prep
%setup -q -n %{name}-%{version}/upstream

%build
%meson
%meson_build

%install
%meson_install
find %{buildroot} -type f -name "*.la" -delete -print
%find_lang %{name}-1.0

%post -n libjson-glib -p /sbin/ldconfig
%postun -n libjson-glib -p /sbin/ldconfig

%files -n libjson-glib -f %{name}-1.0.lang
%license COPYING
%{_libdir}/*.so.*

%files devel
%doc NEWS README.md
%{_bindir}/json-glib-format
%{_bindir}/json-glib-validate
%{_includedir}/%{name}-1.0
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gir-1.0/*.gir
%dir %{_datadir}/installed-tests
%dir %{_libexecdir}/installed-tests
%{_datadir}/installed-tests/json-glib-1.0/
%{_libexecdir}/installed-tests/json-glib-1.0/
%{_libdir}/girepository-1.0/Json-1.0.typelib
1 change: 1 addition & 0 deletions upstream
Submodule upstream added at 700a8b

0 comments on commit e1c11a7

Please sign in to comment.