aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am11
-rw-r--r--src/gtk-redshift/defs.py.in21
2 files changed, 31 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 0761e50..f492abe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,6 +20,7 @@ EXTRA_redshift_SOURCES = \
AM_CFLAGS =
redshift_LDADD = @LIBINTL@
+EXTRA_DIST =
if ENABLE_RANDR
redshift_SOURCES += src/randr.c src/randr.h
@@ -40,15 +41,23 @@ endif
# gtk-redshift Script
if ENABLE_GTK
dist_bin_SCRIPTS = src/gtk-redshift/gtk-redshift.py
+bin_SCRIPTS = src/gtk-redshift/defs.py
+EXTRA_DIST += src/gtk-redshift/defs.py.in
endif
# Icons
icondir = @datadir@/icons/hicolor/scalable/apps
icon_DATA = data/icons/hicolor/scalable/apps/redshift.svg
-EXTRA_DIST = $(icon_DATA)
+EXTRA_DIST += $(icon_DATA)
+CLEANFILES = src/gtk-redshift/defs.py
+
+# Local python definitions
+src/gtk-redshift/defs.py: src/gtk-redshift/defs.py.in
+ sed -e "s|\@localedir\@|$(localedir)|g" $< > $@
+
# Update PO translations
.PHONY: update-po
update-po:
diff --git a/src/gtk-redshift/defs.py.in b/src/gtk-redshift/defs.py.in
new file mode 100644
index 0000000..91eccf9
--- /dev/null
+++ b/src/gtk-redshift/defs.py.in
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+# defs.py -- GTK+ redshift local definitions
+# This file is part of Redshift.
+
+# Redshift is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# Redshift is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with Redshift. If not, see <http://www.gnu.org/licenses/>.
+
+# Copyright (c) 2010 Jon Lund Steffensen <jonlst@gmail.com>
+
+
+LOCALEDIR = '@localedir@'