diff --git a/Makefile.am b/Makefile.am index c94f888..14335fa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,10 +15,19 @@ ubuntu_mono_light_icondir = @datadir@/icons/ubuntu-mono-light/scalable/apps ubuntu_mono_light_icon_DATA = data/icons/ubuntu-mono-light/scalable/apps/redshift.svg \ data/icons/ubuntu-mono-light/scalable/apps/redshift-idle.svg + +# Desktop file +if ENABLE_GUI +desktopdir = @datadir@/applications +desktop_DATA = data/applications/gtk-redshift.desktop +endif + + EXTRA_DIST = \ $(hicolor_icon_DATA) \ $(ubuntu_mono_dark_icon_DATA) \ - $(ubuntu_mono_light_icon_DATA) + $(ubuntu_mono_light_icon_DATA) \ + $(desktop_DATA) # Update PO translations diff --git a/configure.ac b/configure.ac index fb29b91..15f67d1 100644 --- a/configure.ac +++ b/configure.ac @@ -171,6 +171,7 @@ AS_IF([test "x$enable_gui" != xappindicator -a "x$enable_gui" != xstatusicon], [ AC_MSG_RESULT([$enable_gui]) +AM_CONDITIONAL([ENABLE_GUI], [test "x$enable_gui" != xnone]) AM_CONDITIONAL([ENABLE_STATUSICON], [test "x$enable_gui" = xstatusicon]) AM_CONDITIONAL([ENABLE_APPINDICATOR], [test "x$enable_gui" = xappindicator]) diff --git a/src/gtk-redshift/gtk-redshift.desktop b/data/applications/gtk-redshift.desktop similarity index 100% rename from src/gtk-redshift/gtk-redshift.desktop rename to data/applications/gtk-redshift.desktop diff --git a/src/gtk-redshift/Makefile.am b/src/gtk-redshift/Makefile.am index 42647f7..5896f1b 100644 --- a/src/gtk-redshift/Makefile.am +++ b/src/gtk-redshift/Makefile.am @@ -10,10 +10,6 @@ nodist_gtk_redshift_PYTHON = \ gtk_redshiftdir = $(pythondir)/gtk_redshift bin_SCRIPTS = gtk-redshift - -# Desktop file -desktopdir = ${datadir}/applications -desktop_DATA = gtk-redshift.desktop endif if ENABLE_APPINDICATOR @@ -27,10 +23,6 @@ nodist_gtk_redshift_PYTHON = \ gtk_redshiftdir = $(pythondir)/gtk_redshift bin_SCRIPTS = gtk-redshift - -# Desktop file -desktopdir = ${datadir}/applications -desktop_DATA = gtk-redshift.desktop endif EXTRA_DIST = gtk-redshift.in \