Completion of reorganization.

This commit is contained in:
Donald Ephraim Curtis 2011-12-13 21:04:08 -06:00
parent 8c678dad70
commit 63213c4501
8 changed files with 113 additions and 26 deletions

4
.gitignore vendored
View file

@ -1,6 +1,6 @@
/sync /sync
/archives/*.tar /packages/*.tar
/archives/archive-contents /packages/archive-contents
/working/*/ /working/*/
/webpage/index.html /webpage/index.html
/webpage/index.md /webpage/index.md

2
.gitmodules vendored
View file

@ -1,3 +1,3 @@
[submodule "epkgs"] [submodule "epkgs"]
path = epkgs path = epkgs
url = https://github.com/emacsmirror/epkgs.git url = https://github.com/milkypostman/epkgs.git

View file

@ -1,19 +1,82 @@
# MELPA # MELPA
This is some elisp that helps for building Emacs packages based on 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.
version control
repositories.
The `buildarchive` script will create an archive file in the ### Checking out
`archives/` folder with version corresponding to the newest revision
available.
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 All metadata for building the packages is based off the git submodule
for the [`epkgs`][epkgs] repository generated by the 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/ [emacsmirror]: https://github.com/emacsmirror/
[epkgs]: https://github.com/emacsmirror/epkgs [epkgs]: https://github.com/emacsmirror/epkgs

45
melpa
View file

@ -1,25 +1,32 @@
#!/bin/bash #!/bin/bash
BASEDIR=`dirname $0`
function melpa_update_epkgs { function melpa_update_epkgs {
echo "Updating epkgs..." echo "Updating epkgs..."
cd epkgs pushd ${BASEDIR}/epkgs
git pull git pull
cd .. popd
echo echo
} }
function melpa_clear_archives { function melpa_clear_packages {
echo "*** Clearing the archives folder..." echo "*** Clearing the packages folder..."
rm archives/* rm $BASEDIR/packages/*
echo echo
} }
function melpa_build_pkglist { function melpa_build_pkglist {
echo "*** Building all packages..." echo "*** Building all packages..."
for pkg in `echo pkglist`; do pushd ${BASEDIR}
./buildarchive for pkg in `cat pkglist`; do
echo "Building package: $pkg"
./buildpkg $pkg
echo
echo
done done
popd
echo echo
} }
@ -31,21 +38,37 @@ function melpa_build_archive {
function melpa_sync { function melpa_sync {
echo "*** Pushing changes to the server..." 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 echo
} }
function melpa_generate_html { function melpa_generate_html {
echo "*** Building webpage..." echo "*** Building webpage..."
cd webpage pushd ${BASENAME}/webpage
awk '{ if(/<!--list-of-packages-->/) awk '{ if(/<!--list-of-packages-->/)
while((getline < "../pkglist")>0) while((getline < "../pkglist")>0)
print "* " $0 print "* " $0
else print}' index.tmpl > index.md else print}' index.tmpl > index.md
pandoc -s --mathml -t html --smart index.md > index.html pandoc -s --mathml -t html --smart index.md > index.html
cd .. popd
echo 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 file

@ -48,7 +48,7 @@
(defvar package-build-working-dir (expand-file-name "working/") (defvar package-build-working-dir (expand-file-name "working/")
"Directory in which to keep checkouts.") "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.") "Directory in which to keep compiled archives.")

View file

@ -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). from the repo).
## Installing ## Installing