# Makefile for wmakerthemetodeb
# Copyright (C) Steve Haslam 1999. This is free software.
# Distributable under the terms of the GNU General Public License version 2.
# See the file 'COPYING' for license text.

VERSION=1.9

prefix=/usr/local
bindir=$(prefix)/bin
mandir=$(prefix)/share/man
man1dir=$(mandir)/man1
man3dir=$(mandir)/man3
libperldir=$(prefix)/lib/perl5

all: gtkthemetodeb.1 wmakerthemetodeb.1 sawmillthemetodeb.1 libperl.3pm

clean:
	rm -f gtkthemetodeb.1 wmakerthemetodeb.1 sawmillthemetodeb.1 libperl.3pm

%.1: %
	pod2man --center="Debian" --release="$(VERSION)" --section=1 $^ > $@

libperl.3pm: Debian/ThemeConverters.pm
	pod2man --center="Debian" --release="$(VERSION)" --section=3 $^ > $@

install: all
	install -d $(DESTDIR)$(bindir)
	install -c -m 755 wmakerthemetodeb $(DESTDIR)$(bindir)
	install -c -m 755 gtkthemetodeb $(DESTDIR)$(bindir)
	install -c -m 755 sawmillthemetodeb $(DESTDIR)$(bindir)
	install -d $(DESTDIR)$(libperldir)/Debian
	install -c -m 644 Debian/ThemeConverters.pm $(DESTDIR)$(libperldir)/Debian
	install -d $(DESTDIR)$(man1dir)
	install -c -m 644 gtkthemetodeb.1 $(DESTDIR)$(man1dir)
	install -c -m 644 wmakerthemetodeb.1 $(DESTDIR)$(man1dir)
	install -c -m 644 sawmillthemetodeb.1 $(DESTDIR)$(man1dir)
	install -d $(DESTDIR)$(man3dir)
	install -c -m 644 libperl.3pm $(DESTDIR)$(man3dir)/Debian::ThemeConverters.3pm
