ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/mports/trunk/Makefile
Revision: 4565
Committed: Mon Mar 31 02:33:20 2008 UTC (16 years, 1 month ago) by laffer1
File size: 5030 byte(s)
Log Message:
Add indexbz2 target.  This is used to make the INDEX file for the webserver that all clients fetch.

File Contents

# User Rev Content
1 laffer1 4565 # $MidnightBSD: mports/Makefile,v 1.35 2007/10/15 06:52:06 laffer1 Exp $
2 archite 2 #
3    
4 wintellect 74 SUBDIR += accessibility
5 laffer1 20 SUBDIR += archivers
6 laffer1 920 SUBDIR += astro
7 laffer1 151 SUBDIR += audio
8 wintellect 658 SUBDIR += benchmarks
9 wintellect 709 SUBDIR += comms
10 archite 2 SUBDIR += converters
11 laffer1 294 SUBDIR += databases
12 laffer1 782 SUBDIR += deskutils
13 archite 2 SUBDIR += devel
14 wintellect 273 SUBDIR += dns
15 laffer1 167 SUBDIR += editors
16 laffer1 155 SUBDIR += emulators
17 laffer1 2697 SUBDIR += finance
18 laffer1 369 SUBDIR += ftp
19 laffer1 335 SUBDIR += games
20 laffer1 153 SUBDIR += german
21 archite 2 SUBDIR += graphics
22     SUBDIR += irc
23 laffer1 369 SUBDIR += java
24 archite 2 SUBDIR += lang
25 laffer1 167 SUBDIR += mail
26 laffer1 116 SUBDIR += math
27 laffer1 1360 SUBDIR += mbone
28 archite 10 SUBDIR += misc
29 wintellect 310 SUBDIR += multimedia
30 laffer1 688 SUBDIR += net
31 archite 2 SUBDIR += net-im
32 laffer1 630 SUBDIR += net-mgmt
33 wintellect 404 SUBDIR += net-p2p
34 wintellect 475 SUBDIR += news
35 laffer1 782 SUBDIR += palm
36 laffer1 862 SUBDIR += ports-mgmt
37 archite 2 SUBDIR += print
38 archite 8 SUBDIR += security
39 laffer1 103 SUBDIR += shells
40 archite 6 SUBDIR += sysutils
41 archite 2 SUBDIR += textproc
42     SUBDIR += www
43     SUBDIR += x11
44 wintellect 266 SUBDIR += x11-clocks
45 laffer1 3114 SUBDIR += x11-drivers
46 laffer1 151 SUBDIR += x11-fonts
47     SUBDIR += x11-fm
48     SUBDIR += x11-servers
49 laffer1 161 SUBDIR += x11-themes
50 wintellect 80 SUBDIR += x11-toolkits
51 archite 5 SUBDIR += x11-wm
52 archite 2
53     PORTSTOP= yes
54    
55     .include <bsd.port.subdir.mk>
56    
57     index:
58     @rm -f ${INDEXDIR}/${INDEXFILE}
59     @cd ${.CURDIR} && make ${INDEXDIR}/${INDEXFILE}
60    
61 laffer1 4565 indexbz2: index
62     @bzip2 ${INDEXDIR}/${INDEXFILE}
63    
64 archite 2 fetchindex: ${INDEXDIR}/{INDEXFILE}.bz2
65     @bunzip2 < ${INDEXDIR}/${INDEXFILE}.bz2 > ${INDEXDIR}/${INDEXFILE} && \
66     chmod a+r ${INDEXDIR}/${INDEXFILE}
67    
68     ${INDEXDIR}/{INDEXFILE}.bz2: .PHONY
69     @${FETCHINDEX} ${INDEXDIR}/${INDEXFILE}.bz2 ${MASTER_SITE_INDEX}${INDEXFILE}.bz2
70    
71 laffer1 289 MASTER_SITE_INDEX?= http://www.MidnightBSD.org/ports/
72 archite 2 SETENV?= /usr/bin/env
73     FETCHINDEX?= ${SETENV} ${FETCH_ENV} fetch -am -o
74     INDEX_JOBS?= 2
75    
76     .if !defined(INDEX_VERBOSE)
77     INDEX_ECHO_MSG= echo > /dev/null
78     INDEX_ECHO_1ST= echo -n
79     .else
80     INDEX_ECHO_MSG= echo 1>&2
81     INDEX_ECHO_1ST= echo
82     .endif
83    
84     ${INDEXDIR}/${INDEXFILE}:
85     @${INDEX_ECHO_1ST} "Generating ${INDEXFILE} - please wait.."; \
86     if [ "${INDEX_PRISTINE}" != "" ]; then \
87     export LOCALBASE=/nonexistentlocal; \
88     export X11BASE=/nonexistentx; \
89     fi; \
90     tmpdir=`/usr/bin/mktemp -d -t index` || exit 1; \
91     trap "rm -rf $${tmpdir}; exit 1" 1 2 3 5 10 13 15; \
92     ( cd ${.CURDIR} && make -j${INDEX_JOBS} INDEX_TMPDIR=$${tmpdir} BUILDING_INDEX=1 \
93     ECHO_MSG="${INDEX_ECHO_MSG}" describe ) || \
94     (rm -rf $${tmpdir} ; \
95     if [ "${INDEX_QUIET}" = "" ]; then \
96     echo; \
97     echo "********************************************************************"; \
98     echo "Before reporting this error, verify that you are running a supported"; \
99 laffer1 289 echo "version of MidnightBSD (see http://www.MidnightBSD.org/ports/) and that you"; \
100 archite 2 echo "have a complete and up-to-date ports collection. (INDEX builds are"; \
101     echo "not supported with partial or out-of-date ports collections -- in"; \
102     echo "particular, if you are using cvsup, you must cvsup the \"ports-all\""; \
103     echo "collection, and have no \"refuse\" files.) If that is the case, then"; \
104 laffer1 289 echo "report the failure to ports@MidnightBSD.org together with relevant"; \
105     echo "details of your ports configuration (including MidnightBSD version,"; \
106 archite 2 echo "your architecture, your environment, and your /etc/make.conf"; \
107     echo "settings, especially compiler flags and WITH/WITHOUT settings)."; \
108     echo; \
109     echo "Note: the latest pre-generated version of INDEX may be fetched"; \
110     echo "automatically with \"make fetchindex\"."; \
111     echo "********************************************************************"; \
112     echo; \
113     fi; \
114     exit 1); \
115     cat $${tmpdir}/${INDEXFILE}.desc.* | (cd ${.CURDIR} ; perl ${.CURDIR}/Tools/make_index) | \
116     sed -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' -e 's./..g' | \
117     sort -t '|' +1 -2 | \
118     sed -e 's../.g' > ${INDEXDIR}/${INDEXFILE}.tmp; \
119     if [ "${INDEX_PRISTINE}" != "" ]; then \
120     sed -e "s,$${LOCALBASE},/usr/local," -e "s,$${X11BASE},/usr/X11R6," \
121     ${INDEXDIR}/${INDEXFILE}.tmp > ${INDEXDIR}/${INDEXFILE}; \
122     else \
123     mv ${INDEXDIR}/${INDEXFILE}.tmp ${INDEXDIR}/${INDEXFILE}; \
124     fi; \
125     rm -rf $${tmpdir}; \
126     echo " Done."
127    
128     print-index: ${INDEXDIR}/${INDEXFILE}
129     @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}
130    
131     CVS?= cvs
132 laffer1 862 SUP?= csup
133 archite 2 .if defined(SUPHOST)
134     SUPFLAGS+= -h ${SUPHOST}
135     .endif
136     update:
137 laffer1 1169 .if defined(SUP_UPDATE) && defined(PORTSSUPFILE)
138 archite 2 @echo "--------------------------------------------------------------"
139     @echo ">>> Running ${SUP}"
140     @echo "--------------------------------------------------------------"
141     @${SUP} ${SUPFLAGS} ${PORTSSUPFILE}
142     .elif defined(CVS_UPDATE)
143     @echo "--------------------------------------------------------------"
144     @echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT}
145     @echo "--------------------------------------------------------------"
146     cd ${.CURDIR}; ${CVS} -R -q update -A -P -d -I!
147     .elif defined(SUP_UPDATE) && !defined(PORTSSUPFILE)
148     @${ECHO_MSG} "Error: Please define PORTSSUPFILE before doing make update."
149     @exit 1
150     .else
151     @${ECHO_MSG} "Error: Please define either PORTSNAP_UPDATE, SUP_UPDATE, or CVS_UPDATE first."
152     .endif

Properties

Name Value
cvs2svn:cvs-rev 1.36