Building GObjects with YAML
Vala M4 Perl Makefile Shell
Latest commit 387d4b4 Oct 22, 2016 @rainwoodman committed on GitHub Merge pull request #21 from rainwoodman/nolibyaml
Failed to load latest commit information.
autotools refactor the with_installed macro to a m4 file. Sep 26, 2009
data Move and rename '' Oct 20, 2016
src Rename 'libyaml-1.0.vapi' for 'yaml-0.1.vapi' Oct 14, 2016
tests links against -lyaml. Oct 14, 2016
.gitignore ChangeLog Jun 25, 2009
.travis.yml Build on the current Ubuntu LTS (Precise 12.04) Oct 15, 2016 Move and rename '' Oct 20, 2016
README.rst rename README to rst. Oct 7, 2016
gitlog-to-changelog ChangeLog Jun 25, 2009


yaml-glib - Building GObject from YAML

Travis Status


yaml-glib is the GLib binding of libyaml, plus a GObject builder that understands YAML.


The source code is hosted at github:

$ git clone git://

No released tarball is available currently.


  • glib2 >= 2.10 GLib and GObject

  • valac >= 0.7.2 Vala compiler

  • libyaml == 0.1.2 YAML 1.1 parser

    built into the source tree, considering its current availability.


The header files and libraries of libyaml are also installed.

  1. Direct install (on most distributions)
$ ./ --prefix=/usr
$ make
$ make install

2. Build RPM and install from the rpm
$ ./
$ make
$ make dist

The next step either requires your rpmdevtree is properly setup

$ rpmbuild -ta yaml-glib-0.1.tar.gz
Or you can build the rpm with easybuild
(obtained from
$ easybuild -ba yaml-glib.spec

And the built RPMs will be in the current directory:

$ ls *.rpm
yaml-glib-0.1-5.i386.rpm  yaml-glib-debuginfo-0.1-5.i386.rpm
yaml-glib-0.1-5.src.rpm   yaml-glib-devel-0.1-5.i386.rpm

Install the package with

$ su -c 'rpm -U yaml-glib-0.1-5.i386.rpm \
  yaml-glib-debuginfo-0.1-5.i386.rpm \


test/example-invoice.vala is an example of an invoice printer. Example data is in test/invoice.yaml. Feed the data to the standard input of example-invoice. The program will then parse and build the invoice, then rewrite the model back to standard output.

Notice how PaypalAddress is extended to the original Model namespace, also how structs and enums are processed.

The invoice data is modified from the standard YAML example.


The documenation can be compiled from valadoc, if a valadoc compiler is available. No documentation is installed. It is recommended to turn off the documentation with --disable-valadoc all the time until valadoc is stable.