# -------------------------------------------------------------------- 
# SMS Client, send messages to mobile phones and pagers		
#									
# Makefile								
#									
#  Copyright (C) 1997,1998,1999 Angelo Masci					
#									
#  This library is free software; you can redistribute it and/or	
#  modify it under the terms of the GNU Library General Public		
#  License as published by the Free Software Foundation; either	
#  version 2 of the License, or (at your option) any later version.	
#									
#  This library 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	
#  Library General Public License for more details.			
#									
#  You should have received a copy of the GNU Library General Public	
#  License along with this library; if not, write to the Free		
#  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.	
#									
#  You can contact the author at this e-mail address:			
#									
#  angelo@styx.demon.co.uk						
#									
# -------------------------------------------------------------------- 
# $Id: Makefile,v 5.1 1998/02/01 07:11:32 root Exp root $
# -------------------------------------------------------------------- 

include ../Makefile.config

# -------------------------------------------------------------------- 

all:

install: 
	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 755 -d $(DESTDIR)$(MLIBDIR)/services
	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 755 -d $(DESTDIR)$(SPOOLDIR)/smsclient
	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 755 -d $(DESTDIR)$(SPOOLDIR)/smsclient/errors
	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 755 -d $(DESTDIR)$(SPOOLDIR)/smsclient/locks
	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 755 -d $(DESTDIR)$(SPOOLDIR)/smsclient/incoming
	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 755 -d $(DESTDIR)$(SPOOLDIR)/smsclient/named_pipes
	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 755 -d $(DESTDIR)$(SPOOLDIR)/smsclient/services
	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 755 -d $(DESTDIR)$(MSERVICEDIR)/scripts

	( cd services ;\
	  for service in * ; do \
		  $(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 644 $$service $(DESTDIR)$(MLIBDIR)/services; \
		  $(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 755 -d $(DESTDIR)$(SPOOLDIR)/smsclient/services/$$service ; \
		  $(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 755 -d $(DESTDIR)$(SPOOLDIR)/smsclient/errors/$$service ; \
	  done )

	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 644 scripts/email $(DESTDIR)$(MSERVICEDIR)/scripts
	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 644 sms_config $(DESTDIR)$(MSERVICEDIR)
	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 644 sms_addressbook $(DESTDIR)$(MSERVICEDIR)
	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 644 sms_modem $(DESTDIR)$(MSERVICEDIR)
	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 644 sms_services $(DESTDIR)$(MSERVICEDIR)
	$(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 644 sms_daemons $(DESTDIR)$(MSERVICEDIR)
	
uninstall:
	$(RM) $(DESTDIR)$(MLIBDIR)/services/*
	$(RM) $(DESTDIR)$(MSERVICEDIR)/sms_config
	$(RM) $(DESTDIR)$(MSERVICEDIR)/sms_addressbook
	$(RM) $(DESTDIR)$(MSERVICEDIR)/sms_modem
	$(RM) $(DESTDIR)$(MSERVICEDIR)/sms_services
	$(RM) $(DESTDIR)$(MSERVICEDIR)/sms_daemons
	$(RM) $(DESTDIR)$(MSERVICEDIR)/scripts/*
	
# --------------------------------------------------------------------
