| 1 |
QMAILSRC = ../qmail-1.03 |
| 2 |
CHECKPASSWORDSRC= ../checkpassword-0.90 |
| 3 |
UCSPITCPSRC = ../ucspi-tcp-0.88 |
| 4 |
PREFIX = /var/qmail |
| 5 |
CAT = /bin/cat |
| 6 |
RM = /bin/rm |
| 7 |
CP = /bin/cp |
| 8 |
SHELL = /bin/sh |
| 9 |
PATCH = /usr/bin/patch |
| 10 |
|
| 11 |
all: copy |
| 12 |
|
| 13 |
|
| 14 |
# copy djblib and source |
| 15 |
copy: copy-qmail copy-checkpassword copy-vida |
| 16 |
|
| 17 |
copy-qmail: |
| 18 |
here=`pwd` && cd src/qmail && \ |
| 19 |
${CP} `${CAT} $${here}/src/qmail/FILES` $${here}/${QMAILSRC}/ |
| 20 |
|
| 21 |
copy-checkpassword: |
| 22 |
here=`pwd` && cd src/checkpassword && \ |
| 23 |
${CP} `${CAT} $${here}/src/checkpassword/FILES` $${here}/${CHECKPASSWORDSRC}/ |
| 24 |
here=`pwd` && cd ${QMAILSRC} && \ |
| 25 |
${CP} `${CAT} $${here}/djblib/checkpassword/QMAIL` $${here}/${CHECKPASSWORDSRC}/ |
| 26 |
here=`pwd` && cd ${UCSPITCPSRC} && \ |
| 27 |
${CP} `${CAT} $${here}/djblib/checkpassword/UCSPITCP` $${here}/${CHECKPASSWORDSRC}/ |
| 28 |
|
| 29 |
copy-vida: |
| 30 |
here=`pwd` && cd ${QMAILSRC} && \ |
| 31 |
${CP} `${CAT} $${here}/djblib/vida/QMAIL` $${here}/src/vida/ |
| 32 |
here=`pwd` && cd ${UCSPITCPSRC} && \ |
| 33 |
${CP} `${CAT} $${here}/djblib/vida/UCSPITCP` $${here}/src/vida/ |
| 34 |
here=`pwd` && cd ${CHECKPASSWORDSRC} && \ |
| 35 |
${CP} `${CAT} $${here}/djblib/vida/CHECKPASSWORD` $${here}/src/vida/ |
| 36 |
|
| 37 |
|
| 38 |
# apply patch |
| 39 |
patch: patch-qmail patch-checkpassword |
| 40 |
|
| 41 |
patch-qmail: |
| 42 |
here=`pwd` && cd ${QMAILSRC} && \ |
| 43 |
${PATCH} -p1 < $${here}/patch/qmail.patch |
| 44 |
|
| 45 |
patch-checkpassword: |
| 46 |
here=`pwd` && cd ${CHECKPASSWORDSRC} && \ |
| 47 |
${PATCH} -p1 < $${here}/patch/checkpassword.patch |
| 48 |
|
| 49 |
|
| 50 |
# install document |
| 51 |
install-doc: |
| 52 |
mkdir -p ${PREFIX}/doc/qmail-vida; \ |
| 53 |
cd doc && ${CP} -R * ${PREFIX}/doc/qmail-vida/ |
| 54 |
|
| 55 |
|
| 56 |
# clean |
| 57 |
clean: clean-qmail clean-checkpassword clean-vida |
| 58 |
${RM} -f *~; ${RM} -f src/qmail/*~ src/checkpassword/*~ src/vida/*~ doc/*~ |
| 59 |
|
| 60 |
clean-qmail: |
| 61 |
here=`pwd` && cd ${QMAILSRC} && \ |
| 62 |
${RM} -f `${CAT} $${here}/src/qmail/FILES` |
| 63 |
|
| 64 |
clean-checkpassword: |
| 65 |
here=`pwd` && cd ${CHECKPASSWORDSRC} && \ |
| 66 |
${RM} -f `${CAT} $${here}/src/checkpassword/FILES`; \ |
| 67 |
${RM} -f `cd $${here}/djblib/checkpassword; ${CAT} QMAIL`; \ |
| 68 |
${RM} -f `cd $${here}/djblib/checkpassword; ${CAT} UCSPITCP`; |
| 69 |
|
| 70 |
clean-vida: |
| 71 |
here=`pwd` && cd src/vida && \ |
| 72 |
${RM} -f `cd $${here}/djblib/vida; ${CAT} QMAIL UCSPITCP CHECKPASSWORD`; |
| 73 |
|
| 74 |
|
| 75 |
# for maintainance |
| 76 |
log: |
| 77 |
test -f ChangeLog && rm ChangeLog; \ |
| 78 |
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/qmail-vida log | \ |
| 79 |
cvs2cl.pl --stdin; |
| 80 |
|
| 81 |
dist: |
| 82 |
distdir="qmail-vida-`${CAT} VERSION`" && cd .. && mkdir $${distdir} && \ |
| 83 |
cp -R qmail-vida/* $${distdir}/ && \ |
| 84 |
find $${distdir} -path '*/CVS' -prune -exec rm -rf '{}' ';' ; \ |
| 85 |
tar co $${distdir} | gzip > $${distdir}.tar.gz && \ |
| 86 |
rm -rf $${distdir} |
| 87 |
|
| 88 |
makepatch: |
| 89 |
(cd .. && diff -u qmail-1.03.orig qmail-1.03)| \ |
| 90 |
${CAT} - > patch/qmail.patch |
| 91 |
(cd .. && diff -u checkpassword-0.90.orig checkpassword-0.90)| \ |
| 92 |
${CAT} - > patch/checkpassword.patch |
| 93 |
|
| 94 |
|