mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-29 21:18:59 +08:00
2d9068f7bc
* package.rcp: use HTTPS Dropping package repos that don't support HTTPS: http://tromey.com/elpa/ (obsolete), and http://joseito.republika.pl/sunrise-commander/ (the sunrise-commander recipe uses a github URL anyway).
42 lines
2.0 KiB
Plaintext
42 lines
2.0 KiB
Plaintext
;; Same as "package" except that it takes the version from Emacs 24
|
|
(:name package
|
|
:description "ELPA implementation (\"package.el\") from Emacs 24"
|
|
:builtin "24"
|
|
:type http
|
|
:url "https://repo.or.cz/w/emacs.git/blob_plain/ba08b24186711eaeb3748f3d1f23e2c2d9ed0d09:/lisp/emacs-lisp/package.el"
|
|
:features package
|
|
:post-init
|
|
(progn
|
|
;; add package.rcp's old `package-user-dir' to
|
|
;; `package-directory-list', in case there are
|
|
;; packages installed there from before
|
|
(let ((old-package-user-dir
|
|
(expand-file-name
|
|
(convert-standard-filename
|
|
(concat (file-name-as-directory
|
|
default-directory)
|
|
"elpa")))))
|
|
(when (file-directory-p old-package-user-dir)
|
|
(add-to-list 'package-directory-list old-package-user-dir)))
|
|
;; Ensure `package-archives' is defined
|
|
(setq package-archives (bound-and-true-p package-archives))
|
|
;; Ensure needed entries are in `package-archives' without
|
|
;; clobbering what's already there.
|
|
(let ((protocol
|
|
(if (and (fboundp 'gnutls-available-p) (gnutls-available-p))
|
|
"https://"
|
|
(lwarn '(el-get tls) :warning "Your Emacs doesn't support HTTPS (TLS)%s"
|
|
(if (eq system-type 'windows-nt)
|
|
",\n see https://github.com/dimitri/el-get/wiki/Installation-on-Windows."
|
|
"."))
|
|
"http://"))
|
|
(archives '(("melpa" . "melpa.org/packages/")
|
|
("gnu" . "elpa.gnu.org/packages/")
|
|
("marmalade" . "marmalade-repo.org/packages/"))))
|
|
(dolist (archive archives)
|
|
(add-to-list 'package-archives
|
|
(cons (car archive) (concat protocol (cdr archive))))))))
|
|
|
|
;; Don't init, elpa packages installed by el-get is
|
|
;; initialized from loaddefs (package-initialize)
|