appstream-generator/README.md

75 lines
3.0 KiB
Markdown
Raw Normal View History

# AppStream Generator
2016-03-28 17:59:05 -07:00
AppStream is an effort to provide additional metadata and unique IDs for all software available in a Linux system.
2016-10-03 09:51:33 -07:00
This repository contains the server-side of the AppStream infrastructure, a tool to generate metadata from distribution packages. You can find out more about AppStream collection metadata at [Freedesktop](https://www.freedesktop.org/software/appstream/docs/chap-CollectionData.html).
2016-03-28 17:59:05 -07:00
2016-10-03 09:51:33 -07:00
The AppStream generator is currently primarily used by Debian, but is written in a distribution agnostic way. Backends only need to implement [two interfaces](src/asgen/backends/interfaces.d) to to be ready.
2016-03-28 18:15:33 -07:00
If you are looking for the AppStream client-tools, the [AppStream repository](https://github.com/ximion/appstream) is where you want to go.
2016-03-28 17:59:05 -07:00
2016-04-24 08:59:06 -07:00
![AppStream Generator Logo](data/templates/default/static/img/asgen.png "AppStream Generator")
2016-03-28 17:59:05 -07:00
2016-03-08 14:19:20 -08:00
## Development
2016-03-20 14:00:28 -07:00
[![Build Status](https://travis-ci.org/ximion/appstream-generator.svg?branch=master)](https://travis-ci.org/ximion/appstream-generator)
2016-03-08 14:19:20 -08:00
### Build dependencies
2016-10-03 09:51:33 -07:00
* LDC[1]
* Meson (>= 0.34) [2]
2016-03-08 14:19:20 -08:00
* glib2 (>= 2.46)
2016-10-03 09:51:33 -07:00
* AppStream [3]
* libarchive (>= 3.2) [4]
* LMDB [5]
2017-02-27 15:03:49 -08:00
* mustache-d [6]
2017-04-25 17:18:30 -07:00
* GirToD [7]
2016-03-28 13:40:44 -07:00
* Cairo
* GdkPixbuf 2.0
* RSvg 2.0
2016-10-03 09:51:33 -07:00
* FreeType
* Fontconfig
* Pango
2017-04-25 17:18:30 -07:00
* Bower (optional) [8]
2016-10-03 09:51:33 -07:00
[1]: https://github.com/ldc-developers/ldc/releases
[2]: http://mesonbuild.com/
[3]: https://github.com/ximion/appstream
[4]: http://www.libarchive.org/
[5]: http://symas.com/mdb/
2017-02-27 15:03:49 -08:00
[6]: https://github.com/repeatedly/mustache-d
2017-04-25 17:18:30 -07:00
[7]: https://github.com/gtkd-developers/GIR-D-Generator
[8]: http://bower.io/
2016-04-22 11:44:55 -07:00
On Debian and derivatives of it, all build requirements can be installed using the following command:
```ShellSession
2017-05-25 15:24:38 -07:00
sudo apt install meson ldc gir-to-d libappstream-dev libgdk-pixbuf2.0-dev libarchive-dev \
2016-10-03 09:51:33 -07:00
librsvg2-dev liblmdb-dev libglib2.0-dev libcairo2-dev libcurl4-gnutls-dev \
2017-05-25 15:24:38 -07:00
libfreetype6-dev libfontconfig1-dev libpango1.0-dev libmustache-d-dev
2016-04-22 11:44:55 -07:00
```
2016-03-08 14:19:20 -08:00
### Build instructions
2016-10-03 09:51:33 -07:00
To build the tool with Meson, create a `build` subdirectory, change into it and run `meson .. && ninja` to build.
In summary:
2016-03-28 17:59:05 -07:00
```ShellSession
2016-10-03 09:51:33 -07:00
$ mkdir build && cd build
$ meson -Ddownload_js=true ..
$ ninja
$ sudo ninja install
2016-03-28 13:40:44 -07:00
```
2016-10-03 09:51:33 -07:00
We support several options to be set to influence the build. Change into the build directory and run `mesonconf` to see them all.
2017-04-25 17:18:30 -07:00
You might want to perform an optimized debug build by passing `--buildtype=debugoptimized` to `meson` or just do a release build straight
away with `--buildtype=release` in case you want to use the resulting binaries productively. By default, the build happens without optimizations
which slows down the generator.
2016-03-08 14:19:20 -08:00
## Usage
2017-04-25 17:18:30 -07:00
Take a look at the `docs/` directory in the source tree for information on how to use the generator and write configuration files for it.
2016-05-25 07:56:46 -07:00
## Hacking
Pull-requests and patches are very welcome! If you are new to D, it is highly recommended to take a few minutes to look at the D tour to get a feeling of what the language can do: http://tour.dlang.org/