# Makefile for the MimeFilter package
# $Id: Makefile,v 1.2 2001/01/16 16:30:34 salve Exp $
#
# Copyright (C) 2000, 2001 by Davide Giovanni Maria Salvetti.
#
# 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.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
# On Debian GNU/Linux System you can find a copy of the GNU General Public
# License in /usr/doc/copyright/GPL.

etcdir = /etc/
prefix = /usr/local/
exec_prefix = $(prefix)

bindir = $(exec_prefix)/bin
mandir = $(prefix)/man

all: man

man: mimefilter.pl
	pod2man --section 1 --center "Debian GNU/Linux Manual" \
		--release "Debian Project" mimefilter.pl > mimefilter.1

install: all
	test -d $(bindir) \
		|| install -o root -g root -m 755 -d $(bindir)
	install -o root -g root -m 755 mimefilter.pl $(bindir)/mimefilter
	test -d $(mandir)/man1 \
		|| install -o root -g root -m 755 -d $(mandir)/man1
	install -o root -g root -m 644 mimefilter.1 $(mandir)/man1/
	test -d $(etcdir) \
		|| install -o root -g root -m 755 -d $(etcdir)
	install -o root -g root -m 644 config/mimefilter.rc $(etcdir)

clean:
	rm -f mimefilter.1

### Local Variables:
### mode: makefile
### End:
