--- Makefile.in.orig	Thu Sep  4 21:15:57 2008
+++ Makefile.in	Thu Sep  4 21:23:07 2008
@@ -56,17 +56,17 @@
 ERLBEHAVBEAMS = $(ERLBEHAVS:.erl=.beam)
 BEAMS = $(SOURCES:.erl=.beam)
 
-DESTDIR =
+DESTDIR = @prefix@
 
-EJABBERDDIR = $(DESTDIR)@localstatedir@/lib/ejabberd
+EJABBERDDIR = $(DESTDIR)/lib/erlang/lib/ejabberd-$(PORTVERSION)
 BEAMDIR = $(EJABBERDDIR)/ebin
 SPOOLDIR = $(EJABBERDDIR)/db
 PRIVDIR = $(EJABBERDDIR)/priv
 SODIR = $(PRIVDIR)/lib
 PBINDIR = $(PRIVDIR)/bin
 MSGSDIR = $(PRIVDIR)/msgs
-LOGDIR = $(DESTDIR)@localstatedir@/log/ejabberd
-ETCDIR = $(DESTDIR)@sysconfdir@/ejabberd
+LOGDIR = /var/log/ejabberd
+ETCDIR = $(DESTDIR)/etc/ejabberd
 SBINDIR = $(DESTDIR)@sbindir@
 
 ifeq ($(shell uname),Darwin)
@@ -122,12 +122,10 @@
 	install -d $(MSGSDIR)
 	install -m 644 msgs/*.msg $(MSGSDIR)
 	install -d -m 750 $(ETCDIR)
-	[ -f $(ETCDIR)/ejabberd.cfg ] && install -b -m 644 ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg-new || install -b -m 644 ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg
+	install -b -m 644 ejabberd.cfg.example $(ETCDIR)
 	sed -e "s*@rootdir@*@prefix@*" -e "s*@erl@*@ERL@*" ejabberdctl.template > ejabberdctl.example
-	[ -f $(ETCDIR)/ejabberdctl.cfg ] && install -b -m 644 ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new || install -b -m 644 ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
-	install -b -m 644 inetrc $(ETCDIR)/inetrc
+	install -b -m 644 ejabberdctl.cfg.example $(ETCDIR)
 	install -d $(SBINDIR)
-	install -m 755 ejabberdctl.example $(SBINDIR)/ejabberdctl
 	install -d -m 750 $(LOGDIR)
 
 uninstall: uninstall-binary
