summaryrefslogtreecommitdiff
path: root/themes/Makefile.am
blob: 3fab2d60ebd69d25cc0fca0769c591e02dd5a117 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# $Id$

THEMES = Eterm auto cEterm chooser emacs irc mutt trans

EXTRA_DIST = Eterm/theme.cfg.in irc/theme.cfg.in chooser/theme.cfg.in emacs/theme.cfg.in mutt/theme.cfg.in trans/theme.cfg.in \
             Eterm/menus.cfg irc/menus.cfg chooser/menus.cfg emacs/menus.cfg mutt/menus.cfg trans/menus.cfg \
             cEterm/menus.cfg cEterm/theme.cfg.in auto/menus.cfg auto/theme.cfg.in

install-data-hook:
	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/themes
	-@for i in $(THEMES) ; do \
	  if test -d $(DESTDIR)$(pkgdatadir)/themes/$$i -a "@REMOVE_THEMES@" = "yes"; then \
	    echo "Removing $$i theme in $(DESTDIR)$(pkgdatadir)/themes as requested." ; \
	    $(RM) -rf $(DESTDIR)$(pkgdatadir)/themes/$$i ; \
	    if test -d $(DESTDIR)$(pkgdatadir)/themes/$$i ; then \
	      echo "ERROR:  Unable to remove theme." ; \
	    fi ; \
	  fi ; \
	  if test ! -d $(DESTDIR)$(pkgdatadir)/themes/$$i ; then \
	    echo "Installing $$i theme in $(DESTDIR)$(pkgdatadir)/themes" ; \
	    $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/themes/$$i ; \
	    $(CP) $(srcdir)/$$i/???* $(DESTDIR)$(pkgdatadir)/themes/$$i ; \
	    $(CHMOD) 755 $(DESTDIR)$(pkgdatadir)/themes/$$i ; \
	    $(CHMOD) 644 $(DESTDIR)$(pkgdatadir)/themes/$$i/???* ; \
	    rm -f $(DESTDIR)$(pkgdatadir)/themes/$$i/theme.cfg.in ; \
	    rm -f $(DESTDIR)$(pkgdatadir)/themes/$$i/theme.cfg.in.orig ; \
	  else \
	    echo "ALERT!  Not overwriting $$i theme in $(DESTDIR)$(pkgdatadir)/themes.  You will need to update this theme manually." ; \
	  fi ; \
	done