ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/mports/trunk/Makefile
Revision: 2
Committed: Sun Sep 17 03:34:01 2006 UTC (17 years, 8 months ago) by archite
File size: 4618 byte(s)
Log Message:
Initial upload of MidnighBSD's mports

File Contents

# Content
1 # $MidnightBSD$
2 # $FreeBSD: ports/Makefile,v 1.96 2006/02/11 02:26:30 kris Exp $
3 #
4
5 SUBDIR += converters
6 SUBDIR += devel
7 SUBDIR += graphics
8 SUBDIR += irc
9 SUBDIR += lang
10 SUBDIR += net-im
11 SUBDIR += print
12 SUBDIR += textproc
13 SUBDIR += www
14 SUBDIR += x11
15
16 PORTSTOP= yes
17
18 .include <bsd.port.subdir.mk>
19
20 index:
21 @rm -f ${INDEXDIR}/${INDEXFILE}
22 @cd ${.CURDIR} && make ${INDEXDIR}/${INDEXFILE}
23
24 fetchindex: ${INDEXDIR}/{INDEXFILE}.bz2
25 @bunzip2 < ${INDEXDIR}/${INDEXFILE}.bz2 > ${INDEXDIR}/${INDEXFILE} && \
26 chmod a+r ${INDEXDIR}/${INDEXFILE}
27
28 ${INDEXDIR}/{INDEXFILE}.bz2: .PHONY
29 @${FETCHINDEX} ${INDEXDIR}/${INDEXFILE}.bz2 ${MASTER_SITE_INDEX}${INDEXFILE}.bz2
30
31 MASTER_SITE_INDEX?= http://www.FreeBSD.org/ports/
32 SETENV?= /usr/bin/env
33 FETCHINDEX?= ${SETENV} ${FETCH_ENV} fetch -am -o
34 INDEX_JOBS?= 2
35
36 .if !defined(INDEX_VERBOSE)
37 INDEX_ECHO_MSG= echo > /dev/null
38 INDEX_ECHO_1ST= echo -n
39 .else
40 INDEX_ECHO_MSG= echo 1>&2
41 INDEX_ECHO_1ST= echo
42 .endif
43
44 ${INDEXDIR}/${INDEXFILE}:
45 @${INDEX_ECHO_1ST} "Generating ${INDEXFILE} - please wait.."; \
46 if [ "${INDEX_PRISTINE}" != "" ]; then \
47 export LOCALBASE=/nonexistentlocal; \
48 export X11BASE=/nonexistentx; \
49 fi; \
50 tmpdir=`/usr/bin/mktemp -d -t index` || exit 1; \
51 trap "rm -rf $${tmpdir}; exit 1" 1 2 3 5 10 13 15; \
52 ( cd ${.CURDIR} && make -j${INDEX_JOBS} INDEX_TMPDIR=$${tmpdir} BUILDING_INDEX=1 \
53 ECHO_MSG="${INDEX_ECHO_MSG}" describe ) || \
54 (rm -rf $${tmpdir} ; \
55 if [ "${INDEX_QUIET}" = "" ]; then \
56 echo; \
57 echo "********************************************************************"; \
58 echo "Before reporting this error, verify that you are running a supported"; \
59 echo "version of FreeBSD (see http://www.FreeBSD.org/ports/) and that you"; \
60 echo "have a complete and up-to-date ports collection. (INDEX builds are"; \
61 echo "not supported with partial or out-of-date ports collections -- in"; \
62 echo "particular, if you are using cvsup, you must cvsup the \"ports-all\""; \
63 echo "collection, and have no \"refuse\" files.) If that is the case, then"; \
64 echo "report the failure to ports@FreeBSD.org together with relevant"; \
65 echo "details of your ports configuration (including FreeBSD version,"; \
66 echo "your architecture, your environment, and your /etc/make.conf"; \
67 echo "settings, especially compiler flags and WITH/WITHOUT settings)."; \
68 echo; \
69 echo "Note: the latest pre-generated version of INDEX may be fetched"; \
70 echo "automatically with \"make fetchindex\"."; \
71 echo "********************************************************************"; \
72 echo; \
73 fi; \
74 exit 1); \
75 cat $${tmpdir}/${INDEXFILE}.desc.* | (cd ${.CURDIR} ; perl ${.CURDIR}/Tools/make_index) | \
76 sed -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' -e 's./..g' | \
77 sort -t '|' +1 -2 | \
78 sed -e 's../.g' > ${INDEXDIR}/${INDEXFILE}.tmp; \
79 if [ "${INDEX_PRISTINE}" != "" ]; then \
80 sed -e "s,$${LOCALBASE},/usr/local," -e "s,$${X11BASE},/usr/X11R6," \
81 ${INDEXDIR}/${INDEXFILE}.tmp > ${INDEXDIR}/${INDEXFILE}; \
82 else \
83 mv ${INDEXDIR}/${INDEXFILE}.tmp ${INDEXDIR}/${INDEXFILE}; \
84 fi; \
85 rm -rf $${tmpdir}; \
86 echo " Done."
87
88 print-index: ${INDEXDIR}/${INDEXFILE}
89 @awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\nE-deps:\t%s\nP-deps:\t%s\nF-deps:\t%s\nWWW:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$11, $$12, $$13, $$10); }' < ${INDEXDIR}/${INDEXFILE}
90
91 CVS?= cvs
92 SUP?= cvsup
93 PORTSNAP?= portsnap
94 PORTSNAP_FLAGS?= -p ${.CURDIR}
95 .if defined(SUPHOST)
96 SUPFLAGS+= -h ${SUPHOST}
97 .endif
98 update:
99 .if defined(PORTSNAP_UPDATE)
100 @echo "--------------------------------------------------------------"
101 @echo ">>> Running ${PORTSNAP}"
102 @echo "--------------------------------------------------------------"
103 @${PORTSNAP} ${PORTSNAP_FLAGS} fetch
104 @${PORTSNAP} ${PORTSNAP_FLAGS} update
105 .elif defined(SUP_UPDATE) && defined(PORTSSUPFILE)
106 @echo "--------------------------------------------------------------"
107 @echo ">>> Running ${SUP}"
108 @echo "--------------------------------------------------------------"
109 @${SUP} ${SUPFLAGS} ${PORTSSUPFILE}
110 .elif defined(CVS_UPDATE)
111 @echo "--------------------------------------------------------------"
112 @echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT}
113 @echo "--------------------------------------------------------------"
114 cd ${.CURDIR}; ${CVS} -R -q update -A -P -d -I!
115 .elif defined(SUP_UPDATE) && !defined(PORTSSUPFILE)
116 @${ECHO_MSG} "Error: Please define PORTSSUPFILE before doing make update."
117 @exit 1
118 .else
119 @${ECHO_MSG} "Error: Please define either PORTSNAP_UPDATE, SUP_UPDATE, or CVS_UPDATE first."
120 .endif

Properties

Name Value
cvs2svn:cvs-rev 1.1.1.1