At my work (Windows 7), we don't have access to elpa or melpa, but we have a network drive which contains emacs packages that have been manually downloaded and approved.
Using code similar to the following (heavily based on https://emacs.stackexchange.com/a/17408/5142) Emacs users are able to have a MELPA-like experience.
(require 'package)
(setq myelpa-msde "//network/fsf/emacs-plugins/"
myelpa (expand-file-name "myelpa/" user-emacs-directory)
package-archives `(("myelpa" . ,myelpa))
use-package-always-ensure t)
(package-initialize)
(unless (file-exists-p myelpa)
(require 'package-x)
(setq package-archive-upload-base myelpa)
(mkdir myelpa)
(dolist (file (directory-files myelpa-msde 'fqn "\\.*[.]\\(el\\|tar\\)"))
(message "Preparing %s" file)
(package-upload-file file)
(when (string= (file-name-extension file) "tar")
(copy-file file myelpa 'force)))
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
However, look at that again
(when (string= (file-name-extension file) "tar")
(copy-file file myelpa 'force)))
without this hack, any tar file that gets uploaded to the "myelpa" local repository is corrupt (it seems to be a file containing just the directory listing of the original tar). The package index is updated correctly, so I was able to apply this workaround by just force copying the tarball again.
Is this a bug in Emacs or am I doing it wrong? According to https://www.gnu.org/software/emacs/manual/html_node/elisp/Package-Archives.html I would have thought this would be considered a "multi file package" and just work.