Reputation: 2527
Is there a way to download all the Emacs packages from a repository like marmalade-repo to create a repository server in local network?
Upvotes: 4
Views: 1237
Reputation: 2350
Found very interesting https://github.com/redguardtoo/elpa-mirror package.
"It will create everything you need (web files, packages, archive-contents) for hosting a ELPA mirror site. Only locally installed packages will be included."
You can even use local file path:
# Now elpa/marmalade/melpa site will be overrided
(setq package-archives '(("myelpa" . "~/myelpa")))
Upvotes: 1
Reputation: 13907
Have a look at the stephanh/elpa-mirror project (github.com). It is written in scala, and from a quick scan of the code, it does the mirroring correctly.
Essentially what you need to do is to download archive-contents
file from the repository, parse each package descriptor to figure out the name of the corresponding package file, and download it.
The mirror of the repository is nothing fancy: just put everything (archive-contents
file and all the downloaded packages) at the published URL, and you are done.
Upvotes: 1