This page describes how to build Emacs 23.1.93 debian package for the Nokia N900. Everything is done under scratchbox: I make the hypothesis you already have a usable build environment.
Let's first grab Emacs 23.1.93 sources:
$ wget -q http://alpha.gnu.org/gnu/emacs/pretest/emacs-23.1.93.tar.gz $ wget -q http://alpha.gnu.org/gnu/emacs/pretest/emacs-23.1.93.tar.gz.sig $ gpg --verify emacs-23.1.93.tar.gz.sig gpg: Signature made Sat 27 Feb 2010 04:16:56 AM CET using DSA key ID BC40251C gpg: Good signature from "Chong Yidong <cyd@stupidchicken.com>" $ tar xzf emacs-23.1.93.tar.gz
Let's now get the 'debian' folder using mercurial
$ cd emacs-23.1.93 $ hg clone http://hg.natisbad.org/N900/emacs-23.1.93-debian-folder debian requesting all changes adding changesets adding manifests adding file changes added 3 changesets with 20 changes to 17 files updating to branch default 17 files updated, 0 files merged, 0 files removed, 0 files unresolved
If you are interested by some details about the content of the 'debian' folder, you can take a look at my previous emacs-22.2 for N900 page which provides additional details on that topic.
Let's now compile the package. If you have some laundry to do, you can probably do it now: compilation take a lot of time!
$ dpkg-buildpackage -rfakeroot -us -uc -sd -b -i -ICVS -I.hg ...
At the end of the process, you should have the following:
$ ls -lh ../*.deb -rw-r--r-- 1 arno 1000 25M Feb 28 17:06 ../emacs_23.1.93-1_armel.deb
You now just have to upload the .deb to you device and do a dpkg -i to install it. If you want to use emacs in fullscreen on your device, you may be interested by this entry.
As an additional note, I did not manage to build the stable version (22.1) of Emacs under Scratchbox (segfault of qemu) but 23.1.93 works like a charm.