diff --git a/srcpkgs/apache-devel b/srcpkgs/apache-devel
new file mode 120000
index 0000000000..f7b7ca9dbd
--- /dev/null
+++ b/srcpkgs/apache-devel
@@ -0,0 +1 @@
+apache
\ No newline at end of file
diff --git a/srcpkgs/apache/apache-devel.template b/srcpkgs/apache/apache-devel.template
new file mode 100644
index 0000000000..8f9056832b
--- /dev/null
+++ b/srcpkgs/apache/apache-devel.template
@@ -0,0 +1,18 @@
+# Template file for 'apache-devel'.
+#
+short_desc="${short_desc} - development files"
+long_desc="
+ ${long_desc}
+
+ This packages contains files for development, static files, headers, etc."
+
+noarch=yes
+Add_dependency run apache
+
+do_install()
+{
+ mkdir -p ${DESTDIR}/usr/share/apache-httpd
+ mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr
+ mv ${SRCPKGDESTDIR}/usr/share/apache-httpd/build \
+ ${DESTDIR}/usr/share/apache-httpd
+}
diff --git a/srcpkgs/apache/files/apache.confd b/srcpkgs/apache/files/apache.confd
new file mode 100644
index 0000000000..e4364d698d
--- /dev/null
+++ b/srcpkgs/apache/files/apache.confd
@@ -0,0 +1,15 @@
+# Configuration file for the Apache httpd service.
+
+#
+# The default processing model (MPM) is the process-based
+# 'prefork' model. A thread-based model, 'worker', is also
+# available, but does not work with some modules (such as PHP).
+# The service must be stopped before changing this variable.
+#
+#HTTPD=/usr/sbin/httpd.worker
+
+#
+# To pass additional options (for instance, -D definitions) to the
+# httpd binary at startup, set OPTIONS here.
+#
+#OPTIONS=
diff --git a/srcpkgs/apache/files/apache.logrotate b/srcpkgs/apache/files/apache.logrotate
new file mode 100644
index 0000000000..c9c2f7a294
--- /dev/null
+++ b/srcpkgs/apache/files/apache.logrotate
@@ -0,0 +1,5 @@
+/var/log/httpd/*log {
+ postrotate
+ /etc/init.d/apache reload >/dev/null 2>&1 || true
+ endscript
+}
diff --git a/srcpkgs/apache/files/apache.rc b/srcpkgs/apache/files/apache.rc
new file mode 100644
index 0000000000..d333689ae9
--- /dev/null
+++ b/srcpkgs/apache/files/apache.rc
@@ -0,0 +1,47 @@
+#!/sbin/runscript
+#
+command=/usr/sbin/apachectl
+pidfile=/var/run/httpd/httpd.pid
+extra_commands="reload"
+describe="The Apache HTTP server"
+
+depend()
+{
+ need localmount
+ provide httpd
+}
+
+start()
+{
+ if [ ! -d /var/run/httpd ]; then
+ mkdir -p /var/run/httpd
+ fi
+ if [ ! -d /var/log/httpd ]; then
+ mkdir -p /var/log/httpd
+ fi
+
+ ebegin "Starting Apache HTTP server"
+ ${command} start >/dev/null
+ eend $?
+}
+
+stop()
+{
+ ebegin "Stopping Apache HTTP server"
+ ${command} stop >/dev/null
+ eend $?
+}
+
+restart()
+{
+ ebegin "Restarting Apache HTTP server"
+ ${command} restart >/dev/null
+ eend $?
+}
+
+reload()
+{
+ ebegin "Restarting Apache gracefully"
+ ${command} graceful >/dev/null
+ eend $?
+}
diff --git a/srcpkgs/apache/files/xbps.layout b/srcpkgs/apache/files/xbps.layout
new file mode 100644
index 0000000000..8a14286baa
--- /dev/null
+++ b/srcpkgs/apache/files/xbps.layout
@@ -0,0 +1,22 @@
+
+ prefix:
+ exec_prefix: /usr
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/libexec/httpd
+ mandir: ${exec_prefix}/share/man
+ sysconfdir: /etc/httpd
+ datadir: ${exec_prefix}/share/apache-httpd
+ installbuilddir:${datadir}/build
+ errordir: ${datadir}/error
+ iconsdir: ${datadir}/icons
+ htdocsdir: /srv/httpd
+ manualdir: ${datadir}/manual
+ cgidir: ${htdocsdir}/cgi-bin
+ includedir: ${exec_prefix}/include/httpd
+ localstatedir: /var
+ runtimedir: ${localstatedir}/run/httpd
+ logfiledir: ${localstatedir}/log/httpd
+ proxycachedir: ${localstatedir}/cache/httpd
+
diff --git a/srcpkgs/apache/patches/apachectl-confd.patch b/srcpkgs/apache/patches/apachectl-confd.patch
new file mode 100644
index 0000000000..d0f4b699e9
--- /dev/null
+++ b/srcpkgs/apache/patches/apachectl-confd.patch
@@ -0,0 +1,15 @@
+--- support/apachectl.in.orig 2010-03-06 18:09:11.000000000 +0100
++++ support/apachectl.in 2010-03-06 18:12:31.000000000 +0100
+@@ -56,6 +56,12 @@
+ # the URL to your server's mod_status status page. If you do not
+ # have one, then status and fullstatus will not work.
+ STATUSURL="http://localhost:@PORT@/server-status"
++
++# Source /etc/conf.d/apache for $HTTPD setting, etc.
++if [ -r /etc/conf.d/apache ]; then
++ . /etc/conf.d/apache
++fi
++
+ #
+ # Set this variable to a command that increases the maximum
+ # number of file descriptors allowed per child process. This is
diff --git a/srcpkgs/apache/template b/srcpkgs/apache/template
new file mode 100644
index 0000000000..28ed93776b
--- /dev/null
+++ b/srcpkgs/apache/template
@@ -0,0 +1,125 @@
+# Template file for 'apache'
+pkgname=apache
+version=2.2.15
+wrksrc=httpd-${version}
+distfiles="http://www.apache.org/dist/httpd/httpd-${version}.tar.bz2"
+build_style=gnu_configure
+configure_args="--prefix= --enable-pie --enable-modules=all
+--enable-mods-shared=all --enable-authn-dbm --enable-authn-anon
+--enable-authn-dbd --enable-authn-alias --enable-authz-dbm
+--enable-authz-owner --enable-authnz-ldap --enable-auth-digest -enable-isapi
+--enable-file-cache --enable-cache --enable-disk-cache --enable-mem-cache
+--enable-dbd --enable-bucketeer --enable-dumpio --enable-echo --enable-reqtimeout
+--enable-ext-filter --enable-substitute --enable-deflate --enable-charset-lite
+--enable-ldap --enable-log-forensic --enable-logio --enable-mime-magic
+--enable-cern-meta --enable-expires --enable-headers --enable-ident
+--enable-usertrack --enable-unique-id --enable-proxy --enable-proxy-connect
+--enable-proxy-ftp --enable-proxy-http --enable-proxy-scgi --enable-proxy-ajp
+--enable-proxy-balancer --enable-ssl --enable-http --enable-speling
+--enable-dav --enable-info --enable-cgi --enable-cgid --enable-dav-fs
+--enable-dav-lock --enable-vhost-alias --enable-imagemap --enable-so
+--enable-rewrite --with-pcre=/usr --enable-layout=XBPS --sysconfdir=/etc/httpd"
+short_desc="The Number One HTTP Server On The Internet"
+maintainer="Juan RP "
+checksum=5ae0c428e7abd87eecbac8564d90a7182104325bae7086c21db7b3a1e3140ca7
+long_desc="
+ The Apache HTTP Server Project is an effort to develop and maintain an
+ open-source HTTP server for modern operating systems including UNIX and
+ Windows NT. The goal of this project is to provide a secure, efficient and
+ extensible server that provides HTTP services in sync with the current HTTP
+ standards."
+
+subpackages="apache-devel"
+
+conf_files="
+/etc/conf.d/apache
+/etc/httpd/extra/httpd-autoindex.conf
+/etc/httpd/extra/httpd-dav.conf
+/etc/httpd/extra/httpd-manual.conf
+/etc/httpd/extra/httpd-vhosts.conf
+/etc/httpd/extra/httpd-info.conf
+/etc/httpd/extra/httpd-languages.conf
+/etc/httpd/extra/httpd-userdir.conf
+/etc/httpd/extra/httpd-ssl.conf
+/etc/httpd/extra/httpd-mpm.conf
+/etc/httpd/extra/httpd-default.conf
+/etc/httpd/extra/httpd-multilang-errordoc.conf
+/etc/httpd/httpd.conf
+/etc/httpd/magic
+/etc/httpd/mime.types"
+
+system_accounts="httpd"
+httpd_descr="Apache HTTP server"
+httpd_homedir="/srv/httpd"
+
+openrc_services="apache default false"
+keep_empty_dirs=yes
+
+Add_dependency run glibc
+Add_dependency run zlib
+Add_dependency run libuuid
+Add_dependency run pcre
+Add_dependency run db
+Add_dependency run gdbm
+Add_dependency run expat
+Add_dependency run libldap
+Add_dependency run openssl
+Add_dependency run apr
+Add_dependency run apr-util
+
+Add_dependency build zlib-devel
+Add_dependency build libuuid-devel
+Add_dependency build pcre-devel
+Add_dependency build db-devel
+Add_dependency build gdbm-devel
+Add_dependency build expat-devel
+Add_dependency build libldap-devel
+Add_dependency build openssl-devel
+Add_dependency build apr-devel
+Add_dependency build apr-util-devel
+
+pre_configure()
+{
+ # set default user
+ sed -e 's#User daemon#User httpd#' \
+ -e 's#Group daemon#Group httpd#' \
+ -i ${wrksrc}/docs/conf/httpd.conf.in || return 1
+
+ cat ${FILESDIR}/xbps.layout >> ${wrksrc}/config.layout
+}
+
+post_install()
+{
+ # Enable userdir, languages, autoindex, errors.
+ # Set a working ServerRoot, disable mod_unique_id.
+ # Set and enable ServerName to 127.0.0.1.
+ sed -e 's|#\(Include /etc/httpd/extra/httpd-multilang-errordoc.conf\)|\1|' \
+ -e 's|#\(Include /etc/httpd/extra/httpd-autoindex.conf\)|\1|' \
+ -e 's|#\(Include /etc/httpd/extra/httpd-languages.conf\)|\1|' \
+ -e 's|#\(Include /etc/httpd/extra/httpd-userdir.conf\)|\1|' \
+ -e 's|#\(Include /etc/httpd/extra/httpd-default.conf\)|\1|' \
+ -e 's|ServerRoot \"\"|ServerRoot \"/etc/httpd\"|' \
+ -e 's|#\(ServerName\).*|\1 127.0.0.1:80|' \
+ -e 's|\(LoadModule unique_id_module.*\)|#\1|' \
+ -i ${DESTDIR}/etc/httpd/httpd.conf || return 1
+
+ # symlinks for /etc/httpd
+ ln -fs /var/log/httpd ${DESTDIR}/etc/httpd/logs
+ ln -fs /var/run/httpd ${DESTDIR}/etc/httpd/run
+ ln -fs /usr/libexec/httpd ${DESTDIR}/etc/httpd/modules
+ ln -fs /usr/share/apache-httpd/build ${DESTDIR}/etc/httpd/build
+
+ # Remove unused stuff.
+ rm -f ${DESTDIR}/srv/httpd/cgi-bin/test-cgi
+ rm -f ${DESTDIR}/srv/httpd/cgi-bin/printenv
+ rm -f ${DESTDIR}/srv/httpd/index.html
+
+ install -D -m644 ${FILESDIR}/apache.logrotate \
+ ${DESTDIR}/etc/logrotate.d/apache || return 1
+ install -D -m755 ${FILESDIR}/apache.rc \
+ ${DESTDIR}/etc/init.d/apache || return 1
+ install -D -m644 ${FILESDIR}/apache.confd \
+ ${DESTDIR}/etc/conf.d/apache || return 1
+
+ rm -rf ${DESTDIR}/etc/httpd/original
+}
diff --git a/xbps-src/common/mapping_shlib_binpkg.txt b/xbps-src/common/mapping_shlib_binpkg.txt
index e4aa5e4a47..13f6a69d75 100644
--- a/xbps-src/common/mapping_shlib_binpkg.txt
+++ b/xbps-src/common/mapping_shlib_binpkg.txt
@@ -628,4 +628,4 @@ libLLVMHello.so llvm llvm-devel
libLTO.so llvm llvm-devel
libprofile_rt.so llvm llvm-devel
libapr-1.so apr apr-devel
-ibaprutil-1.so apr-util apr-util-devel
+libaprutil-1.so apr-util apr-util-devel