source: trunk/base/doc/Makefile @ 2426

Last change on this file since 2426 was 2101, checked in by kevin, 18 years ago

Be smarter about generating and cleaning prefix.mtree

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1MAN7=           portfile.7 portstyle.7
2INSTALLDIR=     ${DESTDIR}${PREFIX}
3
4prefix.mtree:
5        cat prefix.mtree.pre | sed -e "s/uname=UNAME/uname=${DSTUSR}/" | \
6        sed -e "s/gname=GNAME/gname=${DSTGRP}/" > prefix.mtree
7
8all: prefix.mtree
9
10clean:
11        rm -f prefix.mtree
12
13install:
14        mkdir -p ${DESTDIR}${ETCDIR}
15        mkdir -p ${INSTALLDIR}
16       
17        cat prefix.mtree | mtree -U -d -e -p ${INSTALLDIR} > /dev/null
18        @if [ ! -e ${DESTDIR}/${ETCDIR}/ports.conf ]; then \
19                set -x; \
20                install -o ${DSTUSR} -g ${DSTGRP} -m 644 ports.conf ${DESTDIR}${ETCDIR}; \
21        fi
22
23        @if [ ! -e ${DESTDIR}${ETCDIR}/sources.conf ]; then \
24                set -x; \
25                install -o ${DSTUSR} -g ${DSTGRP} -m 644 sources.conf ${DESTDIR}${ETCDIR}; \
26        fi
27        install -o ${DSTUSR} -g ${DSTGRP} -m 644 prefix.mtree ${DESTDIR}${ETCDIR}
28        mkdir -p ${INSTALLDIR}/share/darwinports/resources/port1.0/install
29        install -o ${DSTUSR} -g ${DSTGRP} -m 644 prefix.mtree ${INSTALLDIR}/share/darwinports/resources/port1.0/install/
30        install -o ${DSTUSR} -g ${DSTGRP} -m 644 macosx.mtree ${INSTALLDIR}/share/darwinports/resources/port1.0/install/
31        install -o ${DSTUSR} -g ${DSTGRP} -m 444 portfile.7 ${INSTALLDIR}/man/man7
32        install -o ${DSTUSR} -g ${DSTGRP} -m 444 portstyle.7 ${INSTALLDIR}/man/man7
33
34include ../Mk/dports.mk
Note: See TracBrowser for help on using the repository browser.