As Graeme points out, 3.13 is currently in experimental. My suggestion is to download that, and then apply the procedure given in Section 4.2 of the Debian Kernel Handbook: Rebuilding official Debian kernel packages.
if all goes well, this will create a custom Debian package for wheezy.
I haven't actually used this procedure myself, but I'm interested in knowing how to do it. If you run into trouble, ask here. I'd like to add an answer to goldilock's question which describes how to build a Debian package from Debian kernel sources.
NOTE: I may give this procedure a whirl myself if I get a chance. The probability of this would be greatly increased by someone giving it a try first, and reporting problems. :-)
NOTE 2: See also Section 1.2 of the Debian Kernel Handbook: Authors and Contributors. The current maintainer is Ben Hutchings. who is also a kernel developer, and does respond to questions and comments. So, I encourage everyone to submit improvements to the handbook.
NOTE 3: A preliminary run at this procedure reveals that the 3.13 package is listing
gcc 4.8 as a dependency. It is hard to believe that 4.8 is actually required as a dependency, but in any case, if the build dependencies need to be changed, that makes the procedure that much harder.
NOTE 4: Thanks to some detective work by derobert, we figured out that changing the compiler version in
debian/config/defines was probably the way to go. For completeness, the patch I'm currently using against the Debian sources is below.
I use the following commands to try to build:
fakeroot debian/rules source
fakeroot make -f debian/rules.gen binary-arch_amd64_none_amd64
However, this still looks for 4.8 and crashes, though the first command has clearly done some rewriting for 4.7.
UPDATE: I take it back. This works as long as the patched files are new enough (newer than other source files in the build). I noticed this worked when I popped and pushed my patch (using Mercurial Queues), which automatically updated the time stamp on the files. Yes, this is as weird as it sounds, but I can reproduce the problem.
I've posted to the debian-kernel mailing list, and the kernel-handbook mailing list. See bug in Debian kernel build scripts. I've not posted a formal bug report, because I'm not sure what package to file the bug against.
UPDATE 2: It looks like this may have been a form of user error. As can be seen from the message I wrote, the problem is with timestamps. Make uses timestamps, and my use of version control confused it, also taking into account with the fact that make is rebuilding some of the source files in this case.
# HG changeset patch
# Parent 81a16b960a67fa08c9a298bc03c5acfd3d6f7437
diff -r 81a16b960a67 debian/config/amd64/defines
@@ -5,7 +5,7 @@
bootloaders: grub-pc extlinux lilo
diff -r 81a16b960a67 debian/config/defines
@@ -23,7 +23,7 @@
@@ -50,4 +50,4 @@
-initramfs-tools: initramfs-tools (>= 0.110~)
+initramfs-tools: initramfs-tools (>= 0.109.1)
diff -r 81a16b960a67 debian/config/i386/defines
@@ -28,7 +28,7 @@
hardware: modern PCs