Skip to content
Permalink
Browse files

Submitted by: jmpp@ drernie@

Uprev the DarwinPorts portfile to:

-) make portmgr@ its maintainer, I belive this to be more appropriate;
-) include a destroot.keepdirs key to properly preserve the filesystem structure;
-) include the necessary files to build the dmg.

NOTE: Last time I checked, the postflight script needed a lot of improvements,
but Ernie assures me the version I'm committing here is working. Some wider testing
would be cool.

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@15110 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
jmpalacios committed Nov 22, 2005
1 parent cd5f646 commit 0d26d45c2dc58dfd703b1fbefe9fe4737a091d58
@@ -1,12 +1,13 @@
# $Id: Portfile,v 1.11 2005/10/14 16:48:23 jmpp Exp $
# $Id: Portfile,v 1.12 2005/11/22 02:08:20 jmpp Exp $

PortSystem 1.0

name DarwinPorts
version 1.1
revision 1
categories sysutils
platforms darwin freebsd
maintainers michaelm@opendarwin.org matt@opendarwin.org jmpp@opendarwin.org
maintainers portmgr@opendarwin.org

description The DarwinPorts Infrastructure
long_description DarwinPorts provides the infrastructure that allows easy installation \
@@ -20,4 +21,111 @@ checksums rmd160 7261cd81db9fa1060bf768dafdf8e147e393476a

patchfiles patch-Makefiles_all

#depends_run port:PortAuthority

configure.args --mandir=${prefix}/share/man

destroot.keepdirs ${destroot}${prefix}/include\
${destroot}${prefix}/lib ${destroot}${prefix}/libexec\
${destroot}${prefix}/sbin\
${destroot}${prefix}/share/info\
${destroot}${prefix}/share/man/cat1 ${destroot}${prefix}/share/man/cat2 ${destroot}${prefix}/share/man/cat3\
${destroot}${prefix}/share/man/cat4 ${destroot}${prefix}/share/man/cat5 ${destroot}${prefix}/share/man/cat6\
${destroot}${prefix}/share/man/cat7 ${destroot}${prefix}/share/man/cat8 ${destroot}${prefix}/share/man/cat9\
${destroot}${prefix}/share/man/catl ${destroot}${prefix}/share/man/catn \
${destroot}${prefix}/share/man/man1 ${destroot}${prefix}/share/man/man2 ${destroot}${prefix}/share/man/man3\
${destroot}${prefix}/share/man/man4 ${destroot}${prefix}/share/man/man5 ${destroot}${prefix}/share/man/man6\
${destroot}${prefix}/share/man/man7 ${destroot}${prefix}/share/man/man8 ${destroot}${prefix}/share/man/man9\
${destroot}${prefix}/share/man/manl ${destroot}${prefix}/share/man/mann \
${destroot}${prefix}/share/nls/C ${destroot}${prefix}/share/nls/skel\
${destroot}${prefix}/share/nls/af_ZA.ISO8859-1\
${destroot}${prefix}/share/nls/af_ZA.ISO8859-15\
${destroot}${prefix}/share/nls/bg_BG.CP1251\
${destroot}${prefix}/share/nls/cs_CZ.ISO8859-2\
${destroot}${prefix}/share/nls/da_DK.ISO8859-1\
${destroot}${prefix}/share/nls/da_DK.ISO8859-15\
${destroot}${prefix}/share/nls/de_AT.ISO8859-1\
${destroot}${prefix}/share/nls/de_AT.ISO8859-15\
${destroot}${prefix}/share/nls/de_CH.ISO8859-1\
${destroot}${prefix}/share/nls/de_CH.ISO8859-15\
${destroot}${prefix}/share/nls/de_DE.ISO8859-1\
${destroot}${prefix}/share/nls/de_DE.ISO8859-15\
${destroot}${prefix}/share/nls/el_GR.ISO8859-7\
${destroot}${prefix}/share/nls/en_AU.ISO8859-1\
${destroot}${prefix}/share/nls/en_AU.ISO8859-15\
${destroot}${prefix}/share/nls/en_AU.US-ASCII\
${destroot}${prefix}/share/nls/en_CA.ISO8859-1\
${destroot}${prefix}/share/nls/en_CA.ISO8859-15\
${destroot}${prefix}/share/nls/en_CA.US-ASCII\
${destroot}${prefix}/share/nls/en_GB.ISO8859-1\
${destroot}${prefix}/share/nls/en_GB.ISO8859-15\
${destroot}${prefix}/share/nls/en_GB.US-ASCII\
${destroot}${prefix}/share/nls/en_NZ.ISO8859-1\
${destroot}${prefix}/share/nls/en_NZ.ISO8859-15\
${destroot}${prefix}/share/nls/en_NZ.US-ASCII\
${destroot}${prefix}/share/nls/en_US.ISO8859-1\
${destroot}${prefix}/share/nls/en_US.ISO8859-15\
${destroot}${prefix}/share/nls/es_ES.ISO8859-1\
${destroot}${prefix}/share/nls/es_ES.ISO8859-15\
${destroot}${prefix}/share/nls/et_EE.ISO8859-15\
${destroot}${prefix}/share/nls/fi_FI.ISO8859-1\
${destroot}${prefix}/share/nls/fi_FI.ISO8859-15\
${destroot}${prefix}/share/nls/fr_BE.ISO8859-1\
${destroot}${prefix}/share/nls/fr_BE.ISO8859-15\
${destroot}${prefix}/share/nls/fr_CA.ISO8859-1\
${destroot}${prefix}/share/nls/fr_CA.ISO8859-15\
${destroot}${prefix}/share/nls/fr_CH.ISO8859-1\
${destroot}${prefix}/share/nls/fr_CH.ISO8859-15\
${destroot}${prefix}/share/nls/fr_FR.ISO8859-1\
${destroot}${prefix}/share/nls/fr_FR.ISO8859-15\
${destroot}${prefix}/share/nls/hi_IN.ISCII-DEV\
${destroot}${prefix}/share/nls/hr_HR.ISO8859-2\
${destroot}${prefix}/share/nls/hu_HU.ISO8859-2\
${destroot}${prefix}/share/nls/is_IS.ISO8859-1\
${destroot}${prefix}/share/nls/is_IS.ISO8859-15\
${destroot}${prefix}/share/nls/it_CH.ISO8859-1\
${destroot}${prefix}/share/nls/it_CH.ISO8859-15\
${destroot}${prefix}/share/nls/it_IT.ISO8859-1\
${destroot}${prefix}/share/nls/it_IT.ISO8859-15\
${destroot}${prefix}/share/nls/ja_JP.SJIS\
${destroot}${prefix}/share/nls/ja_JP.eucJP\
${destroot}${prefix}/share/nls/ko_KR.eucKR\
${destroot}${prefix}/share/nls/la_LN.ISO8859-1\
${destroot}${prefix}/share/nls/la_LN.ISO8859-15\
${destroot}${prefix}/share/nls/la_LN.ISO8859-2\
${destroot}${prefix}/share/nls/la_LN.ISO8859-4\
${destroot}${prefix}/share/nls/la_LN.US-ASCII\
${destroot}${prefix}/share/nls/lt_LT.ISO8859-4\
${destroot}${prefix}/share/nls/nl_BE.ISO8859-1\
${destroot}${prefix}/share/nls/nl_BE.ISO8859-15\
${destroot}${prefix}/share/nls/nl_NL.ISO8859-1\
${destroot}${prefix}/share/nls/nl_NL.ISO8859-15\
${destroot}${prefix}/share/nls/no_NO.ISO8859-1\
${destroot}${prefix}/share/nls/no_NO.ISO8859-15\
${destroot}${prefix}/share/nls/pl_PL.ISO8859-2\
${destroot}${prefix}/share/nls/pt_BR.ISO8859-1\
${destroot}${prefix}/share/nls/pt_PT.ISO8859-1\
${destroot}${prefix}/share/nls/pt_PT.ISO8859-15\
${destroot}${prefix}/share/nls/ro_RO.ISO8859-2\
${destroot}${prefix}/share/nls/ru_RU.CP866\
${destroot}${prefix}/share/nls/ru_RU.ISO8859-5\
${destroot}${prefix}/share/nls/ru_RU.KOI8-R\
${destroot}${prefix}/share/nls/sk_SK.ISO8859-2\
${destroot}${prefix}/share/nls/sl_SI.ISO8859-2\
${destroot}${prefix}/share/nls/sv_SE.ISO8859-1\
${destroot}${prefix}/share/nls/sv_SE.ISO8859-15\
${destroot}${prefix}/share/nls/tr_TR.ISO8859-9\
${destroot}${prefix}/share/nls/uk_UA.ISO8859-5\
${destroot}${prefix}/share/nls/uk_UA.KOI8-U\
${destroot}${prefix}/share/nls/zh_CN.eucCN\
${destroot}${prefix}/share/nls/zh_TW.Big5\
${destroot}${prefix}/var/db/dports/distfiles ${destroot}${prefix}/var/db/dports/receipts


#package.resources ${filespath}/ReadMe.rtf ${filespath}/License.html ${filespath}/postflight
post-pkg {
set resources ${workpath}/${name}-${version}.pkg/Contents/Resources/
file copy -force -- ${filespath}/ReadMe.rtf ${resources}
file copy -force -- ${filespath}/License.html ${resources}
file copy -force -- ${filespath}/postflight ${resources}
}
@@ -0,0 +1,27 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="824.23">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
</style>
</head>
<body>
<p class="p1">Copyright (c) 2002 - 2003 Apple Computer, Inc.</p>
<p class="p1">All rights reserved.</p>
<p class="p2"><br></p>
<p class="p1">Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p>
<ol>
<li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li>
<li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li>
<li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">Neither the name of Apple Computer, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.</li>
</ol>
<p class="p2"><br></p>
<p class="p1">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
</body>
</html>
@@ -0,0 +1,65 @@
{\rtf1\mac\ansicpg10000\cocoartf102
{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique;
}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww13720\viewh11840\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural

\f0\fs24 \cf0 \
DarwinPorts is a software build, install, and packaging infrastructure for installing open source software. It is designed to meet the same functionality requirements as the FreeBSD ports architecture while maintaining extensibility for future enhancement.\
\

\f1\b System Requirements\
\f0\b0 DarwinPorts currently builds and runs on MacOS X 10.2 (Darwin 6.0.1) or later. The system is portable, written in TCL with a limited set of TCL extensions in C, and is also available for other platforms.\
\

\f1\b How to Use\
\f0\b0 You can simple double-click the "Port Authority" application installed in /Applications/DarwinPorts. Command-line users can also invoke the "port" command, which (like other DarwinPorts binaries) is in "/opt/local/bin." Your path will be automatically modified to include that, if needed, during the install; note that you may need to open a new shell first.\
\

\f1\b What is Installed\
\f0\b0 The DarwinPorts infrastructure is installed in "/opt/local/var/db/dports/." In particular, the sources for the infrastructure and "Portfiles" are located in sources. These files are owned by root, and require "sudo" or equivalent to access.\
\

\f1\b Documentation\
\f0\b0 \
The "DarwinPorts User Guide" is available at <http://www.darwinports.org/docs/>.\
There are also man pages for
\f2\i port
\f0\i0 ,
\f2\i ports.conf, portfile
\f0\i0 ,
\f2\i portgroup, portstyle,
\f0\i0 and
\f2\i porthier
\f0\i0 .\
\

\f1\b Using the Port Command\
\f0\b0 \
The following command will build and install a port:\
\
$ port install <portname>\
\
To find a specific port, try using "port search".\
\
$ port search vi\
\
Please refer to the port(1) man page for complete documentation on the port command.\
\
\

\f1\b Creating New Ports\
\f0\b0 \
Ports consist of directory containing both a Portfile and associated files. Currently the only bundled files are patch files, and these are likely to be kept to a minimum.\
\
A Portfile consists of valid TCL, evaluated by a TCL interpreter instantiated by the DarwinPorts System. Portfiles use extremely straightforward key/value pair syntax, while allowing the author to use the full extent of TCL's functionality where necessary.\
\
To get started, refer to the base/doc/exampleport found in the DarwinPorts sources and the portfile(7) man page, or The DarwinPorts Guide, at http://www.darwinports.org/docs .\
}
@@ -0,0 +1,93 @@
#!/bin/bash
#
# Copyright (c) 2005 Ole Guldberg Jensen <olegb@opendarwin.org>
# Copyright (c) 2005 Dr. Ernie Prabhakar <drernir@opendarwin.org>
# Copyright (c) 2005 Matt Anton <matt@opendarwin.org>
# Copyright (c) 2005 Juan Manuel Palacios <jmpp@opendarwin.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY Eric Melville AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#

echo ""
echo "Checking the PATH variable for $USER..."
echo ""

BINPATH=/opt/local/bin
SBINPATH=/opt/local/sbin
TMP=`/usr/bin/mktemp /tmp/dp.$$`
$SHELL -l <<EOF > $TMP
/usr/bin/printenv PATH
exit
EOF

if grep $BINPATH $TMP >/dev/null 2>&1; then
echo "You already have the right PATH - l337!"
else
USHELL=`basename $SHELL`
echo "Setting the PATH of $USHELL for $USER in ${HOME:=/Users/$USER}..."
case $USHELL in
*csh)
/bin/cp -fp $HOME/.cshrc $HOME/.cshrc.dpsaved # we backup the original
echo "#" >> $HOME/.cshrc
echo "# Your previous .cshrc (if any) is saved as .cshrc.dpsaved" >> $HOME/.cshrc
echo "# Setting the path for DarwinPorts." >> $HOME/.cshrc
echo "set path=($BINPATH $SBINPATH" '$path'")" >> $HOME/.cshrc
chown $USER $HOME/.cshrc
echo "Finished modifying $HOME/.cshrc"
;;
*sh)
/bin/cp -fp $HOME/.profile $HOME/.profile.dpsaved # we backup the original
echo "#" >> $HOME/.profile
echo "# Your previous .profile (if any) is saved as .profile.dpsaved" >> $HOME/.profile
echo "# Setting the path for DarwinPorts." >> $HOME/.profile
echo "export PATH=$BINPATH:$SBINPATH:\$PATH" >> $HOME/.profile
chown $USER $HOME/.profile
echo "Finished modifying $HOME/.profile"
;;
*)
echo "Unknown shell! Please set your own PATH manually."
;;
esac
fi

export PATH=$BINPATH:$PATH

# run selfupdate

echo""
echo "Selfupdating The DarwinPorts system ..."
echo ""

port -d selfupdate
if [ $? != 0 ]; then
echo "An attempt to synchronize your recent DarwinPorts installation with OpenDarwin servers failed, please run 'port -d selfupdate' manually to find out the cause of the error."
exit
fi

# done !!
echo ""
echo "You have succesfully installed the DarwinPorts system."
echo ""
echo "Launch a terminal and try it out !!"
echo "Read the port manualpage for help."
echo ""

0 comments on commit 0d26d45

Please sign in to comment.
You can’t perform that action at this time.