From 1975e92bc8cdd9dad35a4f40dc33c4436a31c2c9 Mon Sep 17 00:00:00 2001 From: Jon Lund Steffensen Date: Wed, 28 May 2014 20:29:39 -0400 Subject: Fix #95: Add AppData file for package managers --- Makefile.am | 22 ++++++++++++++++++++-- data/appdata/redshift-gtk.appdata.xml.in | 14 ++++++++++++++ po/POTFILES.in | 1 + 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 data/appdata/redshift-gtk.appdata.xml.in diff --git a/Makefile.am b/Makefile.am index 01a7a29..0137635 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,6 +34,9 @@ SYSTEMD_USER_UNIT_IN_FILES = \ data/systemd/redshift.service.in \ data/systemd/redshift-gtk.service.in +APPDATA_IN_FILES = \ + data/appdata/redshift-gtk.appdata.xml.in + # Icons if ENABLE_GUI @@ -85,6 +88,19 @@ $(systemduserunit_DATA): $(SYSTEMD_USER_UNIT_IN_FILES) Makefile sed -e "s|\@bindir\@|$(bindir)|g" "$(srcdir)/$(@:.service=.service.in)" > $@ +# Appdata file +if ENABLE_GUI +appdatadir = @datadir@/appdata +appdata_DATA = $(APPDATA_IN_FILES:.xml.in=.xml) + +# We would preferable use @INTLTOOL_XML_RULE@ here but +# sadly it is broken for out-of-tree builds. +%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) + $(AM_V_GEN)$(MKDIR_P) $(@D); + $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +endif + + EXTRA_DIST = \ $(EXTRA_ROOTDOC_FILES) \ @@ -92,11 +108,13 @@ EXTRA_DIST = \ $(_UBUNTU_MONO_DARK_FILES) \ $(_UBUNTU_MONO_LIGHT_FILES) \ $(DESKTOP_IN_FILES) \ - $(SYSTEMD_USER_UNIT_IN_FILES) + $(SYSTEMD_USER_UNIT_IN_FILES) \ + $(APPDATA_IN_FILES) CLEANFILES = \ $(desktop_DATA) \ - $(systemduserunit_DATA) + $(systemduserunit_DATA) \ + $(appdata_DATA) # Update PO translations diff --git a/data/appdata/redshift-gtk.appdata.xml.in b/data/appdata/redshift-gtk.appdata.xml.in new file mode 100644 index 0000000..bb86f7d --- /dev/null +++ b/data/appdata/redshift-gtk.appdata.xml.in @@ -0,0 +1,14 @@ + + + + redshift-gtk.desktop + CC0 + GPL-3.0+ + + <_p>Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night. + <_p>The color temperature is set according to the position of the sun. A different color temperature is set during night and daytime. During twilight and early morning, the color temperature transitions smoothly from night to daytime temperature to allow your eyes to slowly adapt. + <_p>This program provides a status icon that allows the user to control Redshift. + + http://jonls.dk/redshift/ + jonlst@gmail.com + diff --git a/po/POTFILES.in b/po/POTFILES.in index 1f1a30e..7cdb757 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,5 +1,6 @@ # List of source files containing translatable strings +data/appdata/redshift-gtk.appdata.xml.in data/applications/redshift-gtk.desktop.in src/redshift.c -- cgit v1.2.3-70-g09d2