These instructions assume you already have MacPorts installed and running. Client-Only Installation This is the easiest option. If you are using vi , sudo vi httpd. That's it.
You've got a Subversion server running! Last modified 4 years ago Last modified on Oct 22, , AM. Download in other formats: Plain Text. It is not recommended to use this format when adding an epoch to a port that does not already have one; instead, just set the epoch to 1 , and when needing to increase an existing small epoch, increase it by 1. A port's epoch can never be decreased. Removing the epoch from the port would decrease it to its default value of 0 , so once added to a port the epoch can also never be removed.
When adding an epoch, take extra care to ensure that it is necessary, since a mistakenly added epoch cannot be undone. In Portfiles that have subports with different software versions, consider whether the epoch needs to be increased in all subports or only in some of them.
The category under which the ported software falls. The first category should be the same as the directory within which the Portfile is stored; secondary and tertiary categories may be selected. Most ports have only a single maintainer, but some ports have two or more co-maintainers. The maintainers keyword lists the maintainers' GitHub usernames or email addresses. GitHub usernames start with an symbol. Email addresses are preferably listed in the obfuscated form below to hide them from spambots:.
For addresses in other domains, e. Braces can be used to express that these refer to the same person, for example the GitHub username and an email. The address nomaintainer designates a port that is not maintained by anybody and may be modified by any committer. Feel free to claim maintainership of a nomaintainer port if desired. The address openmaintainer designates a port that has a maintainer who allows minor changes to be committed without his or her prior approval. Port maintainers who are not committers are encouraged to add openmaintainer to their ports.
The long description can be based on a description provided by the upstream project e. More specific usage instructions are best left to the notes keyword.
If a port provides a program that is different from the port name, it can be a good idea to include the program name in the long description so that a user could find it by searching.
Long descriptions are usually a single paragraph. MacPorts will word-wrap long lines to the terminal width as needed. Break long lines with escaped newlines for better legibility within the Portfile. To create a new paragraph, insert two newlines. Sometimes the port's name and short description are reused as part of the long description. When referencing the description keyword or any other list keyword with more than one item , it should be preceded with the expand operator.
When the homepage is just a hostname with no path component, don't include a trailing slash. A list of the platforms on which the port is expected to work. Required, but not interpreted in any way by MacPorts at this time; it is purely informational for users.
Possible values:. Ports for software that does not require macOS-specific features should use darwin. Most ports use this value on the presumption that they would work on Pure Darwin, even if that has not been attempted. Ports for software that is known to require macOS-specific features should set this to macosx. Including the xcode portgroup will set this to macosx automatically. The CPU architectures for which this port can be built. If this option is not set, it is assumed that the port can build for all archs.
If a port does not install any architecture-specific files, use the special value noarch. The proper format for license consists of the license name, followed by a hyphen and number if indicating a specific version. A space should be placed between licenses if there is more than one that applies.
If an element in the license list is itself a list, it is interpreted as offering a choice of any one of the licenses in the sub-list. If the version specified in this case is also the earliest version, just leave out the version number entirely since it implies all versions. By default, it is assumed that ports may use libraries or headers from their dependencies and thus form a derivative work.
A dependency with an incompatible license thus prevents the port from being distributed in binary form. If a dependency with an incompatible license is not used in such a way that a derivative work is formed, or should not prevent binary distribution for any other reason, add its name to this list.
Available in 2. By default, it is assumed on macOS that ports will not need tools from Xcode. If a port needs to use Xcode i. This means that libxcselect shims i. Build systems that ignore the environment may accidentally use Xcode which will cause a failure in trace mode. Global variables are variables available to any Portfile. For a list of additional variables available to ports that are assigned to a MacPorts Portgroup, see portgroup 7. Full path to the Portfile of the port being executed.
Portfile repositories are defined in the file sources. The underlying operating system platform e. The version number of the host operating system e.
OS X The major version number of the host operating system e. The MacPorts port installation process has a number of distinct phases that are described in detail in this section. The default scripts coded into MacPorts base performs the standard configure , make , and make install steps.
For applications that do not conform to this standard, installation phases may be declared in a Portfile to augment or override the default behavior as described in the Portfile Development chapter. Execute commands to run test suites bundled with a port, available only for a fraction of ports. This is an optional phase, run only if port test is executed, and always works with a build from source, not a binary.
A failure is only for the user's information, and does not block a subsequent installation from the build. MacPorts uses the destroot phase to provide:. Port uninstalls - a port's files may be cleanly uninstalled because all files and directories are recorded during install. In other words, port phase keywords are not located within port phase declarations, but rather they refer to port phases and set options for those phases, and they take effect whether or not phase declarations have been explicitly defined in a Portfile.
Keyword list modifiers are keywords that end in -append, -delete or -replace. Keywords that support list modifiers are identified under appropriate reference sections below. There is also a deprecated syntax for -replace which takes only one argument and behaves the same as -strsed. Preserve configure defaults set by a previously executed Portfile keyword or by MacPorts base. Ports in a PortGroup have default library dependencies set by MacPorts base.
When a variant requires more or fewer dependencies, distfiles, or patchfiles, when the variant is invoked you want to add or remove items to the appropriate keyword values list set in the global section of the Portfile. Use the appropriate keywords, for example:. But it should be noted that all keyword argument modifiers implicitly support keyword list modifiers. For example, the keyword configure. You may also use mirror site lists predefined by MacPorts.
Here the sourceforge, gnu, and freebsd mirrors are used. For ports that must fetch multiple download files from different locations, you must label the files with tags and match the tags to a distfiles keyword. The format is mirror:subdirectory:tag. The full distribution filename, including the extract suffix. Override it to store multiple ports' distfiles in the same directory such as multiple ports providing different versions of the same software , or if a stealth update has occurred.
Sets the path to source directory relative to workpath. It can be used if the extracted source directory has a different name then the distfile. Also used if the source to be built is in a subdirectory. Change the fetch type. This is only necessary if a bzr , cvs , git , hg , or svn checkout is being used. Values: standard bzr cvs git hg svn. Bzr may be used as an alternative method of fetching distribution files using the keywords in this section.
However, fetching via bzr may cause non-reproducible builds, so it is strongly discouraged. The bzr fetch. CVS may be used as an alternative method of fetching distribution files using the keywords in this section. However, fetching via CVS may cause non-reproducible builds, so it is strongly discouraged.
The cvs fetch. Git may be used as an alternative method of fetching distribution files using the keywords in this section. However, fetching via Git may cause non-reproducible builds, so it is strongly discouraged. The git fetch. Optional tag for fetching with git, this specifies the tag or other commit-ish that git should checkout. Mercurial may be used as an alternative method of fetching distribution files using the keywords in this section.
However, fetching via Mercurial may cause non-reproducible builds, so it is strongly discouraged. The hg fetch. Optional tag which should be fetched. Can be a Mercurial tag or a revision. To prevent non-reproducible builds use of tip as revision is discouraged.
Subversion may be used as an alternative method of fetching distribution files using the keywords in this section. However, fetching via Subversion may cause non-reproducible builds, so it is strongly discouraged. The svn fetch. Optional tag for fetching with Subversion, this specifies the peg revision to checkout; it corresponds to the REV syntax of the svn cli. Optional tag for fetching with Subversion, this specifies whether to check out the code into a working copy, or just export it without the working copy metadata.
An export is preferable because it takes half the disk space, but some software expects to be built in a working copy for example because it wants to record the revision number into itself somewhere. Checksum s of the distribution files. For ports with multiple distribution files, filenames must be included to associate files with their checksums.
Each checksum entry should also indicate the file's size. At least two checksum types typically rmd and sha should be used to ensure the integrity of the distfiles. This keyword is used to specify that the extract phase should be done as the root user.
This keyword is for downloads that are compressed using the 7z algorithm. When invoked, it automatically sets:. This keyword is for downloads that are tarred and bzipped. This keyword is for downloads that are compressed using the lzma algorithm.
This keyword is for downloads that are uncompressed tar archives. This keyword is for downloads that are compressed using the xz tool. This keyword is used to specify if the directory worksrcdir is part of the distfile or if it should be created automatically and the distfiles should be extracted there instead. This is useful for distfiles with a flat structure which would pollute the worksrcdir with lots of files.
Only use if default extract behavior is not correct for your port. Main arguments to extract. Specify patch files to be applied for a port; list modifiers specify patchfiles to be added or removed from a previous patchfile declaration. Main arguments to patch. MacPorts base sets some important default configure options, so should use the -append version of most configure keywords so you don't overwrite them.
For example, MacPorts base sets default configure. Sets if the configure phase should be run. Can be used if the port has no. Set environment variables for configure; list modifiers add and delete items from a previous Portfile configure. If available, it is encouraged to use the predefined options like configure.
Set optimization compiler flags; list modifiers add or delete items from a previous Portfile configure. Select a compiler suite to fill the compiler environment variables. Manually set variables are not overwritten. Keep in mind that not all compiler suites might be available on your platform: gcc Only use it if a port really needs a specific different compiler.
In many situations, the requirements system described in the CompilerSelection page on the wiki is more flexible. Default: llvm-gcc Values: gcc Main arguments to configure. There is a default universal variant made available to all ports by MacPorts base, so redefining universal keywords should only be done to make a given port compile if the default options fail to do so.
Only use it if you can't use build. Default: default the default Make on the current platform. Values: default bsd gnu xcode. Set environment variables for build; list modifiers add and delete items from a previous Portfile build.
This keyword is for specifying whether or not it is safe for a port to use multiple CPUs or multiple cores in parallel during its build phase. The number of simultaneous jobs to run when parallel build is enabled. The default value is based on the variable buildmakejobs in macports.
Default: If buildmakejobs is 0, the number of CPU cores in the machine, or the number of GB of physical memory plus one, whichever is less. Main arguments to test. Set environment variables for test; list modifiers add and delete items from a previous Portfile test. A port must destroot properly or the port will not install correctly, upgrade, or uninstall. If not, you may need to set this variable, or even patch the application's Makefile. If a port is not compliant with the standard, set it to yes.
You can find the macports standard in MacPorts File Hierarchy or in the porthier 7 man page. If destroot. Use port contents portname to see the location for all files that were installed by a given port. The keywords used when specifying dependencies in a Portfile are related to port install phases, and they refer to what are called library, build, fetch, extract and run dependencies.
Though all of them install dependencies before a given port is installed, specifying dependencies with the correct keyword is important for proper port upgrade and uninstall behavior, or when running targets other than install. For example, you may not uninstall a port that is a library dependency for another installed port, though you may remove one that is a build dependency.
Likewise, if you run the fetch target for a port, only the fetch dependencies will be installed first, so they should be all that is needed for that target. The list of dependencies to check before phases fetch , checksum , extract , patch , configure , build , destroot , install , and package.
Fetch dependencies are needed to download the distfiles for a port, and are not needed at all once the software is installed. The list of dependencies to check before phases extract , patch , configure , build , destroot , install , and package.
Extract dependencies are needed to unpack a port's distfiles into the work directory, and are not needed at all once the software is installed. The list of dependencies to check before phases configure , build , destroot , install , and package.
Build dependencies are needed when software is being built, but not needed at all once it is installed. Library dependencies are needed both at build time for headers and libraries to link against and at run time. The list of dependencies to check before phase test. Test dependencies are only needed when the port enables testing i. The list of dependencies to check before phases destroot , install , and package.
Run dependencies are needed when the software is run, but not to compile it. There are two types of dependencies: port dependencies and file dependencies. Port dependencies can be satisfied by reference to a port the MacPorts registry is queried , or by reference to a file whether provided by a port or not. The most commonly-used type of dependencies in Portfiles are port dependencies, because dependencies should be provided by MacPorts ported software whenever possible, and usually only one port can provide the needed libraries and files.
But when satisfying a dependency with vendor-supplied software is preferred for special reasons, or when it is possible for more than one port to satisfy a dependency, then file dependencies may be used. File dependencies should only be used if one of the reasons listed above applies. There are three types: bin for programs, lib for libraries, and path for any installed file. See the examples below:. MacPorts variants are conditional modifications of port installation behavior during port installation.
There are two types of variants: user-selected variants and platform variants. User-selected variants are options selected by a user when a port is installed; platform variants are selected automatically by MacPorts base according to the OS or hardware platform darwin, freebsd, linux, i, powerpc, etc. User-selected variants are those that are defined so a user can invoke them to enable port options at install time. Variant names may contain only letters, numbers and underscore characters.
In particular, the hyphen is not a valid character in variant names because it would conflict with the notation for deselecting a variant. The variant declaration may contain any keywords that can be placed in a Portfile's global section. Dependencies and conflicts with other variants in the same port can be expressed with requires and conflicts options as shown below. This allows for Portfile modularity and also allows users to suppress default variants if they wish.
When using MacPorts on macOS, a universal variant is defined by default to configure ports with universal flags.
The variant can be overridden if the default code does not work see the Configure Universal section above , or suppressed if a universal variant does not function properly for a given port. User-selected variants ought to provide a description, which will be displayed when using command port variants foo. The syntax used for the description keyword is shown below. Descriptions should be short but clear, and not merely repeat the name of the variant.
To allow for compatibility for possible MacPorts GUI support, a good rule of thumb is to use sentence fragments for brevity, with a capitalized first letter and no trailing punctuation.
Think of them as short labels such as ones you'd find next to a GUI checkbox or radio button. Platform variants are either defined by default in MacPorts base, or defined by a port author to customize a port's installation according to OS operating system or hardware platform. MacPorts allows platform-specific port options to be specified in a Portfile for handling differences between platforms and versions of the same platform.
Though a combination of OS version and hardware platform may be specified in a single platform statement e. For example, to select Darwin versions 9 and 10 while excluding all others, you would need two statements: platform darwin 9 and platform darwin Alternately, you could make that behavior the port's default, and add a platform darwin 8 block to remove it again.
A MacPorts Portfile is a Tcl script, so it may contain any arbitrary Tcl code you may learn about in the Tcl documentation. However, few authors will use arbitrary Tcl code; the vast majority will use a subset of Tcl commands and a number of Tcl extensions that are coded within MacPorts for performing the most common tasks needed for Portfiles. The list below is a list of useful Tcl commands for Portfile development and Tcl extensions provided by MacPorts base.
The standard Tcl file command can be used for a number of operations on files, such as moving, renaming, deleting, or creating directories, among others. For a complete list, consult the Tcl reference manual for the file command , or the Tcl file manpage in the n section of manpages on your machine using man n file.
Remove a file or with -force a directory and its contents. For the above operations provided by Tcl's file command, MacPorts provides the following shorthands. These should be used in preference to the Tcl commands above, as they may work around certain bugs.
Similar to file rename but correctly handles renames that only change the case of a file on a case-insensitive filesystem. Change to dir and install file s to a destination directory. Install the file s matching the glob pattern to a destination directory. It supports a small subset of the commands known from sed 1.
Replaces the first instance of regex with replacement. The same as the previous format, except all instances of the pattern will be replaced, not only the first mnemonic: 'g' is for global. Allows text specified by a regular expression to be replaced by new text, in-place the file will be updated itself, no need to place output into a new file and rename.
Replace text given by the regular expression portion of the command with the replacement text, in all files specified. Use -locale to set the locale. If you need it to work on non-ASCII characters you need to set a locale with the correct charset for the file, e. Use -- to end option processing and allow any further dashes not to be treated as options.
Add a new local user to the system with the specified uid, gid, password, real name, home directory and login shell. Check if a local user exists. Returns the uid for the given user, or 0 if the user wasn't found. Checking for the root user is not supported because its uid is 0, and it will always exist anyway.
Add a new local group to the system, with the specified gid, password, real name, and with a list of users as members. Check if a local group exists and return the corresponding gid.
This can be used with adduser:. There are three categories of StartupItem keywords. This is useful for MacPorts installations that are not used with root privileges. Chooses the subdirectory in which to install the StartupItem. Also affects how it will be loaded: LaunchDaemons must be loaded as root, and only one instance will run for the whole system.
LaunchAgents are loaded as a normal user, and one instance per user can run. Path to a logfile for logging events about the lifetime of the StartupItem. Depending on the type of StartupItem, and the manner in which it is started, standard output from the daemon may also be directed to the logfile. Control whether or not to log events to the log file. If logevents is set, events with timestamps are logged to the logfile. Sets the name for the StartupItem.
Defaults to the name of the port, so this keyword is usually unnecessary. The type of the StartupItem. Supported values are launchd for a macOS launchd. Used when a port needs to install more than one StartupItem, this option consists of a list where alternating elements represent keys and values.
Each key corresponds to one of the startupitem. Each StartupItem defined in the list must specify at least a name. Any keys that are not defined for a given StartupItem will use the value of the corresponding startupitem. Daemons run continuously, so monitoring the health of daemon processes and restarting them if they die is an important StartupItems' feature.
Specifies the name of the daemon to be run. It may have multiple arguments, but they must be appropriate for a call to exec; arbitrary shell code may not be used. A daemon to be started with startupitem. Often daemons have a command switch to run in the foreground, and this method should be used for daemons that detach.
Notice that the script is not a daemon; rather the script indirectly launches the vm-pop3d daemon. The example configuration below demonstrate how to configure repository authentication and access control. Subversion does not enforce a directory structure. The three directories commonly used are trunk , tags , and branches. You can access your Subversion repository by pointing your browser to the Apache Subversion repository service with the following URL:.
This URL accesses the desired Subversion project. You should make sure to back up your Apache Subversion repository at reasonable intervals.
One way to do so is by backing up your Subversion server using the Linode Backup service. This page was originally published on Friday, January 7, Let us know if this guide made it easy to get the answer you needed. Explore docs. Docs Home List Sections Tiles. No Results. Add tags. How to Install Apache Subversion on Ubuntu Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web.
Este proyecto es un trabajo en curso. This credit will be applied to any valid services used during your first 60 days. Sign Up. Ashish Saini Ashish Saini 4 4 silver badges 6 6 bronze badges. Zachary Mayhew Zachary Mayhew 71 1 1 silver badge 1 1 bronze badge. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.
Linked Related 1. Hot Network Questions. Question feed. Ask Ubuntu works best with JavaScript enabled.
0コメント