Permalink
Browse files

Completion of reorganization.

  • Loading branch information...
1 parent 8c678da commit 63213c4501e5475f4cdbfb5dc405a1e2de357617 @milkypostman milkypostman committed Dec 14, 2011
Showing with 113 additions and 26 deletions.
  1. +2 −2 .gitignore
  2. +1 −1 .gitmodules
  3. +71 −8 README.md
  4. 0 buildarchive → buildpkg
  5. +34 −11 melpa
  6. +1 −1 package-build.el
  7. 0 {archives → packages}/.situbusit
  8. +4 −3 webpage/index.tmpl
View
@@ -1,6 +1,6 @@
/sync
-/archives/*.tar
-/archives/archive-contents
+/packages/*.tar
+/packages/archive-contents
/working/*/
/webpage/index.html
/webpage/index.md
View
@@ -1,3 +1,3 @@
[submodule "epkgs"]
path = epkgs
- url = https://github.com/emacsmirror/epkgs.git
+ url = https://github.com/milkypostman/epkgs.git
View
@@ -1,19 +1,82 @@
# MELPA
-This is some elisp that helps for building Emacs packages based on
-version control
-repositories.
+Repository of code for *MELPA* or *Milkypostman's ELPA* or *Milkypostman's Experimental Lisp Package Repository* if you're not into the whole brevity thing.
-The `buildarchive` script will create an archive file in the
-`archives/` folder with version corresponding to the newest revision
-available.
+### Checking out
-Repositories are checked out to the `working/` directory.
+ git clone git://github.com/milkypostman/melpa.git
+ git sm init
+ git sm update
+
+
+## Scripts
+
+* `buildpkg` -- Create an archive of the package(s) passed as
+arguments to the script. Built packages are put in the `packages/`
+folder with version corresponding to the newest HEAD revision
+available; given according to the `%Y%m%d` format.
+
+* `melpa` -- All the logic for generating everything in
+the repository based on the `pkglist` file. By default this will
+update the [epkgs] repository, build all packages listed in `pkglist`,
+compile the `index.html` file for the [melpa] website front page, and
+sync with the site.
+
+ The following arguments are accepted,
+
+ update
+ : update the epkgs repository
+
+ clear
+ : clean out the `packages/` directory
+
+ build
+ : build all packages in `pkglist`
+
+ index
+ : build the `index.html` file
+
+ sync
+ : sync built files with the repository
+
+[melpa]: http://melpa.milkbox.net
+
+
+## Code
+
+The `package-build.el` file contains all the heavy lifting. The
+scripts above call the `package-build-archive` function from the
+command-line to actually build the package(s).
+
+ Alternatively you can
+load this file from within Emacs and issues commands from there.
+
+
+
+
+## Adding Packages
+
+Feel free to open an Issue requesting packages and I'll see if they
+build nicely.
+
+## Developement
+
+Fork away! Send me some pull requests.
+
+### Notes
+
+Packages end up in the `packages/` directory by default.
+This can be configured using the `package-build-archive-dir` variable.
+
+Repositories are checked out to the `working/` directory by default.
+This can be configured using the `package-build-working-dir` variable.
All metadata for building the packages is based off the git submodule
for the [`epkgs`][epkgs] repository generated by the
-[emacsmirror][emacsmirror].
+[emacsmirror][emacsmirror]. *However,* currently the site is not
+keeping up-to-date so I have [mirrored the site][mepkgs].
+[mepkgs]: https://github.com/milkypostman/epkgs
[emacsmirror]: https://github.com/emacsmirror/
[epkgs]: https://github.com/emacsmirror/epkgs
File renamed without changes.
View
45 melpa
@@ -1,25 +1,32 @@
#!/bin/bash
+BASEDIR=`dirname $0`
+
function melpa_update_epkgs {
echo "Updating epkgs..."
- cd epkgs
+ pushd ${BASEDIR}/epkgs
git pull
- cd ..
+ popd
echo
}
-function melpa_clear_archives {
- echo "*** Clearing the archives folder..."
- rm archives/*
+function melpa_clear_packages {
+ echo "*** Clearing the packages folder..."
+ rm $BASEDIR/packages/*
echo
}
function melpa_build_pkglist {
echo "*** Building all packages..."
- for pkg in `echo pkglist`; do
- ./buildarchive
+ pushd ${BASEDIR}
+ for pkg in `cat pkglist`; do
+ echo "Building package: $pkg"
+ ./buildpkg $pkg
+ echo
+ echo
done
+ popd
echo
}
@@ -31,21 +38,37 @@ function melpa_build_archive {
function melpa_sync {
echo "*** Pushing changes to the server..."
- rsync -avz --delete archives/ milkbox.net:webapps/melpa/packages
+ rsync -avz --delete packages webpage/index.html milkbox.net:webapps/melpa/
echo
}
function melpa_generate_html {
echo "*** Building webpage..."
- cd webpage
+ pushd ${BASENAME}/webpage
awk '{ if(/<!--list-of-packages-->/)
while((getline < "../pkglist")>0)
print "* " $0
else print}' index.tmpl > index.md
pandoc -s --mathml -t html --smart index.md > index.html
- cd ..
+ popd
echo
}
-melpa_generate_html
+args=$@
+
+if [[ "$#" == "0" ]]; then
+ args="update clear build html sync"
+fi
+
+for task in $args; do
+ case $task in
+ update ) melpa_update_epkgs ;;
+ clear ) melpa_clear_packages ;;
+ build ) melpa_build_pkglist ;;
+ html ) melpa_generate_html ;;
+ sync ) melpa_sync ;;
+ esac
+ shift
+done
+
View
@@ -48,7 +48,7 @@
(defvar package-build-working-dir (expand-file-name "working/")
"Directory in which to keep checkouts.")
-(defvar package-build-archive-dir (expand-file-name "archives/")
+(defvar package-build-archive-dir (expand-file-name "packages/")
"Directory in which to keep compiled archives.")
File renamed without changes.
View
@@ -1,8 +1,9 @@
-% milkypostman's ELPA for HEAD
+% MELPA
+# MELPA
-# Melpa
+*MELPA* or *Milkypostman's ELPA* or *Milkypostman's Experimental Lisp Package Repository* if you're not into the whole brevity thing.
-Melpa is a repository for development versions of Emacs packages (hot
+MELPA is a repository for development versions of Emacs packages (hot
from the repo).
## Installing

0 comments on commit 63213c4

Please sign in to comment.