emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] ELPA: Support for building Package Variants and Package Upload.
Date: Sat, 28 May 2011 19:25:35 +0530	[thread overview]
Message-ID: <81oc2nq694.fsf@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 148 bytes --]


Attaching an improvement to my earlier patch
- http://patchwork.newartisans.com/patch/377/

The earlier patch can now be ignored.

Jambunathan K.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: elpa.patch --]
[-- Type: text/x-patch, Size: 8031 bytes --]

From 2ba0a7341c7968f38086cec3d7d3e8f0a95960ad Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Wed, 18 May 2011 23:55:13 +0530
Subject: [PATCH] ELPA: Support for building Package Variants and Package Upload.

* Makefile (PKG_TAG): Package version. Use YYMMDD as the
default version.
(PKG_SEP, PKG_FLAVOUR): New config variables for building
various flavours of org, for eg., org-odt20110518.tar,
(PKG_FILES): Removed
(PKG_LISP_FILES, PKG_INFO_FILES): These files end up in the root dir.
(PKG_DOC_FILES): Optional. These files end up in the doc dir.
(PKG_DATA_DIRS): Optional. Extra directories to be
distributed with tarball. For example, org-odt package uses
this to distribute rnc schema files, default styles file and
unit test files.
(PKG_README_ORG_FILE): README file.
(PKG_EL_DIR): Load path for package.el and
package-x.el. Useful if the build machine runs an Emacs
machine that doesn't ship with package manager (for example
Emacs-23.x)
(PKG_UPLOAD_DIR): Package tarball is copied here. This is
presumably the 'pub' dir of the webserver hosting the package.
(pkg-info, pkg-doc, pkg-data, pkg-readme, pkg-upload): New
targets subsumed within pkg target.
(pkg): Modified. Use the above targets.

* doc/ReleaseNotes.org: New file used to build package README
file.
---
 Makefile             |  124 ++++++++++++++++++++++++++++++++++++++++++++------
 doc/ReleaseNotes.org |   38 +++++++++++++++
 2 files changed, 147 insertions(+), 15 deletions(-)
 create mode 100644 doc/ReleaseNotes.org

diff --git a/Makefile b/Makefile
index 9693fd3..984c515 100644
--- a/Makefile
+++ b/Makefile
@@ -170,18 +170,58 @@ TEXIFILES   = doc/org.texi
 INFOFILES   = doc/org
 
 # Package Manager (ELPA)
+
+# Common Usage
+
+# |---------------------------------------+----------------------+--------------|
+# | Invocation                            | Output               | Side-Effects |
+# |---------------------------------------+----------------------+--------------|
+# | make pkg                              | org-20110518.tar     |              |
+# | make PKG_TAG=7.3 pkg                  | org-7.3.tar          |              |
+# | make PKG_FLAVOUR=odt pkg              | org-odt-20110518.tar |              |
+# |---------------------------------------+----------------------+--------------|
+
+# Advanced Usage
+
+# make PKG_EL_DIR="~/elisp" PKG_UPLOAD_DIR="~/packages/" PKG_TAG=7.3 pkg
+
+# Invocation shown above builds org-7.3.tar and uploads the same to
+# "~/packages" using package-x.el in "~/elisp/".
+
+ifndef PKG_TAG
 PKG_TAG = $(shell date +%Y%m%d)
+endif
+
+ifdef PKG_FLAVOUR
+PKG_SEP = -
+endif
+
+PKG_BNAME = org
+PKG_QNAME = $(PKG_BNAME)$(PKG_SEP)$(PKG_FLAVOUR)
+PKG_FNAME = $(PKG_QNAME)-$(PKG_TAG)
+
 PKG_DOC = "Outline-based notes management and organizer"
 PKG_REQ = "nil"
 
-PKG_FILES = $(LISPFILES0)		\
-            doc/dir doc/org		\
-            doc/pdflayout.sty		\
-            doc/org.pdf			\
-            doc/orgguide.pdf		\
-            doc/orgcard.tex		\
-            doc/orgcard.pdf		\
-            doc/orgcard_letter.pdf
+PKG_LISP_FILES = $(LISPFILES0)
+PKG_INFO_FILES = doc/org doc/dir
+PKG_DOC_FILES =  doc/org.pdf             \
+                 doc/org.html            \
+                 doc/orgguide.pdf        \
+                 doc/orgcard.txt         \
+                 doc/orgcard.pdf         \
+                 doc/orgcard_letter.pdf
+
+PKG_DATA_DIRS =
+PKG_README_ORG_FILE = doc/ReleaseNotes.org
+PKG_README_HTML_FILE = $(PKG_README_ORG_FILE:.org=.html)
+
+# PKG_EL_DIR =
+PKG_UPLOAD_DIR = packages
+
+ifdef PKG_EL_DIR
+BATCH_EXTRA = -eval "(setq load-path (cons (expand-file-name \"$(PKG_EL_DIR)\") load-path))"
+endif
 
 .SUFFIXES: .el .elc .texi
 SHELL = /bin/sh
@@ -402,14 +442,68 @@ distfile:
 
 pkg:
 	@if [ "X$(PKG_TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
+	echo "Building $(PKG_FNAME).tar ..."
 	touch doc/org.texi doc/orgcard.tex # force update
-	${MAKE} info
-	${MAKE} doc
-	rm -rf org-$(PKG_TAG) org-$(PKG_TAG).tar
-	$(MKDIR) org-$(PKG_TAG)
-	cp -r $(PKG_FILES) org-$(PKG_TAG)
-	echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-$(PKG_TAG)/org-pkg.el
-	tar cf org-$(PKG_TAG).tar org-$(PKG_TAG) --remove-files
+	rm -rf $(PKG_FNAME) $(PKG_FNAME).tar
+	$(MKDIR) $(PKG_FNAME)
+	cp -r $(PKG_LISP_FILES) $(PKG_FNAME)
+	${MAKE} pkg-info
+	${MAKE} pkg-doc
+	${MAKE} pkg-data
+	${MAKE} pkg-readme
+	echo "(define-package \"$(PKG_QNAME)\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > $(PKG_FNAME)/$(PKG_QNAME)-pkg.el
+	tar cf $(PKG_FNAME).tar $(PKG_FNAME) --remove-files
+	${MAKE} pkg-upload
+
+pkg-data: $(PKG_DATA_DIRS)
+	@if [ "X$(PKG_DATA_DIRS)" = "X" ];			\
+	then echo "*** WARNING: PKG_DATA_DIRS not defined ***";	\
+	else 							\
+	git clean -dfx $<;					\
+	mkdir -p $(PKG_FNAME)/$<;				\
+	cp -r $</* $(PKG_FNAME)/$<;				\
+	fi
+
+pkg-info: $(PKG_INFO_FILES)
+	cp -r $(PKG_INFO_FILES) $(PKG_FNAME)
+
+pkg-doc: $(PKG_DOC_FILES)
+	@if [ "X$(PKG_DOC_FILES)" = "X" ];			\
+	then echo "*** WARNING: PKG_DOC_FILES not defined ***";	\
+	else 							\
+	$(MKDIR) $(PKG_FNAME)/doc;				\
+	cp -r $(PKG_DOC_FILES) $(PKG_FNAME)/doc;		\
+	fi
+
+pkg-readme:
+	$(MKDIR) $(PKG_FNAME)
+	cp $(PKG_README_ORG_FILE) $(PKG_FNAME)/README.org
+	$(BATCH)						\
+	--eval "(require 'org-ascii)"				\
+	--visit=$(PKG_FNAME)/README.org				\
+	--eval "(org-export-as-ascii 3 t)"
+	cp $(PKG_FNAME)/README.txt $(PKG_FNAME)/README
+	rm -f $(PKG_FNAME)/README.txt $(PKG_FNAME)/README.org
+
+pkg-upload:
+	@if [ "X$(PKG_UPLOAD_DIR)" = "X" ];					\
+	then echo "*** WARNING: Skipping Upload of $(PKG_FNAME).tar  ***";	\
+	else									\
+	echo "Uploading $(PKG_FNAME).tar to $(PKG_UPLOAD_DIR) ...";		\
+	$(MKDIR) $(PKG_UPLOAD_DIR);						\
+	rm -f $(PKG_UPLOAD_DIR)/archive-contents;				\
+	$(BATCH) $(BATCH_EXTRA)							\
+	  --eval '(toggle-debug-on-error)'					\
+	  --eval "(require 'package-x)"						\
+	  --eval '(setq package-archive-upload-base "$(PKG_UPLOAD_DIR)")'	\
+	  --eval '(setq package-update-news-on-upload nil)'			\
+	  --eval '(package-upload-file "$(PKG_FNAME).tar")';			\
+	$(BATCH)								\
+	--eval "(require 'org-html)"						\
+	--visit=$(PKG_README_ORG_FILE)						\
+	--eval "(org-export-as-html 3 t)";					\
+	mv $(PKG_README_HTML_FILE) $(PKG_UPLOAD_DIR)/README.html;		\
+	fi
 
 cleanall:
 	${MAKE} clean
diff --git a/doc/ReleaseNotes.org b/doc/ReleaseNotes.org
new file mode 100644
index 0000000..af6b458
--- /dev/null
+++ b/doc/ReleaseNotes.org
@@ -0,0 +1,38 @@
+#+TITLE:	Readme
+#+AUTHOR:	Bastien Guerry
+#+EMAIL:	emacs-orgmode@gnu.org
+#+DATE:		%Y-%m-%d %T %Z
+#+DESCRIPTION:
+#+KEYWORDS:
+#+LANGUAGE:  en
+#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
+#+OPTIONS:   TeX:t LaTeX:dvipng skip:nil d:nil todo:t pri:nil tags:not-in-toc
+
+#+EXPORT_SELECT_TAGS: export
+#+EXPORT_EXCLUDE_TAGS: noexport
+#+LINK_UP:   
+#+LINK_HOME: 
+#+XSLT:
+
+
+* About Orgmode
+
+Org-mode is a mode for keeping notes, maintaining ToDo lists, and
+doing project planning with a fast and effective plain-text system.
+
+This package contains a daily build of Org-mode.
+
+Org-mode develops organizational tasks around NOTES files that contain
+information about projects as plain text.  Org-mode is implemented on
+top of outline-mode, which makes it possible to keep the content of
+large files well structured.  Visibility cycling and structure editing
+help to work with the tree.  Tables are easily created with a built-in
+table editor.  Org-mode supports ToDo items, deadlines, time stamps,
+and scheduling.  It dynamically compiles entries into an agenda that
+utilizes and smoothly integrates much of the Emacs calendar and diary.
+Plain text URL-like links connect to websites, emails, Usenet
+messages, BBDB entries, and any files related to the projects.  For
+printing and sharing of notes, an Org-mode file can be exported as a
+structured ASCII file, as HTML, or (todo and agenda items only) as an
+iCalendar file.  It can also serve as a publishing tool for a set of
+linked webpages.
-- 
1.7.2.3


[-- Attachment #3: Type: text/plain, Size: 6 bytes --]



-- 

             reply	other threads:[~2011-05-28 13:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-28 13:55 Jambunathan K [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-11-12 13:14 [PATCH] (ELPA): Support for building Package Variants and Package Upload Jambunathan K
2010-11-12 15:09 ` Carsten Dominik
2010-11-12 16:53   ` Jambunathan K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81oc2nq694.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).