2 # Copyright (C) 2007-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE_NAME
:=httpd
16 PKG_SOURCE
:=$(PKG_SOURCE_NAME
)-$(PKG_VERSION
).
tar.bz2
17 PKG_SOURCE_URL
:=http
://ftp.uni-erlangen.de
/pub
/mirrors
/apache
/httpd
/ \
18 http
://apache.imsam.
info/httpd
/
19 PKG_MD5SUM
:=3afa8137dc1999be695a20b62fdf032b
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_SOURCE_NAME
)-$(PKG_VERSION
)
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/apache
/Default
29 TITLE
:=The Apache Web Server
30 URL
:=http
://httpd.apache.org
/
34 $(call Package
/apache
/Default
)
36 DEPENDS
:=+libapr
+libaprutil
+zlib
+libexpat
+libpcre
+libopenssl
+libsqlite3
39 define Package
/apache
/description
40 The Apache Web Server is a powerful and flexible HTTP
/1.1 compliant
41 web server. Originally designed
as a replacement for the NCSA HTTP
42 Server
, it has grown to be the most popular web server on the Internet.
45 define Package
/apache-server
46 $(call Package
/apache
/Default
)
47 TITLE
:=The Apache Web Server and some tools
51 define Package
/apache-server
/description
52 Take care that you don
't include apache at the moment into your image
53 please select it only as module because busybox will override
54 /usr/sbin/httpd. It'll be solved soon. If you need to
include this
55 package in the image anyway
, remove httpd from busybox
56 (Base system
--> Configuration
--> Networking Utilities
--> httpd
).
57 Also you should take care for the initscripts
, apache
's httpd isn't
58 compatible with the one from busybox
, so if you want to use apache
59 for running your webif
, you
'll need to change the parameters in the
60 scripts and configure the rest in /etc/httpd.conf.
63 define Package/apache-server/conffiles
64 /etc/apache/httpd.conf
65 /etc/apache/extra/httpd-autoindex.conf
66 /etc/apache/extra/httpd-dav.conf
67 /etc/apache/extra/httpd-default.conf
68 /etc/apache/extra/httpd-info.conf
69 /etc/apache/extra/httpd-languages.conf
70 /etc/apache/extra/httpd-manual.conf
71 /etc/apache/extra/httpd-mpm.conf
72 /etc/apache/extra/httpd-multilang-errordoc.conf
73 /etc/apache/extra/httpd-ssl.conf
74 /etc/apache/extra/httpd-userdir.conf
75 /etc/apache/extra/httpd-vhosts.conf
77 /etc/apache/mime.types
80 define Package/apache-icons
81 $(call Package/apache/Default)
82 TITLE:=Icons from Apache
86 define Package/apache-icons/description
87 $(call Package/apache/description)
88 This package contains the icons from Apache.
91 define Build/Configure
92 $(call Build/Configure/Default, \
93 --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
94 --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
95 --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
99 --disable-disk-cache \
100 --enable-maintainer-mode \
101 --enable-mime-magic \
102 --without-suexec-bin \
103 --sysconfdir=/etc/apache \
104 ap_void_ptr_lt_long=no \
105 logfiledir="/var/log" \
110 $(MAKE) -C $(PKG_BUILD_DIR) \
111 DESTDIR="$(PKG_INSTALL_DIR)" \
115 define Build/InstallDev
116 rm -rf $(PKG_INSTALL_DIR)/usr/man/ \
117 $(PKG_INSTALL_DIR)/usr/share/manual/
118 # if you need docs take a look into the build-dir :)
120 $(CP) $(PKG_INSTALL_DIR)/etc/* \
122 mkdir -p $(1)/usr/include
123 $(CP) $(PKG_INSTALL_DIR)/usr/include/* \
125 mkdir -p $(1)/usr/lib
126 $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp \
128 mkdir -p $(1)/usr/sbin
129 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* \
131 mkdir -p $(1)/usr/share
132 $(CP) $(PKG_INSTALL_DIR)/usr/share/* \
136 define Package/apache-server/preinst
138 echo -e "You should take a look in the initscripts, busybox's httpd
\n\
139 uses some parameters which are maybe unsupported by apache.
"
142 define Package/apache-server/install
143 $(INSTALL_DIR) $(1)/usr/sbin
144 # we don't need apxs on the router, it's just for building apache modules.
145 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{ab,apachectl,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} $(1)/usr/sbin/
146 $(INSTALL_DIR) $(1)/usr/lib
147 $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp $(1)/usr/lib/
148 $(INSTALL_DIR) $(1)/usr/share
149 $(CP) $(PKG_INSTALL_DIR)/usr/share/{error,htdocs,cgi-bin,build} $(1)/usr/share/
150 $(INSTALL_DIR) $(1)/etc/apache
151 $(CP) $(PKG_INSTALL_DIR)/etc/apache/{magic,mime.types,extra} $(1)/etc/apache/
152 $(CP) ./files/etc/apache/httpd.conf $(1)/etc/apache/
155 define Package/apache-server/postrm
156 rm -rf /usr/sbin/httpd
157 ln -s /bin/busybox /usr/sbin/httpd
158 echo -e "You may need to change your initscripts back for the use
\n\
159 with busybox
's httpd."
162 define Package/apache-icons/install
163 $(INSTALL_DIR) $(1)/usr/share
164 $(CP) $(PKG_INSTALL_DIR)/usr/share/icons $(1)/usr/share/
167 $(eval $(call BuildPackage,apache))
168 $(eval $(call BuildPackage,apache-server))
169 $(eval $(call BuildPackage,apache-icons))