[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need help converting ess package to melpa-ess



On 17 August 2018 at 22:48, David Bremner wrote:
| Dirk Eddelbuettel <edd@debian.org> writes:
| 
| > Hi debian-emacsen folks,
| >
| > I am the maintainer of the ess package (providing a rocking Emacs mode for R
| > and other stats backends).  But I don't really read (or, hah, write) elisp.
| >
| > Is there another package I should look at?  Any resources I should consider?
| 
| There is a trivial example on the wiki
| 
|       https://wiki.debian.org/EmacsenTeam/elpa-hello
| 
| Below I've attached a diff for a rough conversion. The resulting package

You are awesome. Thanks so much. I will work with this and get back to you.

| has an (unrelated I think) error about doc-base, and it needs the
| corresponding transitional package (and probably a few other details
| documented in the wiki page above). I aimed for a minimal patch, rather

I'll work on this weekend as I get time.

| than the nicest possible package (i.e. no conversion to dh).
| 
| A couple of notes
| 
| - the file lisp/ess-package.el is used by dh_elpa / package.el to
|   extract metadata from the package. This means
|   + I had to change the version number from 0 (this is a newly
|   discovered bug in dh_elpa). It's nicer, but not mandatory for that
|   version to track the upstream version.
|   + I removed the dependency on julia-mode, since your sources include
|   julia-mode, and elpa-julia-mode doesn't (yet) exist in debian.

Removing that is a pending change upstream. (I lurk on their GitHub project.)
May get reversed / altered now that Julia had 1.0. We'll see. For now removal
is fine.

Dirk

| - The package still uses sed, but now seds the source in place.
| 
| 
| diff --git a/debian/changelog b/debian/changelog
| index c8692dd..46b56a6 100644
| --- a/debian/changelog
| +++ b/debian/changelog
| @@ -1,3 +1,9 @@
| +ess (17.11-3) UNRELEASED; urgency=medium
| +
| +  * experimental conversion to dh_elpa
| +
| + -- David Bremner <bremner@debian.org>  Fri, 17 Aug 2018 21:42:24 -0300
| +
|  ess (17.11-2) unstable; urgency=medium
|  
|    * lisp/ess-utils.el: Synced with updated upstream per issue #465
| diff --git a/debian/control b/debian/control
| index dd1484f..9a76864 100644
| --- a/debian/control
| +++ b/debian/control
| @@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 7.0.0)
|  Build-Depends-Indep: texlive-base, texlive-latex-base, texlive-latex-recommended, texlive-latex-extra, texlive-generic-recommended, texlive-extra-utils, texlive-fonts-recommended, texinfo, autotools-dev
|  Homepage: http://ess.r-project.org
|  
| -Package: ess
| +Package: elpa-ess
|  Architecture: all
|  Depends: ${misc:Depends}, emacsen-common (>= 2.0.8), dpkg (>= 1.15.4) | install-info
|  Recommends: r-base-core
| diff --git a/debian/elpa b/debian/elpa
| new file mode 100644
| index 0000000..43a8a61
| --- /dev/null
| +++ b/debian/elpa
| @@ -0,0 +1,2 @@
| +ess-autoloads.el
| +lisp/*.el
| diff --git a/debian/emacsen-install b/debian/emacsen-install
| deleted file mode 100644
| index 55aa662..0000000
| diff --git a/debian/emacsen-remove b/debian/emacsen-remove
| deleted file mode 100644
| index 81b6171..0000000
| diff --git a/debian/emacsen-startup b/debian/emacsen-startup
| deleted file mode 100644
| index 19c8720..0000000
| diff --git a/debian/rules b/debian/rules
| index ad09d51..d7c89c5 100755
| --- a/debian/rules
| +++ b/debian/rules
| @@ -64,13 +64,12 @@ install-stamp: build-stamp
|  	dh_installdirs
|  
|  #	cd doc ; $(MAKE) install PREFIX=`pwd`/debian/ess
| -	cp lisp/*.el debian/ess/usr/share/emacs/site-lisp/ess
| -	! [ -e debian/ess/usr/share/emacs/site-lisp/ess/ess-site.el ] || \
| -		chmod u+w debian/ess/usr/share/emacs/site-lisp/ess/ess-site.el
| -	cat lisp/ess-site.el | \
| -		sed -e 's,(defvar ess-etc-directory nil,(defvar ess-etc-directory "/usr/share/ess/etc/",1'\
| -		    -e 's,(while (and (listp ess-etc,(while (and (not ess-etc-directory) (listp ess-etc,1' \
| -		> debian/ess/usr/share/emacs/site-lisp/ess/ess-site.el
| +	# ! [ -e debian/ess/usr/share/emacs/site-lisp/ess/ess-site.el ] || \
| +	# 	chmod u+w debian/ess/usr/share/emacs/site-lisp/ess/ess-site.el
| +	sed -i -e 's,(defvar ess-etc-directory nil,(defvar ess-etc-directory "/usr/share/ess/etc/",1'\
| +	    -e 's,(while (and (listp ess-etc,(while (and (not ess-etc-directory) (listp ess-etc,1' \
| +		lisp/ess-site.el
| +	dh_elpa
|  	mkdir -p debian/ess/usr/share/ess
|  	cp -a etc debian/ess/usr/share/ess/
|  	rm -f debian/ess/usr/share/ess/etc/BACKBUGS.BAT
| diff --git a/lisp/ess-pkg.el b/lisp/ess-pkg.el
| index 660378c..62f674d 100644
| --- a/lisp/ess-pkg.el
| +++ b/lisp/ess-pkg.el
| @@ -1,2 +1,2 @@
| -(define-package "ess" "0" "Emacs Speaks Statistics" '((julia-mode "0.3"))
| +(define-package "ess" "17.11" "Emacs Speaks Statistics" nil
|    :url "http://ess.r-project.org"; :keywords nil)

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd@debian.org


Reply to: