I modified Jonathan Underwood's emacs-vm spec file to work on the 8.2.x branch. More interestingly, perhaps, I added code so that it can optionally pull down the latest 8.2.x source from launchpad.
To build the initial RPM do: save the spec code below as emacs-vm.spec touch <path-to->/SOURCES/vm-8.2.x_latest.tgz (Note: source must exist or rpmbuild croaks) rpmbuild -ba emacs-vm.spec (Note: this will automatically download the latest 8.2.x branch from launchpad) To rebuild the RPM: rpm -ivh emacs-vm-8.2.x_latest-1.fc12_jjk.src.rpm rpmbuild -ba emacs-vm.spec If you want to force a re-download of the latest branch either delete the SOURCE file or run: rpmbuild -ba emacs-vm.spec --with downloadvm If you need to bootstrap to build first without bbdm (see the comments on the spec file) rpmbuild -ba emacs-vm.spec --without bbdbsupport If you want to specify another launchpad branch: rpmbuild -ba emacs-vm.spec --define 'vmbranch 8.y.x' Hope this is useful, Jeff Here is the modified spec file (note be careful that the linebreaks are preserved properly via email): ######################################################################## # Font-lock support of message bodies was added (Source1) from # http://de.geocities.com/ulf_jasper/emacs.html on 10th February 2007. # Note on building VM with support for bbdb: if support for VM in BBDB is # required, then the source elisp for VM must be installed at build time. If # support for BBDB is required in VM, then the BBDB source elisp must be present # at build time. Hence there is a circular BuildRequires and bootstrapping is # required. The way to do this is (i) build emacs-vm without BuildRequires: # emacs-bbdb-el (ii) build emacs-bbdb with BuildRequires: emacs-vm-el (iii) # rebuild emacs-vm with BuildRequires: emacs-bbdb-el. Or vice versa. #JJK: Therefore, do the following (when building the first time) #JJK: (1) rpmbuild -ba emacs-vm.spec --without bbdb #JJK: (2) Install new vm build #JJK: (3) rpmbuild -ba emacs-vm.spec #JJK: NOTE: modified by JJK to build from latest vm launchpad sources. #JJK: add '--with downloadvm' if you want to update source (default = without) #JJK: Note the file ../SOURCE/vm-{%vmversion}.tgz must always exist or #JJK: you will get an error that source file is missing #JJK: if you do then you can just 'touch' the file to make it exist %if %{undefined vmbranch} %define vmbranch 8.2.x %endif %bcond_with downloadvm #JJK: end #JJK: %global bbdbsupport 1 #JJK: Default to including bbdbsupport (use --without bbdbsupport to remove) %bcond_without bbdbsupport %global pkgdir %{_emacs_sitelispdir}/vm %global pixmapdir %{pkgdir}/pixmaps %global initfile %{_emacs_sitestartdir}/vm-mode-init.el Summary: Emacs VM mailreader Name: emacs-vm #JJK: Version: 8.1.2 Version: %{vmbranch}_latest Release: 1%{?dist}_jjk License: GPLv2+ Group: Applications/Internet URL: https://launchpad.net/vm #JJK: Source0: http://launchpad.net/vm/8.1.x/%{version}/+download/vm-%{version}.tgz Source0: vm-%{version}.tgz Requires: emacs >= %{_emacs_version} Requires(pre): /sbin/install-info Requires(post): /sbin/install-info BuildRequires: emacs texinfo texinfo-tex # This obsoletes and provides can be removed in Fedora 20 Obsoletes: emacs-vm-el <= 8.1.2-1 Provides: emacs-vm-el <= 8.1.2-1 #JJK: %if %{bbdbsupport} %if %{with bbdbsupport} BuildRequires: emacs-bbdb-el Requires: emacs-bbdb %endif %description VM (View Mail) is an Emacs subsystem that allows UNIX mail to be read and disposed of within Emacs. Commands exist to do the normal things expected of a mail user agent, such as generating replies, saving messages to folders, deleting messages and so on. There are other more advanced commands that do tasks like bursting and creating digests, message forwarding, and organizing message presentation according to various criteria. %prep #JJK: Begin #Download new vm source from launchpad & replace old source if flag #set or if source not a compressed zip file if [[ %{with downloadvm} = 1 ]] || \ ! [ -r %{_sourcedir}/vm-%{version}.tgz ] || \ ! [[ $(file -b %{_sourcedir}/vm-%{version}.tgz) =~ "^gzip compressed data" ]] ; then rm -rf vm-%{version} bzr branch lp:vm/%{vmbranch} vm-%{version} [ -d vm-%{version} ] && tar czf %{_sourcedir}/vm-%{version}.tgz vm-%{version} fi #JJK: End %setup -q -n vm-%{version} # Add missing entry for u-vm-color.el to lisp Makefile.in sed -i -e '/SOURCES += tapestry.el/ a SOURCES += u-vm-color.el' lisp/Makefile.in %build %{__autoconf} #JJK: added %configure make %install install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_infodir} #JJK: changed 'info_dir' to 'infodir' and added 'docdir' line make install \ prefix=%{buildroot}%{_prefix} \ bindir=%{buildroot}%{_bindir} \ infodir=%{buildroot}%{_infodir} \ docdir=%{buildroot}%{_defaultdocdir}/emacs-vm-%{version} \ pixmapdir=%{buildroot}%{pixmapdir} # Copy source lisp files into buildroot for emacs-vm-el sub-package (cd lisp ; install -p -m 644 *.el %{buildroot}%{pkgdir}) # Create initialization file. install -d %{buildroot}/%{_emacs_sitestartdir} cat > %{buildroot}/%{initfile} <<EOF ;; Startup settings for VM (setq vm-toolbar-pixmap-directory "%{pixmapdir}") (setq vm-image-directory "%{pixmapdir}") (require 'vm-autoloads) ;; Settings for u-vm-color.el (require 'u-vm-color) (add-hook 'vm-summary-mode-hook 'u-vm-color-summary-mode) (add-hook 'vm-select-message-hook 'u-vm-color-fontify-buffer) (defadvice vm-fill-paragraphs-containing-long-lines (after u-vm-color activate) (u-vm-color-fontify-buffer)) EOF %clean rm -rf %{buildroot} %post /sbin/install-info %{_infodir}/vm.info.gz %{_infodir}/dir 2>/dev/null || : %preun if [ "$1" = "0" ] ; then /sbin/install-info --delete %{_infodir}/vm.info.gz %{_infodir}/dir 2>/dev/null || : fi %files %defattr(-,root,root,-) #JJK: %doc README COPYING %doc %{_defaultdocdir}/* %doc %{_infodir}/* %{_bindir}/* %{pixmapdir} %{pkgdir} %{pkgdir}/version.txt %{initfile} %changelog * Mon Jun 11 2012 Jeffrey J. Kosowsky - 8.2.x_latest - Update to latest 8.2.x branch - Added flag '--with downloadvm' to get latest vm sources (default without) - Added flag '--without bbdbsupport' to make it easier to compile without bbdbsupport (default is 'with') - Use --define 'vmbranch 8.y.x' to specify an alternative launchpad branch - Added 'autoconf' to make and adjusted directories & included files for 8.2.x * Wed May 30 2012 Jonathan G. Underwood <[email protected]> - 8.1.2-1 - Update to version 8.1.2 - Remove separate emacs-vm-el sub-package to comply with updated packaging guidelines * Fri Jan 13 2012 Fedora Release Engineering <[email protected]> - 8.1.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Mar 8 2011 Jonathan G. Underwood <[email protected]> - 8.1.1-3 - Replace define with global in macro definitions * Tue Feb 08 2011 Fedora Release Engineering <[email protected]> - 8.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed May 26 2010 Jonathan G. Underwood <[email protected]> - 8.1.1-1 - Update to version 8.1.1 - Fix source URL * Thu Apr 1 2010 Jonathan G. Underwood <[email protected]> - 8.1.0-1 - Update to version 8.1.0 final - Remove -fno-var-tracking-assignments from CFLAGS once more * Tue Feb 8 2010 Jonathan G. Underwood <[email protected]> - 8.1.0-0.3.beta2 - Add missing version.txt file to file list * Tue Feb 8 2010 Jonathan G. Underwood <[email protected]> - 8.1.0-0.2.beta2 - Update to 8.1.0-beta2 * Sat Dec 26 2009 Jonathan G. Underwood <[email protected]> - 8.1.0-0.1.beta - Update to 8.1.0 beta version * Sat Dec 26 2009 Jonathan G. Underwood <[email protected]> - 8.0.14-2 - Add -fno-var-tracking-assignments to CFLAGS to allow build to complete (gcc bug http://gcc.gnu.org/PR41371) * Fri Dec 18 2009 Jonathan G. Underwood <[email protected]> - 8.0.14-1 - Update to 8.0.14 - Drop old macros for emacspackaging and use _emacs macros - Remove BuildRoot definition - No longer delete buildroot at beginning of install * Wed Sep 16 2009 Jonathan G. Underwood <[email protected]> - 8.0.12-6 - Bump release to fix up cvs problem * Wed Sep 16 2009 Jonathan G. Underwood <[email protected]> - 8.0.12-5 - Add patch to fix charset recognition with emacs 23 - Bump minimum emacs to version 23.1 - Rebuild against emacs 23.1 * Tue Feb 24 2009 Fedora Release Engineering <[email protected]> - 8.0.12-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Dec 5 2008 Jonathan G. Underwood <[email protected]> - 8.0.12-3 - Add patch to make vm-decode-postponed-mime-message autoloaded (BZ 474728) * Wed Nov 19 2008 Jonathan G. Underwood <[email protected]> - 8.0.12-2 - Re-add u-vm-color.el to lisp/Makefile.in - Fix spec file typo in install command that installs the uncompiled lisp files * Fri Nov 7 2008 Jonathan G. Underwood <[email protected]> - 8.0.12-1 - Update to version 8.0.12 - Remove u-vm-color.el (now included with upstream VM) - Remove hack to add vm-revno.el to lisp files - Drop devo number stuff, since upstream seems to have stopped using the revision number in the release tarball name (finally!) * Mon Sep 29 2008 Jonathan G. Underwood <[email protected]> - 8.0.11.581-2 - Add vm-revno.el to lisp files * Sat Sep 27 2008 Jonathan G. Underwood <[email protected]> - 8.0.11.581-1 - Update to 8.0.11-581 * Wed Jul 30 2008 Jonathan G. Underwood <[email protected]> - 8.0.10.575-1 - Update to version 8.0.10-575 - Update BuildRoot to preferred mktemp variant * Sun Mar 23 2008 Jonathan G. Underwood <[email protected]> - 8.0.9.544-1 - Update to 8.0.9-544 - Update u-vm-color.el to version 2.10 - Remove patch needed for 8.0.7 * Tue Feb 12 2008 Jonathan G. Underwood <[email protected]> - 8.0.7.522-2 - Bump release and rebuild for GCC 4.3 * Sun Jan 13 2008 Jonathan G. Underwood <[email protected]> - 8.0.7.522-1 - Update to version 8.0.7-522 - Add patch to fix correct display of redistributed flag (BZ #428248) * Sun Nov 18 2007 Jonathan G. Underwood <[email protected]> - 8.0.5.504-2 - Add -p option to install when copying source elisp files into buildroot to preserve mtimes (BZ #389081) * Sun Nov 11 2007 Jonathan G. Underwood <[email protected]> - 8.0.5.504-1 - Update to version 8.0.5 - Remove patch to fix Makefile from 8.0.3 * Sat Oct 13 2007 Jonathan G. Underwood <[email protected]> - 8.0.3.495-7 - Fix typo in emacs_startdir macro - Add ability to build with BBDB support * Sun Sep 9 2007 Jonathan G. Underwood <[email protected]> - 8.0.3.495-6 - Fix typo with start file creation * Sun Sep 9 2007 Jonathan G. Underwood <[email protected]> - 8.0.3.495-5 - Add BuildRequires: emacs since emacs-el doesn't pull this in * Sat Sep 8 2007 Jonathan G. Underwood <[email protected]> - 8.0.3.495-4 - Update for agreement with packaging guidelines - add versioned emacs requirement - If no pkg-config is found, revert to sensible defaults * Thu Aug 30 2007 Jonathan G. Underwood <[email protected]> - 8.0.3.495-3 - Fix problem with vm-autoloads.el RH BZ #262361 * Wed Aug 22 2007 Jonathan G. Underwood <[email protected]> - 8.0.3.495-2 - Add BuildRequires: texinfo-tex to ensure building of pdf docs * Tue Aug 21 2007 Jonathan G. Underwood <[email protected]> - 8.0.3.495-1 - Update to release 8.0.3 * Mon Aug 6 2007 Jonathan G. Underwood <[email protected]> - 8.0.2.482-4 - Bump release - Fix previous changelog entry * Sat Aug 4 2007 Jonathan G. Underwood <[email protected]> - 8.0.2.482-3 - Clarify license * Wed Jul 25 2007 Jesse Keating <[email protected]> - 8.0.2.482-2 - Rebuild for RH #249435 * Sun Jul 22 2007 Jonathan G. Underwood <[email protected]> - 8.0.2.482-1 - Update to bugfix release 8.0.2 * Thu Jun 28 2007 Jonathan G. Underwood <[email protected]> - 8.0.1.465-1 - Update to bugfix release 8.0.1 (fixes BZ #245780) * Tue Jun 26 2007 Jonathan G. Underwood <[email protected]> - 8.0.0.453-1 - Ensure files in /usr/bin have exec bit set properly (BZ #245740) * Tue Jun 19 2007 Jonathan G. Underwood <[email protected]> - 8.0.0.453-1 - Update to version 8.0.0 devo 453 which removes the need for thr vmrf patch - No longer need to bundle vcard stuff as that is included upstream - Spec file cleanups - No longer use separate pixmaps * Thu May 17 2007 Jonathan G. Underwood <[email protected]> - 7.19.devo282-11 - Fix missnaming of startup file - Fix changelog entry * Sun Mar 18 2007 Jonathan G. Underwood <[email protected]> - 7.19.devo282-10 - Fixed error in specification of Source0 * Sun Mar 18 2007 Jonathan G. Underwood <[email protected]> - 7.19.devo282-9 - Redefine version to include vmrf patch version (devo282) - Remove pointless %%{pkg} macro - Add new pixmaps with better sizing (still ugly though) - Renamed the vmrf patch to include the version * Sat Feb 10 2007 Jonathan G. Underwood <[email protected]> - 7.19-8 - Added u-vm-color.el from http://de.geocities.com/ulf_jasper/emacs.html - Added vcard support from http://www.splode.com/users/friedman/software/emacs-lisp/ - Fixed name of info files in pre and post scripts * Sat Feb 3 2007 Jonathan G. Underwood <[email protected]> - 7.19-5 - Add patch from http://www.robf.de/Hacking/elisp/ (resolves bug 224501) - Ensure CFLAGS="$RPM_OPT_FLAGS" (bug 225101) * Mon Aug 28 2006 Jonathan G. Underwood <[email protected]> - 7.19-4 - Bump release for FC-6 mass rebuild * Tue Jun 20 2006 Jonathan G. Underwood <[email protected]> - 7.19-3 - Change group to Applications/Internet - Add release tag to the Requires for the -el package * Tue May 23 2006 Jonathan G. Underwood <[email protected]> - 7.19-2 - Clean up spec file * Fri Sep 2 2005 Jonathan Underwood <[email protected]> - 7.19-1.fc4.jgu - Initial build - Generate vm-mode-init.el - Separate out *.el files into -el package - Added patch to remove warnings in the decode and encode programs
