all: all-in-place
+CR_EXCEPTIONS=copyright_exceptions
+.PHONY: check_copyrights
+check_copyrights:
+ @echo "Compute exceptions >$(CR_EXCEPTIONS)~"
+ @(cd packages; \
+ export LANG=C; \
+ find . -name '*.el' -print0 | \
+ xargs -0 grep -L 'Free Software Foundation, Inc' | \
+ grep -v '\(\.dir-locals\|.-\(pkg\|autoloads\)\)\.el$$'; \
+ find . -name '*.el' -print | \
+ while read f; do \
+ fquoted="$$(echo $$f|tr '|' '_')"; \
+ sed -n -e '/[Cc]opyright.*, *[1-9][-0-9]*,\?$$/N' \
+ -e '/Free Software Foundation/d' \
+ -e "s|^\\(.*[Cc]opyright\\)|$$fquoted:\\1|p" \
+ "$$f"; \
+ done) | sort >$(CR_EXCEPTIONS)~
+ diff -u "$(CR_EXCEPTIONS)" "$(CR_EXCEPTIONS)~"
+
## Deploy the package archive to archive/, with packages in
## archive/packages/:
archive: archive-tmp
#mkdir -p archive/admin
#cp admin/* archive/admin/
+# FIXME: Turn it into an `external', which will require adding the notion of
+# "snapshot" packages.
org-fetch: archive-tmp
cd $(ARCHIVE_TMP)/packages; \
pkgname=`curl -s http://orgmode.org/elpa/|perl -ne 'push @f, $$1 if m/(org-\d{8})\.tar/; END { @f = sort @f; print "$$f[-1]\n"}'`; \
(while (progn (forward-line -1) (>= (point) start))
(insert ";; ")))
(set (make-local-variable 'backup-inhibited) t)
- (save-buffer)
+ (basic-save-buffer) ;Less chatty than save-buffer.
(kill-buffer)))
(delete-directory dir t)
(cons (intern pkg) (vector (version-to-list vers) req desc 'single)))
#!/bin/sh -x
-batchmode=no
+makelog=""
+buildir="$(pwd)"
export LANG=C
case "$1" in
- "--batch") batchmode=yes ;;
+ "--batch")
+ makelog="$(pwd)/make.log"
+ exec >"$makelog" 2>&1
+ ;;
esac
-# Return on STDOUT the files that don't seem to have the needed copyright
-# notice, or that have a copyright notice that looks suspicious.
-copyright_notices () {
- find . -name '*.el' -print0 |
- xargs -0 grep -L 'Free Software Foundation, Inc' |
- grep -v '\(\.dir-locals\|.-\(pkg\|autoloads\)\)\.el$'
-
- find . -name '*.el' -print |
- while read f; do
- sed -n -e '/[Cc]opyright.*, *[1-9][-0-9]*,\?$/N' \
- -e '/Free Software Foundation/d' \
- -e "s|^\\(.*[Cc]opyright\\)|$(echo $f | tr '|' '_'):\\1|p" "$f"
- done
-}
-
# Send an email to warn about a problem.
-# Takes the body on STDIN and the subject as argument.
signal_error () {
title="$*"
- if [ "no" = "$batchmode" ]; then
- cat -
+ if [ "" = "$makelog" ]; then
echo "Error: $title"
else
mx_gnu_org="$(host -t mx gnu.org | sed 's/.*[ ]//')"
Subject: $title
ENDDOC
- cat -
+ cat "$makelog"
echo "."; sleep 1) | telnet "$mx_gnu_org" smtp
fi
+ exit 1
}
-check_copyright () {
- base="copyright_exceptions"
- (cd $1/packages; copyright_notices) >"$base.new"
- if [ -r "$base.old" ] &&
- ! diff "$base.old" "$base.new" >/dev/null;
- then
- diff -u "$base.old" "$base.new" |
- signal_error "Copyright notices changed"
- exit 1
- else
- mv "$base.new" "$base.old"
- fi
-}
-#cd ~elpa/build
+cd ../elpa
-(cd ../elpa;
+# Fetch changes.
+git pull || signal_error "git pull failed"
- # Fetch changes.
- git pull || signal_error "git pull failed";
+# Setup and update externals.
+make externals
- # Setup and update externals.
- make externals
- )
+make check_copyrights || signal_error "check_copyright failed"
-#check_copyright ../elpa
+cd "$buildir"
rsync -av --delete --exclude=ChangeLog --exclude=.git ../elpa/packages ./
rm -rf archive # In case there's one left over!
-make archive-full >make.log 2>&1 || {
- signal_error "make archive-full failed" <make.log
- exit 1
+make archive-full || {
+ signal_error "make archive-full failed"
}
latest="emacs-packages-latest.tgz"
(cd archive
*/archive-contents | *-readme.txt ) mv "$f" "$dst" ;;
* ) if [ -r "$dst" ]
then rm "$f"
- else mv "$f" "$dst"
+ else
+ # FIXME: Announce the new package/version on
+ # gnu.emacs.sources!
+ mv "$f" "$dst"
fi ;;
esac
done
mv build/archive/"$latest" staging/
rm -rf build/archive)
-# Make the HTML files.
+# Make the HTML and readme.txt files.
(cd ../staging/packages
emacs --batch -l ../../build/admin/archive-contents.el \
--eval '(batch-html-make-index)')
--- /dev/null
+./auctex/latex.el: "pounds" "copyright"
+./auctex/multi-prompt.el
+./auctex/style/amsart.el
+./auctex/style/amsbook.el
+./auctex/style/amsbsy.el
+./auctex/style/amsmath.el:;; FIXME: What about the copyright for <= 2001?
+./auctex/style/amsopn.el
+./auctex/style/amstext.el
+./auctex/style/article.el
+./auctex/style/beamer.el
+./auctex/style/book.el
+./auctex/style/czech.el
+./auctex/style/danish.el
+./auctex/style/dk.el
+./auctex/style/dutch.el
+./auctex/style/foils.el
+./auctex/style/german.el
+./auctex/style/graphics.el
+./auctex/style/j-article.el
+./auctex/style/j-book.el
+./auctex/style/j-report.el
+./auctex/style/jarticle.el
+./auctex/style/jbook.el
+./auctex/style/jreport.el
+./auctex/style/jsarticle.el
+./auctex/style/jsbook.el
+./auctex/style/jurabib.el:;; you assign the copyright to the FSF.
+./auctex/style/letter.el
+./auctex/style/natbib.el
+./auctex/style/ngerman.el
+./auctex/style/plfonts.el
+./auctex/style/plhb.el
+./auctex/style/report.el
+./auctex/style/scrartcl.el
+./auctex/style/scrbook.el
+./auctex/style/scrlttr2.el
+./auctex/style/scrpage2.el
+./auctex/style/scrreprt.el
+./auctex/style/slovak.el
+./auctex/style/swedish.el
+./auctex/style/virtex.el
+./auctex/tex-fold.el: ("(C)" ("copyright"))
+./auctex/tex-info.el: '("copyright" nil)
+./muse/htmlize-hack.el
+./uni-confusables/gen-confusables.el: (insert ";; Copyright (C) 1991-2009, 2010 Unicode, Inc.
+./uni-confusables/gen-confusables.el:;; for the copyright and permission notice.\n\n")
+./uni-confusables/uni-confusables.el
+./uni-confusables/uni-confusables.el:;; Copyright (C) 1991-2009, 2010 Unicode, Inc.
+./uni-confusables/uni-confusables.el:;; for the copyright and permission notice.