source: trunk/base/Makefile.in @ 135689

Last change on this file since 135689 was 123007, checked in by afb@…, 5 years ago

base: remove (MacPorts 1.6) packaging for other operating systems

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.2 KB
Line 
1# $Id: Makefile.in 123007 2014-08-03 19:05:00Z afb@macports.org $
2
3srcdir      = @srcdir@
4VPATH       = @srcdir@
5
6PATH            = @PATH_CLEANED@
7SUBDIR          = vendor doc src tests
8DISTDIR         = dist
9DISTVER         =
10DISTTAG         = release_${subst .,_,${DISTVER}}
11DISTNAME        = MacPorts-${DISTVER}
12DISTARCTAG      = ${DISTTAG}-archive
13DISTARCNAME     = ${DISTNAME}-archive
14SVNURL          = https://svn.macports.org/repository/macports
15
16
17include Mk/macports.autoconf.mk
18
19
20all:: Mk/macports.autoconf.mk
21
22Mk/macports.autoconf.mk: Mk/macports.autoconf.mk.in src/config.h.in Makefile.in doc/Makefile.in src/cflib1.0/Makefile.in src/cregistry/Makefile.in src/darwintracelib1.0/Makefile.in src/macports1.0/Makefile.in src/package1.0/Makefile.in src/port/Makefile.in src/port1.0/Makefile.in src/registry2.0/Makefile.in tests/Makefile.in config.status
23        ./config.status
24        ${MAKE} clean
25
26config.status: configure
27        @if test -f ./config.status ; then      \
28                set -x ;                                                \
29                ./config.status --recheck ;             \
30        else                                                            \
31                set -x ;                                                \
32                echo "Source tree not configured. Use ./configure" ; \
33        fi
34
35include $(srcdir)/Mk/macports.subdir.mk
36
37install::
38        [ ! -f "$(DESTDIR)${sysconfdir}/macports/mp_version" ] || rm -vf "$(DESTDIR)${sysconfdir}/macports/mp_version"
39        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "$(DESTDIR)${datadir}/macports/"
40        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 444 setupenv.bash  "$(DESTDIR)${datadir}/macports/"
41        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 444 $(srcdir)/macports-pubkey.pem  "$(DESTDIR)${datadir}/macports/"
42# Only run these scripts when not building in a destroot
43ifeq ($(DESTDIR),)
44# create run user if it doesn't exist
45        @if test -n "${DSCL}" -a -n "${DSEDITGROUP}" ; then \
46        if ! ${DSCL} -q . -read "/Groups/${RUNUSR}" > /dev/null 2>&1 ; then \
47            if test `id -u` -eq 0; then \
48                echo "Creating group \"${RUNUSR}\"" ; \
49                ${DSEDITGROUP} -q -o create "${RUNUSR}" ; \
50            else \
51                echo "Not creating group \"${RUNUSR}\" (not root)" ; \
52            fi ; \
53        fi ; \
54        if ! ${DSCL} -q . -list "/Users/${RUNUSR}" > /dev/null 2>&1 ; then \
55            if test `id -u` -eq 0; then \
56                echo "Creating user \"${RUNUSR}\"" ; \
57                NEXTUID=501; \
58                while test -n "`${DSCL} -q /Search -search /Users UniqueID $$NEXTUID`"; do \
59                    let "NEXTUID=NEXTUID+1"; \
60                done; \
61                ${DSCL} -q . -create "/Users/${RUNUSR}" UniqueID $$NEXTUID ; \
62                \
63                ${DSCL} -q . -delete "/Users/${RUNUSR}" AuthenticationAuthority ; \
64                ${DSCL} -q . -delete "/Users/${RUNUSR}" PasswordPolicyOptions ; \
65                ${DSCL} -q . -delete "/Users/${RUNUSR}" dsAttrTypeNative:KerberosKeys ; \
66                ${DSCL} -q . -delete "/Users/${RUNUSR}" dsAttrTypeNative:ShadowHashData ; \
67                \
68                ${DSCL} -q . -create "/Users/${RUNUSR}" RealName MacPorts ; \
69                ${DSCL} -q . -create "/Users/${RUNUSR}" Password \* ; \
70                ${DSCL} -q . -create "/Users/${RUNUSR}" PrimaryGroupID $$(${DSCL} -q . -read "/Groups/${RUNUSR}" PrimaryGroupID | /usr/bin/awk '{print $$2}') ; \
71                ${DSCL} -q . -create "/Users/${RUNUSR}" NFSHomeDirectory "${localstatedir}/macports/home" ; \
72                ${DSCL} -q . -create "/Users/${RUNUSR}" UserShell /usr/bin/false ; \
73            else \
74                echo "Not creating user \"${RUNUSR}\" (not root)" ; \
75            fi ; \
76        fi ; \
77        if test "$$(${DSCL} -q . -read "/Users/${RUNUSR}" NFSHomeDirectory)" = "NFSHomeDirectory: /var/empty" ; then \
78            if test `id -u` -eq 0; then \
79                echo "Updating home directory location for user \"${RUNUSR}\"" ; \
80                ${DSCL} -q . -create "/Users/${RUNUSR}" NFSHomeDirectory "${localstatedir}/macports/home" ; \
81            else \
82                echo "Not updating home directory location for user \"${RUNUSR}\" (not root)" ; \
83            fi ; \
84        fi ; \
85        if test `sw_vers -productVersion | /usr/bin/awk -F . '{print $$2}'` -eq 4 -a `id -u` -eq 0; then \
86            GID=`${DSCL} -q . -read "/Groups/${RUNUSR}" PrimaryGroupID | /usr/bin/awk '{print $$2}'` ; \
87            if test "`${DSCL} -q . -read "/Users/${RUNUSR}" PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $$2}'`" != "$$GID"; then \
88                echo "Fixing PrimaryGroupID for user \"${RUNUSR}\"" ; \
89                ${DSCL} -q . -create "/Users/${RUNUSR}" PrimaryGroupID $$GID ; \
90                ${DSCL} -q . -create "/Users/${RUNUSR}" RealName MacPorts ; \
91            fi ; \
92        fi ; \
93    else \
94        echo "Can't find ${DSCL} / ${DSEDITGROUP}, not creating user \"${RUNUSR}\"" ; \
95    fi
96# Add [default] tag to the central MacPorts repository, if it isn't already
97        $(TCLSH) $(srcdir)/src/upgrade_sources_conf_default.tcl "${prefix}"
98# Convert image directories (and direct mode installs) to image archives
99        $(TCLSH) $(srcdir)/src/images_to_archives.tcl
100        $(TCLSH) $(srcdir)/src/dedup_portfiles.tcl
101endif
102ifndef SELFUPDATING
103        @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 ""
104        @echo "sudo port -v selfupdate"; echo ""
105        @echo "Please read \"man port\", the MacPorts guide at http://guide.macports.org/ and Wiki at https://trac.macports.org/ for full documentation."; echo ""
106else
107        @echo ""; echo "Congratulations, you have successfully upgraded the MacPorts system."; echo ""
108endif
109
110group::
111        @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"
112
113rmgroup::
114        @echo "deleting macports group..." && sudo dseditgroup -o delete -n . macports && echo "done! use 'make group' to re-create"
115
116
117clean::
118        rm -rf docs
119
120distclean::
121        rm -f config.log config.status configure.lineno
122        rm -rf autom4te.cache ${DISTDIR}
123        rm -f Makefile Mk/macports.autoconf.mk
124        rm -f Doxyfile
125        rm -f setupenv.bash
126        rm -f portmgr/dmg/postflight
127
128_gettag:
129        cd ${DISTDIR}; svn co ${SVNURL}/tags/${SVNTAG} ${PKGNAME}-svn
130
131_pkgdist:
132        [ ! -d ${DISTDIR}/${PKGNAME} ] || rm -rf ${DISTDIR}/${PKGNAME}
133        cd ${DISTDIR}; svn export ${PKGNAME}-svn ${PKGNAME}
134        cd ${DISTDIR}; COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar -c ${PKGNAME} | gzip > ${PKGNAME}.tar.gz
135        cd ${DISTDIR}; COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar -c ${PKGNAME} | bzip2 > ${PKGNAME}.tar.bz2
136        cd ${DISTDIR}; for tarball in ${PKGNAME}.tar.*; do { \
137                for type in -md5 -sha1 -ripemd160 -sha256; do { \
138                        openssl dgst $$type $$tarball; \
139                }; done >> ${DISTNAME}.chk.txt; \
140        }; done
141
142_dopkg: _gettag _pkgdist
143
144# This target fetches a tagged distribution from svn, and generates tarballs and checksums for it
145distfromsvn:
146        @[ -n "${DISTVER}" ] || { echo Must specify DISTVER, like: make DISTVER=1.4.0 distfromsvn; exit 1; }
147        [ -d ${DISTDIR} ] || mkdir ${DISTDIR}
148        rm -f ${DISTDIR}/${DISTNAME}.chk.txt
149        ${MAKE} SVNTAG=${DISTTAG}/base/ PKGNAME=${DISTNAME} _dopkg
150ifeq ($(ARC),yes)
151        ${MAKE} SVNTAG=${DISTARCTAG} PKGNAME=${DISTARCNAME} _dopkg
152endif
153
154docs:
155        @[ -e "${prefix}/bin/doxygen" -a -e "${prefix}/bin/dot" ] \
156                || { echo "Install doxygen and graphviz with MacPorts in ${prefix} first."; exit 1; }
157        ${prefix}/bin/doxygen
158
159test::
160
161.PHONY: dist _gettag _pkgdist _dopkg docs
Note: See TracBrowser for help on using the repository browser.