Previously, the package description would include the full build tree
path which varies. Instead, remove any duplicate slashes and any
components other than the immediate parent.
Thanks to Chris Lamb for reporting the problem and tracking down the
cause.
Bug-Debian: https://bugs.debian.org/972861
(write-region
(concat
";;; Generated package description from "
- (replace-regexp-in-string "-pkg\\.el\\'" ".el" pkg-file)
+ (replace-regexp-in-string ;; just the final y.el or x/y.el
+ "^.*?\\([^/]+/\\)?\\([^/]+\\)$" "\\1\\2"
+ (replace-regexp-in-string
+ "/+" "/"
+ (replace-regexp-in-string "-pkg\\.el\\'" ".el" pkg-file)))
" -*- no-byte-compile: t -*-\n"
(prin1-to-string
(nconc