Permalink
Browse files

Removes a bunch of deprecated files

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6005 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent 32481fb commit 81a5bf77ccc3321a37fa1807a7508cede09ad79c @alobbs alobbs committed Dec 23, 2010
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleExecutable</key>
- <string>run</string>
- <key>CFBundleName</key>
- <string>Cherokee Admin</string>
- <key>CFBundleIconFile</key>
- <string>cherokee_icon</string>
- <key>CFBundleIdentifier</key>
- <string>org.cherokee.webserver-admin</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
- <key>CFBundleSignature</key>
- <string>????</string>
-</dict>
-</plist>
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-/usr/local/bin/cherokee-admin-launcher
@@ -1 +0,0 @@
-APPL????
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,17 +1,6 @@
## Cherokee: Makefile.am -*- makefile -*-
-BINARIES = \
-License.rtf \
-background.tiff.gz \
-cherokee_icon.icns
-
-PYTHON = \
-utils.py \
-build.py
-
EXTRA_DIST = \
-$(PYTHON) \
-$(BINARIES) \
Info.plist \
Info.plist.in \
Description.plist \
Binary file not shown.
View
@@ -1,130 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import re
-from utils import *
-
-MAKE_PARAMS = "-j4"
-TMP = "/var/tmp"
-PKG_MAKER = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"
-
-
-def _figure_version (path):
- info = open (os.path.join (path, "Info.plist"), 'r').read()
- regex = r"<key>CFBundleShortVersionString</key>[ \n\r]*<string>(.+)</string>"
- return re.findall(regex, info, re.MULTILINE)[0]
-
-
-# Globals
-osx_dir = os.path.abspath (os.path.dirname(__file__))
-src_topdir = os.path.abspath ("%s/../.."%(osx_dir))
-version = _figure_version (osx_dir)
-dmg_dir = "%s/Cherokee-dmg" % (osx_dir)
-dmg_rw_path = "%s/Cherokee-%s-RW.dmg" % (osx_dir, version)
-dmg_fullpath = "%s/Cherokee-%s.dmg" % (osx_dir, version)
-
-
-def _clean_up():
- cherokee_destdir = "%s/cherokee-destdir" %(TMP)
-
- exe ("sudo rm -rfv %s" % (cherokee_destdir), colorer=red)
- exe ("sudo rm -rfv %s %s" % (dmg_dir, dmg_fullpath), colorer=red)
- exe ("mkdir -p %s %s" % (dmg_dir, cherokee_destdir))
-
-
-def _build_cherokee():
- destdir = "%s/cherokee-destdir" %(TMP)
- root_dir = "%s/cherokee-destdir/root" %(TMP)
- resource_dir = "%s/cherokee-destdir/resources" %(TMP)
-
- # Ensure it's compiled
- chdir (src_topdir)
- exe ("make %s" % (MAKE_PARAMS))
-
- # Install it
- exe ("sudo make install DESTDIR=%s" % (root_dir))
- exe ("sudo mv %s/usr/local/etc/cherokee/cherokee.conf %s/usr/local/etc/cherokee/cherokee.conf.example" % (root_dir, root_dir), colorer=red)
-
- # Fix permissions (TODO)
- None
-
- # Copy resources
- exe ("mkdir -p %s" %(resource_dir), colorer=blue)
-
- exe ("cp -v %s/Info.plist %s" %(osx_dir, resource_dir), colorer=green)
- exe ("cp -v %s/Description.plist %s" %(osx_dir, resource_dir), colorer=green)
- exe ("cp -v %s/License.rtf %s" %(osx_dir, resource_dir), colorer=green)
- exe ("gunzip --stdout %s/background.tiff.gz > %s/background.tiff" % (osx_dir, resource_dir), colorer=green)
-
- # Build pkg
- exe ("rm -rfv %s/cherokee.pkg" %(dmg_dir), colorer=red)
-
- chdir ('%s/usr/local' %(root_dir))
-
- exe ("%s --verbose " % (PKG_MAKER) +
- "--id org.cherokee.webserver " +
- "--root %s/usr/local " % (root_dir) +
- "--domain system " +
- "--root-volume-only " +
- "--info %s/Info.plist " %(resource_dir) +
- "--resources %s " %(resource_dir) +
- "--version %s " %(version) +
- "--out %s/cherokee.pkg" %(dmg_dir))
-
-def _copy_cherokee_app():
- exe ("cp -rv %s/Cherokee-admin.app '%s/Cherokee Admin.app'" %(osx_dir, dmg_dir))
- exe ("cp -rv %s/dmg-background.png '%s/background.png'" %(osx_dir, dmg_dir))
- exe ("ln -s /Applications %s/Applications" %(dmg_dir))
-
-## http://efreedom.com/Question/1-96882/Create-Nice-Looking-DMG-Mac-OS-Using-Command-Line-Tools
-## http://clanmills.com/articles/macinstallers/
-
-def _build_dmg():
- chdir (TMP)
-
- # RW version
- exe ("hdiutil create -verbose -format UDRW " +
- "-volname Cherokee-%s " %(version) +
- "-srcfolder %s " %(dmg_dir) +
- "%s" %(dmg_fullpath), colorer=green)
-
- # Attach
- path = exe_output ("hdiutil attach %s | sed -n 's/.*\(\/Volumes\/.*\)/\1/p'" %(dmg_fullpath))
- print "path", path
-
- exe ("ls -l %s" % (dmg_fullpath))
-
-
-def perform():
- # Change the current directory
- prev_dir = chdir (TMP)
-
- # Perform
- try:
- _clean_up()
- _build_cherokee()
- _copy_cherokee_app()
- _build_dmg()
- except:
- chdir (prev_dir)
- raise
-
- # Done and dusted
- chdir (prev_dir)
- print yellow("Done and dusted!")
-
-
-def check_preconditions():
- conf = os.path.join (src_topdir, "cherokee.conf.sample")
- assert "server!user = www" in open(conf).read(), "Bad user"
- assert "server!group = www" in open(conf).read(), "Bad group"
- assert "prefix = /usr/local" in open("Makefile").read(), "Wrong configuration"
- assert os.access (TMP, os.W_OK), "Cannot compile in: %s" %(TMP)
- assert which("hdiutil"), "hdiutil is required"
- assert which("gunzip"), "gunzip is required"
- assert which("svn"), "SVN is required"
-
-
-if __name__ == "__main__":
- check_preconditions()
- perform()
Binary file not shown.
View
@@ -1,75 +0,0 @@
-import os
-import subprocess
-
-
-# Colors
-#
-ESC = chr(27) + '['
-RESET = '%s0m' % (ESC)
-
-def green (s):
- return ESC + '0;32m' + s + RESET
-
-def red (s):
- return ESC + '0;31m' + s + RESET
-
-def yellow (s):
- return ESC + '1;33m' + s + RESET
-
-def blue (s):
- return ESC + '0;34m' + s + RESET
-
-
-# Utilies
-#
-def prepend_env (var, value):
- prev = os.getenv(var)
- os.putenv(var, "%s:%s"%(value, prev))
- return prev
-
-def chdir (dir):
- if '*' in dir or '?' in dir:
- tmp = exe_output ("ls -1d %s" %(dir))
- dir = tmp.split('\n')[0]
- current = os.getcwd()
- os.chdir (dir)
- return current
-
-def exe_output (cmd):
- p = subprocess.Popen (cmd, shell=True, stdout=subprocess.PIPE)
- return p.stdout.read()
-
-def exe (cmd, colorer=lambda x: x, return_fatal=True):
- print cmd
-
- p = subprocess.Popen (cmd, shell=True, stdout=subprocess.PIPE)
- while True:
- line = p.stdout.readline()
- if not line:
- break
- print colorer(line.rstrip('\n\r'))
-
- p.wait()
- if return_fatal:
- if p.returncode != 0:
- print '\n%s: Could execute: %s' %(red('ERROR'), cmd)
-
- assert p.returncode == 0, "Execution failed"
-
- return p.returncode
-
-def which (program):
- def is_exe(fpath):
- return os.path.exists(fpath) and os.access(fpath, os.X_OK)
-
- fpath, fname = os.path.split(program)
- if fpath:
- if is_exe(program):
- return program
- else:
- for path in os.environ["PATH"].split(os.pathsep):
- exe_file = os.path.join(path, program)
- if is_exe(exe_file):
- return exe_file
-
- return None

0 comments on commit 81a5bf7

Please sign in to comment.