2 # Copyright (C) 2007 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.gz
17 PKG_SOURCE_URL
:=http
://ftp.uni-erlangen.de
/pub
/mirrors
/apache
/httpd
/ \
18 http
://apache.imsam.
info/httpd
/
19 PKG_MD5SUM
:=d050a49bd7532ec21c6bb593b3473a5d
22 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_SOURCE_NAME
)-$(PKG_VERSION
)
23 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/apache
/Default
31 TITLE
:=The Apache Web Server
32 URL
:=http
://httpd.apache.org
/
36 $(call Package
/apache
/Default
)
38 DEPENDS
:=+apr
+apr-util
+zlib
+libexpat
+libpcre
+libopenssl
+libsqlite3
41 define Package
/apache-server
42 $(call Package
/apache
/Default
)
43 TITLE
:=The apache server
& and some tools
46 Take care that you don
't include apache at the moment into your image\\\
47 please select it only as module because busybox will override\\\
48 /usr/sbin/httpd. It'll be solved soon. If you need to
include this
\\\
49 package in the image anyway
, remove httpd from busybox
\\\
50 (Base system
--> Configuration
--> Networking Utilities
--> httpd
).
\\\
51 Also you should take care for the initscripts
, apache
's httpd isn't
\\\
52 compatible with the one from busybox
, so if you want to use apache
\\\
53 for running your webif
, you
'll need to change the parameters in the\\\
54 scripts and configure the rest in /etc/httpd.conf.
57 define Package/apache-server/conffiles
58 /etc/apache/httpd.conf
59 /etc/apache/extra/httpd-autoindex.conf
60 /etc/apache/extra/httpd-dav.conf
61 /etc/apache/extra/httpd-default.conf
62 /etc/apache/extra/httpd-info.conf
63 /etc/apache/extra/httpd-languages.conf
64 /etc/apache/extra/httpd-manual.conf
65 /etc/apache/extra/httpd-mpm.conf
66 /etc/apache/extra/httpd-multilang-errordoc.conf
67 /etc/apache/extra/httpd-ssl.conf
68 /etc/apache/extra/httpd-userdir.conf
69 /etc/apache/extra/httpd-vhosts.conf
71 /etc/apache/mime.types
74 define Package/apache-icons
75 $(call Package/apache/Default)
76 TITLE:=Icons from Apache
80 define Build/Configure
81 $(call Build/Configure/Default, \
82 --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
83 --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
84 --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
88 --disable-disk-cache \
89 --enable-maintainer-mode \
91 --without-suexec-bin \
92 --sysconfdir=/etc/apache \
93 ap_void_ptr_lt_long=no \
94 logfiledir="/var/log" \
99 $(MAKE) -C $(PKG_BUILD_DIR) \
100 DESTDIR="$(PKG_INSTALL_DIR)" \
104 define Build/InstallDev
105 rm -rf $(PKG_INSTALL_DIR)/usr/man/ \
106 $(PKG_INSTALL_DIR)/usr/share/manual/
107 # if you need docs take a look into the build-dir :)
108 mkdir -p $(STAGING_DIR)/etc
109 $(CP) $(PKG_INSTALL_DIR)/etc/* \
111 mkdir -p $(STAGING_DIR)/usr/include
112 $(CP) $(PKG_INSTALL_DIR)/usr/include/* \
113 $(STAGING_DIR)/usr/include
114 mkdir -p $(STAGING_DIR)/usr/lib
115 $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp \
116 $(STAGING_DIR)/usr/lib
117 mkdir -p $(STAGING_DIR)/usr/sbin
118 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* \
119 $(STAGING_DIR)/usr/sbin
120 mkdir -p $(STAGING_DIR)/usr/share
121 $(CP) $(PKG_INSTALL_DIR)/usr/share/* \
122 $(STAGING_DIR)/usr/share
125 define Build/UninstallDev
126 rm -rf $(STAGING_DIR)/usr/include/{ap_*,http*,mod_*,mpm*,os.h,scoreboard.h,unixd.h,util_*} \
127 $(STAGING_DIR)/etc/{httpd.conf,magic,mime.types,extra,original} \
128 $(STAGING_DIR)/usr/sbin/{ab,apachectl,apxs,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} \
129 $(STAGING_DIR)/usr/share/{error,icons,htdocs,cgi-bin,build} \
130 $(STAGING_DIR)/usr/lib/httpd.exp
133 define Package/apache-server/preinst
135 echo -e "You should take a look in the initscripts, busybox's httpd
\n\
136 uses some parameters which are maybe unsupported by apache.
"
139 define Package/apache-server/install
140 $(INSTALL_DIR) $(1)/usr/sbin
141 # we don't need apxs on the router, it's just for building apache modules.
142 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{ab,apachectl,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} $(1)/usr/sbin/
143 $(INSTALL_DIR) $(1)/usr/lib
144 $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp $(1)/usr/lib/
145 $(INSTALL_DIR) $(1)/usr/share
146 $(CP) $(PKG_INSTALL_DIR)/usr/share/{error,htdocs,cgi-bin,build} $(1)/usr/share/
147 $(INSTALL_DIR) $(1)/etc/apache
148 $(CP) $(PKG_INSTALL_DIR)/etc/apache/{magic,mime.types,extra} $(1)/etc/apache/
149 $(CP) ./files/etc/apache/httpd.conf $(1)/etc/apache/
152 define Package/apache-server/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-server))
166 $(eval $(call BuildPackage,apache-icons))