view Makefile @ 1:12e6616ee949 version-1

Add NEWS file
author Guido Berhoerster <guido+sonar-xfwm4-theme@berhoerster.name>
date Mon, 09 Mar 2015 12:15:38 +0100
parents 801746b5cd7f
children
line wrap: on
line source

#
# Copyright (C) 2011 Guido Berhoerster <guido+sonar-xfwm4-theme@berhoerster.name>
#
# This program 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 2
# of the License, or (at your option) any later version.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
# USA.
#

NAME =		sonar-xfwm4-theme
THEME_NAME =	Sonar
VERSION =	1
DISTNAME =	$(NAME)-$(VERSION)

CONVERT :=	gm convert
CONVERT.png :=	$(CONVERT) +dither -type TrueColorMatte
CONVERT.xpm :=	$(CONVERT) -depth 8 +dither
PAX :=		pax
GZIP :=		gzip
INSTALL :=	install
INSTALL.data :=	$(INSTALL) -D -m 0644

DESTDIR ?=
prefix ?=	/usr/local
themesdir ?=	$(prefix)/share/themes

XFWM4_THEME_DIR = $(THEME_NAME)/xfwm4
XFWM4_DECORATION = \
	$(XFWM4_THEME_DIR)/top-left-active.xpm \
	$(XFWM4_THEME_DIR)/top-right-active.xpm \
	$(XFWM4_THEME_DIR)/top-left-inactive.xpm \
	$(XFWM4_THEME_DIR)/top-right-inactive.xpm \
	$(XFWM4_THEME_DIR)/title-1-active.xpm \
	$(XFWM4_THEME_DIR)/title-2-active.xpm \
	$(XFWM4_THEME_DIR)/title-3-active.xpm \
	$(XFWM4_THEME_DIR)/title-4-active.xpm \
	$(XFWM4_THEME_DIR)/title-5-active.xpm \
	$(XFWM4_THEME_DIR)/title-1-inactive.xpm \
	$(XFWM4_THEME_DIR)/title-2-inactive.xpm \
	$(XFWM4_THEME_DIR)/title-3-inactive.xpm \
	$(XFWM4_THEME_DIR)/title-4-inactive.xpm \
	$(XFWM4_THEME_DIR)/title-5-inactive.xpm \
	$(XFWM4_THEME_DIR)/left-active.xpm \
	$(XFWM4_THEME_DIR)/right-active.xpm \
	$(XFWM4_THEME_DIR)/left-inactive.xpm \
	$(XFWM4_THEME_DIR)/right-inactive.xpm \
	$(XFWM4_THEME_DIR)/bottom-left-active.xpm \
	$(XFWM4_THEME_DIR)/bottom-right-active.xpm \
	$(XFWM4_THEME_DIR)/bottom-left-inactive.xpm \
	$(XFWM4_THEME_DIR)/bottom-right-inactive.xpm \
	$(XFWM4_THEME_DIR)/bottom-active.xpm \
	$(XFWM4_THEME_DIR)/bottom-inactive.xpm \
	$(NULL)
XFWM4_BUTTONS = \
	$(XFWM4_THEME_DIR)/menu-active.xpm \
	$(XFWM4_THEME_DIR)/menu-prelight.xpm \
	$(XFWM4_THEME_DIR)/menu-pressed.xpm \
	$(XFWM4_THEME_DIR)/menu-inactive.xpm \
	$(XFWM4_THEME_DIR)/hide-active.png \
	$(XFWM4_THEME_DIR)/hide-active.xpm \
	$(XFWM4_THEME_DIR)/hide-inactive.png \
	$(XFWM4_THEME_DIR)/hide-inactive.xpm \
	$(XFWM4_THEME_DIR)/hide-prelight.png \
	$(XFWM4_THEME_DIR)/hide-prelight.xpm \
	$(XFWM4_THEME_DIR)/hide-pressed.png \
	$(XFWM4_THEME_DIR)/hide-pressed.xpm \
	$(XFWM4_THEME_DIR)/maximize-active.png \
	$(XFWM4_THEME_DIR)/maximize-active.xpm \
	$(XFWM4_THEME_DIR)/maximize-prelight.png \
	$(XFWM4_THEME_DIR)/maximize-prelight.xpm \
	$(XFWM4_THEME_DIR)/maximize-pressed.png \
	$(XFWM4_THEME_DIR)/maximize-pressed.xpm \
	$(XFWM4_THEME_DIR)/maximize-inactive.png \
	$(XFWM4_THEME_DIR)/maximize-inactive.xpm \
	$(XFWM4_THEME_DIR)/maximize-toggled-active.png \
	$(XFWM4_THEME_DIR)/maximize-toggled-active.xpm \
	$(XFWM4_THEME_DIR)/maximize-toggled-prelight.png \
	$(XFWM4_THEME_DIR)/maximize-toggled-prelight.xpm \
	$(XFWM4_THEME_DIR)/maximize-toggled-pressed.png \
	$(XFWM4_THEME_DIR)/maximize-toggled-pressed.xpm \
	$(XFWM4_THEME_DIR)/maximize-toggled-inactive.png \
	$(XFWM4_THEME_DIR)/maximize-toggled-inactive.xpm \
	$(XFWM4_THEME_DIR)/close-active.png \
	$(XFWM4_THEME_DIR)/close-active.xpm \
	$(XFWM4_THEME_DIR)/close-prelight.png \
	$(XFWM4_THEME_DIR)/close-prelight.xpm \
	$(XFWM4_THEME_DIR)/close-pressed.png \
	$(XFWM4_THEME_DIR)/close-pressed.xpm \
	$(XFWM4_THEME_DIR)/close-inactive.png \
	$(XFWM4_THEME_DIR)/close-inactive.xpm \
	$(NULL)

.DEFAULT_TARGET = all

.PHONY: all clean clobber dist install

all: $(XFWM4_DECORATION) $(XFWM4_BUTTONS)

$(XFWM4_THEME_DIR)/top-left-active.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 6x29+0+0 $< $@

$(XFWM4_THEME_DIR)/top-right-active.xpm: $(XFWM4_THEME_DIR)/top-left-active.xpm
	$(CONVERT) -flop $< $@

$(XFWM4_THEME_DIR)/top-left-inactive.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 6x29+14+0 $< $@

$(XFWM4_THEME_DIR)/top-right-inactive.xpm: $(XFWM4_THEME_DIR)/top-left-inactive.xpm
	$(CONVERT) -flop $< $@

$(XFWM4_THEME_DIR)/title-1-active.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 8x29+6+0 $< $@

$(XFWM4_THEME_DIR)/title-2-active.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 8x29+6+0 $< $@

$(XFWM4_THEME_DIR)/title-3-active.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 8x29+6+0 $< $@

$(XFWM4_THEME_DIR)/title-4-active.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 8x29+6+0 $< $@

$(XFWM4_THEME_DIR)/title-5-active.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 8x29+6+0 $< $@

$(XFWM4_THEME_DIR)/title-1-inactive.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 8x29+20+0 $< $@

$(XFWM4_THEME_DIR)/title-2-inactive.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 8x29+20+0 $< $@

$(XFWM4_THEME_DIR)/title-3-inactive.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 8x29+20+0 $< $@

$(XFWM4_THEME_DIR)/title-4-inactive.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 8x29+20+0 $< $@

$(XFWM4_THEME_DIR)/title-5-inactive.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 8x29+20+0 $< $@

$(XFWM4_THEME_DIR)/left-active.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 2x8+0+29 $< $@

$(XFWM4_THEME_DIR)/right-active.xpm: $(XFWM4_THEME_DIR)/left-active.xpm
	$(CONVERT) -flop $< $@

$(XFWM4_THEME_DIR)/left-inactive.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 2x8+14+29 $< $@

$(XFWM4_THEME_DIR)/right-inactive.xpm: $(XFWM4_THEME_DIR)/left-inactive.xpm
	$(CONVERT) -flop $< $@

$(XFWM4_THEME_DIR)/bottom-left-active.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 6x5+0+37 $< $@

$(XFWM4_THEME_DIR)/bottom-right-active.xpm: $(XFWM4_THEME_DIR)/bottom-left-active.xpm
	$(CONVERT) -flop $< $@

$(XFWM4_THEME_DIR)/bottom-left-inactive.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 6x5+14+37 $< $@

$(XFWM4_THEME_DIR)/bottom-right-inactive.xpm: $(XFWM4_THEME_DIR)/bottom-left-inactive.xpm
	$(CONVERT) -flop $< $@

$(XFWM4_THEME_DIR)/bottom-active.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 8x5+6+37 $< $@

$(XFWM4_THEME_DIR)/bottom-inactive.xpm: decoration-template.png
	$(CONVERT.xpm) -crop 8x5+14+37 $< $@

$(XFWM4_THEME_DIR)/menu-active.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+66 $< $@

$(XFWM4_THEME_DIR)/menu-prelight.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+66 $< $@

$(XFWM4_THEME_DIR)/menu-pressed.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+88 $< $@

$(XFWM4_THEME_DIR)/menu-inactive.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+110 $< $@

$(XFWM4_THEME_DIR)/hide-active.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+0+0 $< $@

$(XFWM4_THEME_DIR)/hide-active.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+66 $< $@

$(XFWM4_THEME_DIR)/hide-inactive.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+0+44 $< $@

$(XFWM4_THEME_DIR)/hide-inactive.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+110 $< $@

$(XFWM4_THEME_DIR)/hide-prelight.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+0+22 $< $@

$(XFWM4_THEME_DIR)/hide-prelight.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+66 $< $@

$(XFWM4_THEME_DIR)/hide-pressed.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+0+0 $< $@

$(XFWM4_THEME_DIR)/hide-pressed.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+88 $< $@

$(XFWM4_THEME_DIR)/maximize-active.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+22+0 $< $@

$(XFWM4_THEME_DIR)/maximize-active.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+66 $< $@

$(XFWM4_THEME_DIR)/maximize-prelight.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+22+22 $< $@

$(XFWM4_THEME_DIR)/maximize-prelight.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+66 $< $@

$(XFWM4_THEME_DIR)/maximize-pressed.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+22+0 $< $@

$(XFWM4_THEME_DIR)/maximize-pressed.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+88 $< $@

$(XFWM4_THEME_DIR)/maximize-inactive.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+22+44 $< $@

$(XFWM4_THEME_DIR)/maximize-inactive.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+110 $< $@

$(XFWM4_THEME_DIR)/maximize-toggled-active.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+44+0 $< $@

$(XFWM4_THEME_DIR)/maximize-toggled-active.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+66 $< $@

$(XFWM4_THEME_DIR)/maximize-toggled-prelight.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+44+22 $< $@

$(XFWM4_THEME_DIR)/maximize-toggled-prelight.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+66 $< $@

$(XFWM4_THEME_DIR)/maximize-toggled-pressed.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+44+0 $< $@

$(XFWM4_THEME_DIR)/maximize-toggled-pressed.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+88 $< $@

$(XFWM4_THEME_DIR)/maximize-toggled-inactive.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+44+44 $< $@

$(XFWM4_THEME_DIR)/maximize-toggled-inactive.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+110 $< $@

$(XFWM4_THEME_DIR)/close-active.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+66+0 $< $@

$(XFWM4_THEME_DIR)/close-active.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+66 $< $@

$(XFWM4_THEME_DIR)/close-prelight.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+66+22 $< $@

$(XFWM4_THEME_DIR)/close-prelight.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+66 $< $@

$(XFWM4_THEME_DIR)/close-pressed.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+66+0 $< $@

$(XFWM4_THEME_DIR)/close-pressed.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+88 $< $@

$(XFWM4_THEME_DIR)/close-inactive.png: buttons-template.png
	$(CONVERT.png) -crop 22x22+66+44 $< $@

$(XFWM4_THEME_DIR)/close-inactive.xpm: buttons-template.png
	$(CONVERT.xpm) -crop 22x22+0+110 $< $@

install: all
	for theme_file in $(XFWM4_THEME_DIR)/themerc $(XFWM4_DECORATION) \
	        $(XFWM4_BUTTONS); do \
	    $(INSTALL.data) $${theme_file} \
	            "$(DESTDIR)$(themesdir)/$${theme_file}"; \
	done

clean:
	rm -f $(XFWM4_DECORATION) $(XFWM4_BUTTONS)

clobber: clean

dist: all
	$(PAX) -w -x ustar -s ',.*/\..*,,' -s ',./[^/]*\.tar\.gz,,' \
	    -s ',\./,$(DISTNAME)/,' . | $(GZIP) > $(DISTNAME).tar.gz