debian, apache2.4 and libapache2-svn

I did a stupid thing yesterday: I upgraded the apache of a development server running debian. Doesn’t sound too bad, does it? Did you know that the debian maintainers kinda dropped the libapache2-svn library when switching from apache2.2 to 2.4? No? Me neither :oogle: Why on earth did they do that? Well, asking this kind of question never helps, so I digged into it a little and tried to fix it without asking Google right away :/
So after a little research, I ran into a pretty good description that worked out. This stackoverflow post roughly explains what you have to do:

cd /tmp
mkdir svn_tmp
cd svn_tmp
sudo apt-get install apache2-dev
sudo apt-get build-dep subversion
apt-get source --compile subversion

Stop when it’s checking for gcc etc and edit some files:

Let’s edit some files. First, subversion-1.7.9/debian/control. Make sure that apache2-dev figures in Build-Depends sections (around line 7):

Build-Depends: debhelper, libneon27-gnutls-dev, libserf-dev (>= 1), zlib1g-dev,
               libapr1-dev, libaprutil1-dev, libdb5.1-dev,
               libsasl2-dev, apache2-dev,

Then, check if theres a section for libapache-2. If it’s there, make sure to remove the apache2.2-common dependency. If not, add the complete section:

Package: libapache2-svn
Section: httpd
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Suggests: db5.1-util
Description: Subversion server modules for Apache
 This package provides the mod_dav_svn and mod_authz_svn modules for
 the Apache 2.2 web server.  These modules provide Subversion's WebDAV
 server backend, to serve repositories over the http and https
 protocols.  See the 'subversion' package for more information.

Then, edit subversion-1.7.9/debian/rules and make sure that ENABLE_APACHE is true:

ENABLE_APACHE        := yes

Now, we are ready to start the build process again:

cd /tmp/svn_tmp/subversion-1.7.9 && dpkg-buildpackage -b -uc

This process may take a long time. For me, has taken like 1 hour. Finally, we can install the package.

sudo dpkg -i /tmp/svn_tmp/libapache2-svn_1.7.9-1+nmu3_amd64.deb 
sudo a2enmod dav_svn
sudo a2enmod authz_svn
sudo service apache2 restart

Warum man wählen sollte :D