Building a deb package from source is relatively easy (note you want the DEB source not RPM) but you need to be careful with library dependencies. The new mutt might need library versions not available for the old Debian installation.
Inspect package requirements from the package page at https://tracker.debian.org/pkg/mutt . Notice the versioned links. The "box" symbol links the control file, which lists Build-Dependencies.
The most recent version 2.2.4-1 requires
Build-Depends: debhelper-compat (= 12),
docbook-xml,
docbook-xsl,
gawk,
gettext,
libgnutls28-dev,
libgpgme11-dev,
libidn2-dev,
libkrb5-dev,
libncurses5-dev,
libncursesw5-dev,
libgsasl-dev,
libtokyocabinet-dev,
pkg-config,
w3m,
xsltproc,
zlib1g-dev
Notice some of these have version numbers in the package name. Are they available for Debian 7? If not, it's going to be a nightmare iterating recursively down the chain of Build-Dependencies, probably not worth it. The next oldest version packaged for Debian was 2.0.5, not recent enough for your requirements.
If Debian 7 does happen to have the required libraries (libgnutls28-dev, libgpgme11-dev, etc), then the next step would be to download the orig tar file (the upstream source tarball), the debian .dsc file and the debian diff file (.debian.tar.xz), all available from the package page at https://packages.debian.org/unstable/mutt.
If you download those 3 files (and maybe the orig.tar.gz.asc for checksum), then you would unpack with
dpkg-source -x mutt_2.2.4-1.dsc
(dpkg-source
is in the dpkg-dev
package)
Then cd into the source dir (mutt-2.2.4). If all build dependencies are in order, all you would need to do is run
dpkg-buildpackage
The .deb binary will be created in the parent directory, which you can install manually,
sudo dpkg -i mutt_2.2.4*.deb
You'll likely have problems with the required library versions listed in Build-Dependencies. I expect that it will not work on Debian 7 (without rebuilding the entire chain of libaries, which I'd judge as not worth the effort).
Apart from that you'd probably have a problem with Build-Depends: debhelper-compat (= 12)
, which is more easily dealt with. Replace debhelper-compat (= 12)
with debhelper (>= 9~)
and create a file debian/compat
containing simply the number 9
.
For good measure you'd want to create your own debian/changelog entry to mark your local build with its own version number, which you can do using dch
(debchange
from the devscripts
package)