This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
New Formula: mailman #15230
Closed
Closed
New Formula: mailman #15230
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
require 'formula' | ||
|
||
class Mailman < Formula | ||
homepage 'http://www.gnu.org/software/mailman' | ||
url 'http://ftpmirror.gnu.org/mailman/mailman-2.1.15.tgz' | ||
sha1 '462ac96331491c76aca0128d8f9ced18c50a75d7' | ||
|
||
## | ||
# varprefix is where we're going to put all the mailman data. It | ||
# won't be removed between uninstalls to make upgrades easier. | ||
|
||
def varprefix | ||
HOMEBREW_PREFIX/'share/mailman' | ||
end | ||
|
||
def install | ||
ENV.j1 # parallel builds break | ||
|
||
[prefix, varprefix].each do |path| | ||
mkdir_p path | ||
chown "_mailman", "_mailman", path | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yikes, I don't think we want to chown the prefix! |
||
system "chmod", "a+rx,g+ws", path | ||
end | ||
|
||
system "./configure", "--prefix=#{prefix}", "--with-var-prefix=#{varprefix}" | ||
system "make install" | ||
apache_conf_path.write apache_conf | ||
apache_conf_path.chmod 0644 | ||
|
||
test # no really... make sure the perms are set right. | ||
end | ||
|
||
def apache_conf_path | ||
prefix+"httpd-mailman.conf" | ||
end | ||
|
||
def apache_conf | ||
<<-"EOS".undent | ||
ScriptAlias /mailman/ "#{prefix}/cgi-bin/" | ||
Alias /pipermail/ "#{varprefix}/archives/public/" | ||
Alias /icons/ "#{prefix}/icons/" | ||
<Directory "#{varprefix}/archives/public/"> | ||
Options FollowSymLinks MultiViews Indexes | ||
AllowOverride None | ||
Order allow,deny | ||
Allow from all | ||
</Directory> | ||
EOS | ||
end | ||
|
||
def startup_plist | ||
<<-EOS.undent | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Debug</key> | ||
<true/> | ||
<key>Disabled</key> | ||
<false/> | ||
<key>Label</key> | ||
<string>org.list.mailmanctl</string> | ||
<key>Program</key> | ||
<string>#{HOMEBREW_PREFIX}/bin/mailmanctl</string> | ||
<key>ProgramArguments</key> | ||
<array> | ||
<string>mailmanctl</string> | ||
<string>-s</string> | ||
<string>start</string> | ||
</array> | ||
<key>KeepAlive</key> | ||
<false/> | ||
<key>RunAtLoad</key> | ||
<true/> | ||
<key>AbandonProcessGroup</key> | ||
<true/> | ||
</dict> | ||
</plist> | ||
EOS | ||
end | ||
|
||
def caveats | ||
<<-"EOS".undent | ||
DONE! But that's the easy part! | ||
|
||
Code is in #{prefix}. | ||
Data is in #{varprefix}. | ||
|
||
To start (or upgrade) as a service: | ||
|
||
sudo launchctl unload -w /Library/LaunchDaemons/#{plist_path.basename} | ||
sudo cp #{plist_path} /Library/LaunchDaemons/ | ||
sudo launchctl load -w /Library/LaunchDaemons/#{plist_path.basename} | ||
|
||
To add to apache: | ||
|
||
cp #{apache_conf_path} /etc/apache2/extra | ||
|
||
Add to httpd.conf: | ||
|
||
Include /etc/apache2/extra/httpd-mailman.conf | ||
|
||
When in doubt, double-check against these instructions: | ||
|
||
http://www.livetime.com/mountain-lion-mailman-mailing-list/ | ||
|
||
Done! Enjoy! | ||
|
||
EOS | ||
end | ||
|
||
def test | ||
system "#{bin}/check_perms", "-f" | ||
end | ||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't align on the quote.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get a real editor. :P