2 # Copyright (C) 2007-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
13 PKG_SOURCE_NAME
:=httpd
14 PKG_MAINTAINER
:=Thomas Heil
<heil@terminal-consulting.de
>
15 PKG_LICENSE
:=Apache License
17 PKG_SOURCE
:=$(PKG_SOURCE_NAME
)-$(PKG_VERSION
).
tar.bz2
18 PKG_SOURCE_URL
:=@APACHE
/httpd
/
19 PKG_MD5SUM
:=6c10e15835ab214464228a9beb7afba8
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_SOURCE_NAME
)-$(PKG_VERSION
)
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/apache
/Default
30 SUBMENU
:=Web Servers
/Proxies
31 TITLE
:=The Apache Web Server
32 URL
:=http
://httpd.apache.org
/
35 define Package
/apache
/Default
/description
36 The Apache Web Server is a powerful and flexible HTTP
/1.1 compliant
37 web server. Originally designed
as a replacement for the NCSA HTTP
38 Server
, it has grown to be the most popular web server on the Internet.
42 $(call Package
/apache
/Default
)
43 DEPENDS
:=+libapr
+libaprutil
+libpcre
+libopenssl
+unixodbc
46 define Package
/apache
/description
47 $(call Package
/apache
/Default
/description
)
49 This package contains the Apache web server and utility programs.
51 Take care that you don
't include apache at the moment into your image
52 please select it only as module because busybox will override
53 /usr/sbin/httpd. It'll be solved soon. If you need to
include this
54 package in the image anyway
, remove httpd from busybox
55 (Base system
--> Configuration
--> Networking Utilities
--> httpd
).
56 Also you should take care for the initscripts
, apache
's httpd isn't
57 compatible with the one from busybox
, so if you want to use apache
58 for running your webif
, you
'll need to change the parameters in the
59 scripts and configure the rest in /etc/httpd.conf.
62 define Package/apache/conffiles
63 /etc/apache/httpd.conf
64 /etc/apache/extra/httpd-autoindex.conf
65 /etc/apache/extra/httpd-dav.conf
66 /etc/apache/extra/httpd-default.conf
67 /etc/apache/extra/httpd-info.conf
68 /etc/apache/extra/httpd-languages.conf
69 /etc/apache/extra/httpd-manual.conf
70 /etc/apache/extra/httpd-mpm.conf
71 /etc/apache/extra/httpd-multilang-errordoc.conf
72 /etc/apache/extra/httpd-ssl.conf
73 /etc/apache/extra/httpd-userdir.conf
74 /etc/apache/extra/httpd-vhosts.conf
76 /etc/apache/mime.types
79 define Package/apache-icons
80 $(call Package/apache/Default)
81 TITLE:=Icons from Apache
85 define Package/apache-icons/description
86 $(call Package/apache/Default/description)
88 This package contains the icons from Apache.
91 TARGET_CFLAGS += $(FPIC)
92 TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
94 define Build/Configure
95 $(call Build/Configure/Default, \
96 --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
97 --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
98 --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
102 --disable-disk-cache \
103 --enable-maintainer-mode \
104 --enable-mime-magic \
105 --without-suexec-bin \
106 --sysconfdir=/etc/apache \
107 ap_cv_void_ptr_lt_long=no \
108 logfiledir="/var/log" \
109 runtimedir="/var/run" \
113 define Build/InstallDev
114 rm -rf $(PKG_INSTALL_DIR)/usr/man/ \
115 $(PKG_INSTALL_DIR)/usr/share/manual/
116 # if you need docs take a look into the build-dir :)
117 $(INSTALL_DIR) $(1)/etc
118 $(CP) $(PKG_INSTALL_DIR)/etc/* \
120 $(INSTALL_DIR) $(1)/usr/include/apache
121 $(CP) $(PKG_INSTALL_DIR)/usr/include/* \
122 $(1)/usr/include/apache
123 $(INSTALL_DIR) $(1)/usr/lib
124 $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp \
126 $(INSTALL_DIR) $(1)/usr/sbin
127 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* \
129 $(INSTALL_DIR) $(1)/usr/share
130 $(CP) $(PKG_INSTALL_DIR)/usr/share/* \
134 define Package/apache/preinst
136 echo -e "You should take a look in the initscripts, busybox's httpd
\n\
137 uses some parameters which are maybe unsupported by apache.
"
140 define Package/apache/install
141 $(INSTALL_DIR) $(1)/usr/sbin
142 # we don't need apxs on the router, it's just for building apache modules.
143 $(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/
144 $(INSTALL_DIR) $(1)/usr/lib
145 $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp $(1)/usr/lib/
146 $(INSTALL_DIR) $(1)/usr/share
147 $(CP) $(PKG_INSTALL_DIR)/usr/share/{error,htdocs,cgi-bin,build} $(1)/usr/share/
148 $(INSTALL_DIR) $(1)/etc/apache
149 $(CP) $(PKG_INSTALL_DIR)/etc/apache/{httpd.conf,magic,mime.types,extra} $(1)/etc/apache/
152 define Package/apache/postrm
153 rm -rf /usr/sbin/httpd
154 ln -s /bin/busybox /usr/sbin/httpd
155 echo -e "You may need to change your initscripts back for the use
\n\
156 with busybox
's httpd."
159 define Package/apache-icons/install
160 $(INSTALL_DIR) $(1)/usr/share
161 $(CP) $(PKG_INSTALL_DIR)/usr/share/icons $(1)/usr/share/
164 $(eval $(call BuildPackage,apache))
165 $(eval $(call BuildPackage,apache-icons))