This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
deb-mbse/Makefile

217 lines
6.9 KiB
Makefile
Raw Normal View History

2001-11-03 21:57:45 +00:00
# Top-level makefile for MBSE BBS package
2001-11-03 22:32:01 +00:00
# $Id$
2001-11-03 21:57:45 +00:00
include Makefile.global
OTHER = AUTHORS ChangeLog COPYING DEBUG CRON.sh FILE_ID.DIZ.in \
2002-05-11 19:52:56 +00:00
INSTALL.in Makefile Makefile.global.in NEWS \
2002-06-01 13:46:50 +00:00
ChangeLog_1998 ChangeLog_1999 ChangeLog_2000 ChangeLog_2001 \
ChangeLog_2002 README SETUP.sh TODO UPGRADE aclocal.m4 \
2002-06-15 14:09:15 +00:00
checkbasic config.h.in configure configure.in paths.h.in
2003-10-26 10:34:21 +00:00
TARFILE = ${PACKAGE}-${VERSION}.tar.bz2
2001-11-03 21:57:45 +00:00
###############################################################################
all depend:
@if [ -z ${MBSE_ROOT} ] ; then \
echo; echo " MBSE_ROOT is not set!"; echo; exit 3; \
else \
for d in ${SUBDIRS}; do (cd $$d && ${MAKE} $@) || exit; done; \
fi
install:
@./checkbasic
@if [ "`id -un`" != "root" ] ; then \
echo; echo " Must be root to install!"; echo; exit 3; \
fi
2001-11-25 12:18:18 +00:00
@if [ -z ${PREFIX} ] ; then \
echo; echo "PREFIX is not set!"; echo; exit 3; \
fi
2001-11-03 21:57:45 +00:00
@if [ ! -d ${PREFIX}/bin ] ; then \
mkdir ${PREFIX}/bin ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/bin ; \
2001-11-03 21:57:45 +00:00
fi
@if [ ! -d ${PREFIX}/etc ] ; then \
mkdir ${PREFIX}/etc ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/etc ; \
2001-11-03 21:57:45 +00:00
fi
@chmod 0775 ${PREFIX}/etc
2002-01-25 20:21:50 +00:00
@if [ -f ${PREFIX}/etc/lastcall.data ] ; then \
chmod 0660 ${PREFIX}/etc/lastcall.data ; \
fi
@if [ -f ${PREFIX}/etc/sysinfo.data ] ; then \
chmod 0660 ${PREFIX}/etc/sysinfo.data ; \
fi
2001-11-03 21:57:45 +00:00
@if [ ! -d ${PREFIX}/doc ] ; then \
mkdir ${PREFIX}/doc ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/doc ; \
2001-11-03 21:57:45 +00:00
fi
@if [ ! -d ${PREFIX}/fdb ] ; then \
mkdir ${PREFIX}/fdb ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/fdb ; \
2001-11-03 21:57:45 +00:00
fi
@chmod 0775 ${PREFIX}/fdb
2001-11-03 21:57:45 +00:00
@if [ ! -d ${PREFIX}/log ] ; then \
mkdir ${PREFIX}/log ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/log ; \
2001-11-03 21:57:45 +00:00
fi
2001-12-07 22:19:55 +00:00
@chmod 0775 ${PREFIX}/log
2001-11-03 21:57:45 +00:00
@if [ ! -d ${PREFIX}/magic ] ; then \
mkdir ${PREFIX}/magic ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/magic ; \
2001-11-03 21:57:45 +00:00
fi
@if [ ! -d ${PREFIX}/sema ] ; then \
mkdir ${PREFIX}/sema ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/sema ; \
2001-11-03 21:57:45 +00:00
fi
2001-11-25 12:18:18 +00:00
@chmod 0777 ${PREFIX}/sema
2001-11-03 21:57:45 +00:00
@if [ ! -d ${PREFIX}/var ] ; then \
mkdir ${PREFIX}/var ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/var ; \
2001-11-03 21:57:45 +00:00
fi
@if [ ! -d ${PREFIX}/tmp ] ; then \
mkdir ${PREFIX}/tmp ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/tmp ; \
2001-11-03 21:57:45 +00:00
fi
2001-11-25 12:18:18 +00:00
@chmod 0775 ${PREFIX}/tmp
2001-11-03 21:57:45 +00:00
@if [ ! -d ${PREFIX}/dutch ] ; then \
mkdir ${PREFIX}/dutch ; \
mkdir ${PREFIX}/dutch/txtfiles ; \
mkdir ${PREFIX}/dutch/menus ; \
mkdir ${PREFIX}/dutch/macro ; \
2003-01-12 15:03:17 +00:00
${CHOWN} -R ${OWNER}:${GROUP} ${PREFIX}/dutch ; \
2001-11-03 21:57:45 +00:00
fi
2003-02-18 19:58:52 +00:00
@chmod 0775 ${PREFIX}/dutch/txtfiles
2001-11-03 21:57:45 +00:00
@if [ ! -d ${PREFIX}/english ] ; then \
mkdir ${PREFIX}/english ; \
mkdir ${PREFIX}/english/txtfiles ; \
mkdir ${PREFIX}/english/menus ; \
mkdir ${PREFIX}/english/macro ; \
2003-01-12 15:03:17 +00:00
${CHOWN} -R ${OWNER}:${GROUP} ${PREFIX}/english ; \
2001-11-03 21:57:45 +00:00
fi
2003-02-18 19:58:52 +00:00
@chmod 0775 ${PREFIX}/english/txtfiles
2001-11-03 21:57:45 +00:00
@if [ ! -d ${PREFIX}/italian ] ; then \
mkdir ${PREFIX}/italian ; \
mkdir ${PREFIX}/italian/txtfiles ; \
mkdir ${PREFIX}/italian/menus ; \
mkdir ${PREFIX}/italian/macro ; \
2003-01-12 15:03:17 +00:00
${CHOWN} -R ${OWNER}:${GROUP} ${PREFIX}/italian ; \
2001-11-03 21:57:45 +00:00
fi
2003-02-18 19:58:52 +00:00
@chmod 0775 ${PREFIX}/italian/txtfiles
2001-11-03 21:57:45 +00:00
@if [ ! -d ${PREFIX}/spanish ] ; then \
mkdir ${PREFIX}/spanish ; \
mkdir ${PREFIX}/spanish/txtfiles ; \
mkdir ${PREFIX}/spanish/menus ; \
mkdir ${PREFIX}/spanish/macro ; \
2003-01-12 15:03:17 +00:00
${CHOWN} -R ${OWNER}:${GROUP} ${PREFIX}/spanish ; \
2001-11-03 21:57:45 +00:00
fi
2003-02-18 19:58:52 +00:00
@chmod 0775 ${PREFIX}/spanish/txtfiles
2001-11-03 21:57:45 +00:00
@if [ ! -d ${PREFIX}/galego ] ; then \
mkdir ${PREFIX}/galego ; \
mkdir ${PREFIX}/galego/txtfiles ; \
mkdir ${PREFIX}/galego/menus ; \
mkdir ${PREFIX}/galego/macro ; \
2003-01-12 15:03:17 +00:00
${CHOWN} -R ${OWNER}:${GROUP} ${PREFIX}/galego ; \
2001-11-03 21:57:45 +00:00
fi
2003-02-18 19:58:52 +00:00
@chmod 0775 ${PREFIX}/galego/txtfiles
2001-12-06 19:48:00 +00:00
@if [ ! -d ${PREFIX}/german ] ; then \
mkdir ${PREFIX}/german; \
mkdir ${PREFIX}/german/txtfiles ; \
mkdir ${PREFIX}/german/menus ; \
mkdir ${PREFIX}/german/macro ; \
2003-01-12 15:03:17 +00:00
${CHOWN} -R ${OWNER}:${GROUP} ${PREFIX}/german; \
2001-12-06 19:48:00 +00:00
fi
2003-02-18 19:58:52 +00:00
@chmod 0775 ${PREFIX}/german/txtfiles
2001-12-25 17:57:32 +00:00
@if [ ! -d ${PREFIX}/ftp ] ; then \
mkdir ${PREFIX}/ftp ; \
mkdir ${PREFIX}/ftp/pub ; \
mkdir ${PREFIX}/ftp/incoming ; \
mkdir ${PREFIX}/ftp/pub/local ; \
2003-01-12 15:03:17 +00:00
${CHOWN} `id -un`:`id -gn` ${PREFIX}/ftp ; \
2001-12-25 17:57:32 +00:00
chmod 0755 ${PREFIX}/ftp ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/ftp/pub ; \
2001-12-25 17:57:32 +00:00
chmod 0755 ${PREFIX}/ftp/pub ; \
2003-01-12 15:03:17 +00:00
${CHOWN} `id -un`:`id -gn` ${PREFIX}/ftp/incoming ; \
2001-12-25 17:57:32 +00:00
chmod 0755 ${PREFIX}/ftp/incoming ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/ftp/pub/local ; \
chmod 0755 ${PREFIX}/ftp/pub/local ; \
2001-12-25 17:57:32 +00:00
fi
@if [ ! -d ${PREFIX}/var/bso ] ; then \
mkdir ${PREFIX}/var/nodelist ; \
mkdir ${PREFIX}/var/bso ; \
mkdir ${PREFIX}/var/bso/outbound ; \
2002-08-04 11:41:39 +00:00
mkdir ${PREFIX}/var/queue ; \
2001-12-25 17:57:32 +00:00
mkdir ${PREFIX}/var/msgs; \
mkdir ${PREFIX}/var/badtic ; \
mkdir ${PREFIX}/var/ticqueue ; \
mkdir ${PREFIX}/var/mail ; \
2003-01-12 15:03:17 +00:00
${CHOWN} -R ${OWNER}:${GROUP} ${PREFIX}/var ; \
2001-12-25 17:57:32 +00:00
chmod -R 0750 ${PREFIX}/var ; \
2001-11-03 21:57:45 +00:00
fi
@if [ ! -d ${PREFIX}/var/boxes ]; then \
mkdir ${PREFIX}/var/boxes ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/var/boxes ; \
chmod 0750 ${PREFIX}/var/boxes ; \
fi
2003-02-02 21:48:00 +00:00
@if [ ! -d ${PREFIX}/var/rules ]; then \
mkdir ${PREFIX}/var/rules ; \
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/var/rules ; \
fi
2003-08-03 12:20:30 +00:00
@if [ ! -d ${PREFIX}/var/run ]; then \
mkdir ${PREFIX}/var/run ; \
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/var/run ; \
fi
2003-08-23 14:57:51 +00:00
@if [ -d ${PREFIX}/var/inbound/tmp ]; then \
rmdir ${PREFIX}/var/inbound/tmp ; \
echo "Removed ${PREFIX}/var/inbound/tmp" ; \
fi
chmod 0770 ${PREFIX}/var/rules
2003-08-03 12:20:30 +00:00
chmod 0770 ${PREFIX}/var/run
2002-02-08 14:25:34 +00:00
@if [ ! -d ${PREFIX}/var/unknown ] ; then \
mkdir ${PREFIX}/var/unknown ; \
mkdir ${PREFIX}/var/inbound ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/var/unknown ; \
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/var/inbound ; \
2002-02-08 14:25:34 +00:00
chmod 0750 ${PREFIX}/var/unknown ; \
chmod 0750 ${PREFIX}/var/inbound ; \
fi
@chmod 0770 ${PREFIX}/var
@chmod 0770 ${PREFIX}/var/mail
2002-02-10 20:57:58 +00:00
@if [ ! -d ${PREFIX}/var/arealists ] ; then \
mkdir ${PREFIX}/var/arealists ; \
2003-01-12 15:03:17 +00:00
${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/var/arealists ; \
2002-02-10 20:57:58 +00:00
chmod 0750 ${PREFIX}/var/arealists ; \
fi
2002-02-09 15:59:49 +00:00
@if [ -x ${BINDIR}/mbfbgen ]; then \
rm ${BINDIR}/mbfbgen; \
echo "removed ${BINDIR}/mbfbgen"; \
fi
@if [ -x ${BINDIR}/fbutil ]; then \
rm ${BINDIR}/fbutil ; \
echo "removed ${BINDIR}/fbutil "; \
fi
@if [ -x ${BINDIR}/mbchat ]; then \
rm ${BINDIR}/mbchat ; \
echo "removed ${BINDIR}/mbchat"; \
fi
2001-11-03 21:57:45 +00:00
for d in ${SUBDIRS}; do (cd $$d && ${MAKE} $@) || exit; done
dist tar: ${TARFILE}
clean:
2003-01-06 13:44:30 +00:00
rm -f .filelist core ${TARFILE} paths.h config.h
2001-11-03 21:57:45 +00:00
for d in ${SUBDIRS}; do (cd $$d && ${MAKE} $@) || exit; done;
${TARFILE}: .filelist
cd ..; rm -f ${TARFILE}; \
2003-10-26 10:34:21 +00:00
${TAR} cvTf ./${PACKAGE}-${VERSION}/.filelist - | bzip2 >${TARFILE}
2001-11-03 21:57:45 +00:00
crontab:
sh ./CRON.sh
.filelist filelist:
(for f in ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$$f; done) >.filelist
for d in ${SUBDIRS}; do (cd $$d && ${MAKE} filelist && cat filelist >>../.filelist) || exit; done;