source: trunk/base/Makefile.in @ 79787

Last change on this file since 79787 was 79787, checked in by jmr@…, 9 years ago

use /var/empty for runuser home

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.1 KB
Line 
1# $Id: Makefile.in 79787 2011-06-25 22:21:16Z jmr@macports.org $
2
3PATH            = @PATH_CLEANED@
4SUBDIR          = doc src tests
5DISTDIR         = dist
6DISTVER         =
7DISTTAG         = release_${subst .,_,${DISTVER}}
8DISTNAME        = MacPorts-${DISTVER}
9DISTARCTAG      = ${DISTTAG}-archive
10DISTARCNAME     = ${DISTNAME}-archive
11SVNURL          = https://svn.macports.org/repository/macports
12
13
14include Mk/macports.autoconf.mk
15
16
17all:: Mk/macports.autoconf.mk
18
19Mk/macports.autoconf.mk: Mk/macports.autoconf.mk.in src/config.h.in Makefile.in config.status
20        ./config.status
21        ${MAKE} clean
22
23config.status: configure
24        @if test -f ./config.status ; then      \
25                set -x ;                                                \
26                ./config.status --recheck ;             \
27        else                                                            \
28                set -x ;                                                \
29                echo "Source tree not configured. Use ./configure" ; \
30        fi
31
32include Mk/macports.subdir.mk
33
34install::
35        [ ! -f $(DESTDIR)${sysconfdir}/macports/mp_version ] || rm -vf $(DESTDIR)${sysconfdir}/macports/mp_version
36        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 setupenv.bash  $(DESTDIR)${datadir}/macports/
37        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 macports-pubkey.pem  $(DESTDIR)${datadir}/macports/
38# Only run these scripts when not building in a destroot
39ifeq ($(DESTDIR),)
40# create run user if it doesn't exist
41        @if test -n "${DSCL}" -a -n "${DSEDITGROUP}" ; then \
42        if ! ${DSEDITGROUP} -q -o read ${RUNUSR} > /dev/null 2>&1 ; then \
43            if test `id -u` -eq 0; then \
44                echo "Creating group \"${RUNUSR}\"" ; \
45                ${DSEDITGROUP} -q -o create -n . ${RUNUSR} ; \
46            else \
47                echo "Not creating group \"${RUNUSR}\" (not root)" ; \
48            fi ; \
49        fi ; \
50        if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then \
51            if test `id -u` -eq 0; then \
52                echo "Creating user \"${RUNUSR}\"" ; \
53                ${DSCL} -q . -create /Users/${RUNUSR} Password \* ; \
54                ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $$(($$(${DSCL} -q . -list /Users UniqueID | /usr/bin/awk '{print $$2}' | sort -ug | tail -1)+1)) ; \
55                ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}') ; \
56                ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory /var/empty ; \
57                ${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false ; \
58            else \
59                echo "Not creating user \"${RUNUSR}\" (not root)" ; \
60            fi ; \
61        fi ; \
62    else \
63        echo "Can't find ${DSCL} / ${DSEDITGROUP}, not creating user \"${RUNUSR}\"" ; \
64    fi
65# Add [default] tag to the central MacPorts repository, if it isn't already
66        $(TCLSH) src/upgrade_sources_conf_default.tcl "${prefix}"
67# Convert image directories (and direct mode installs) to image archives
68        $(TCLSH) src/images_to_archives.tcl "${macports_tcl_dir}"
69endif
70        @echo ""; echo "Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, add ${prefix}/bin to your PATH and run:"; echo ""
71        @echo "sudo port -v selfupdate"; echo ""
72        @echo "Please read \"man port\", the MacPorts guide at http://guide.macports.org/ and Wiki at https://trac.macports.org/ for full documentation."; echo ""
73
74group::
75        @echo "creating a macports group..." && sudo dseditgroup -o create -n . macports && echo "done! use './configure --with-install-group=macports --with-shared-directory' if you haven't already"
76
77rmgroup::
78        @echo "deleting macports group..." && sudo dseditgroup -o delete -n . macports && echo "done! use 'make group' to re-create"
79
80
81clean::
82
83distclean::
84        rm -f config.log config.status configure.lineno
85        rm -rf autom4te.cache ${DISTDIR}
86        rm -f Makefile Mk/macports.autoconf.mk portmgr/freebsd/Makefile
87        rm -f Doxyfile
88        rm -f setupenv.bash
89
90_gettag:
91        cd ${DISTDIR}; svn co ${SVNURL}/tags/${SVNTAG} ${PKGNAME}-svn
92
93_pkgdist:
94        [ ! -d ${DISTDIR}/${PKGNAME} ] || rm -rf ${DISTDIR}/${PKGNAME}
95        cd ${DISTDIR}; svn export ${PKGNAME}-svn ${PKGNAME}
96        cd ${DISTDIR}; COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar -c ${PKGNAME} | gzip > ${PKGNAME}.tar.gz
97        cd ${DISTDIR}; COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar -c ${PKGNAME} | bzip2 > ${PKGNAME}.tar.bz2
98        cd ${DISTDIR}; for tarball in ${PKGNAME}.tar.*; do { \
99                for type in -md5 -sha1 -ripemd160 -sha256; do { \
100                        openssl dgst $$type $$tarball; \
101                }; done >> ${DISTNAME}.chk.txt; \
102        }; done
103
104_dopkg: _gettag _pkgdist
105
106# This target fetches a tagged distribution from svn, and generates tarballs and checksums for it
107distfromsvn:
108        @[ -n "${DISTVER}" ] || { echo Must specify DISTVER, like: make DISTVER=1.4.0 distfromsvn; exit 1; }
109        [ -d ${DISTDIR} ] || mkdir ${DISTDIR}
110        rm -f ${DISTDIR}/${DISTNAME}.chk.txt
111        ${MAKE} SVNTAG=${DISTTAG}/base/ PKGNAME=${DISTNAME} _dopkg
112ifeq ($(ARC),yes)
113        ${MAKE} SVNTAG=${DISTARCTAG} PKGNAME=${DISTARCNAME} _dopkg
114endif
115
116tcldoc:
117        @[ -e "${prefix}/bin/tcldoc" ] \
118                || { echo "Install tcldoc with MacPorts in ${prefix} first."; exit 1; }
119        find src -name '*.tcl' | xargs ${TCLDOC} --verbose --title "MacPorts Documentation" --force tcldoc
120
121tcldox:
122        @[ -e "${prefix}/bin/doxygen" -a -e "${prefix}/bin/tcl-dox" -a -e "${prefix}/bin/dot" ] \
123                || { echo "Install doxygen, tcl-dox and graphviz with MacPorts in ${prefix} first."; exit 1; }
124        ${prefix}/bin/doxygen
125
126test::
127
128.PHONY: dist _gettag _pkgdist _dopkg tcldoc tcldox
Note: See TracBrowser for help on using the repository browser.