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 PKG_MD5SUM
:=d050a49bd7532ec21c6bb593b3473a5d
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_SOURCE_NAME
)-$(PKG_VERSION
)
22 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/apache
/Default
29 DEPENDS
:=+apr
+apr-util
+zlib
+libexpat
+libpcre
+libopenssl
+libsqlite3
30 TITLE
:=The Apache Web Server
31 URL
:=http
://httpd.apache.org
/
35 define Package
/apache-server
36 $(call Package
/apache
/Default
)
37 TITLE
:=The apache server
& and some tools
39 Take care that you don
't include apache at the moment into your image\\\
40 please select it only as module because busybox will override\\\
41 /usr/sbin/httpd. It'll be solved soon. If you need to
include this
\\\
42 package in the image anyway
, remove httpd from busybox
\\\
43 (Base system
--> Configuration
--> Networking Utilities
--> httpd
).
\\\
44 Also you should take care for the initscripts
, apache
's httpd isn't
\\\
45 compatible with the one from busybox
, so if you want to use apache
\\\
46 for running your webif
, you
'll need to change the parameters in the\\\
47 scripts and configure the rest in /etc/httpd.conf.
50 define Package/apache-server/conffiles
51 /etc/apache/httpd.conf
52 /etc/apache/extra/httpd-autoindex.conf
53 /etc/apache/extra/httpd-dav.conf
54 /etc/apache/extra/httpd-default.conf
55 /etc/apache/extra/httpd-info.conf
56 /etc/apache/extra/httpd-languages.conf
57 /etc/apache/extra/httpd-manual.conf
58 /etc/apache/extra/httpd-mpm.conf
59 /etc/apache/extra/httpd-multilang-errordoc.conf
60 /etc/apache/extra/httpd-ssl.conf
61 /etc/apache/extra/httpd-userdir.conf
62 /etc/apache/extra/httpd-vhosts.conf
64 /etc/apache/mime.types
67 define Package/apache-icons
68 $(call Package/apache/Default)
69 TITLE:=Icons from Apache
73 define Build/Configure
74 $(call Build/Configure/Default, \
75 --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
76 --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
77 --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
81 --disable-disk-cache \
82 --enable-maintainer-mode \
84 --without-suexec-bin \
85 --sysconfdir=/etc/apache \
86 ap_void_ptr_lt_long=no \
87 logfiledir="/var/log" \
92 $(MAKE) -C $(PKG_BUILD_DIR) \
93 DESTDIR="$(PKG_INSTALL_DIR)" \
97 define Build/InstallDev
98 rm -rf $(PKG_INSTALL_DIR)/usr/man/ \
99 $(PKG_INSTALL_DIR)/usr/share/manual/
100 # if you need docs take a look into the build-dir :)
101 mkdir -p $(STAGING_DIR)/etc
102 $(CP) $(PKG_INSTALL_DIR)/etc/* \
104 mkdir -p $(STAGING_DIR)/usr/include
105 $(CP) $(PKG_INSTALL_DIR)/usr/include/* \
106 $(STAGING_DIR)/usr/include
107 mkdir -p $(STAGING_DIR)/usr/lib
108 $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp \
109 $(STAGING_DIR)/usr/lib
110 mkdir -p $(STAGING_DIR)/usr/sbin
111 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* \
112 $(STAGING_DIR)/usr/sbin
113 mkdir -p $(STAGING_DIR)/usr/share
114 $(CP) $(PKG_INSTALL_DIR)/usr/share/* \
115 $(STAGING_DIR)/usr/share
118 define Build/UninstallDev
119 rm -rf $(STAGING_DIR)/usr/include/{ap_*,http*,mod_*,mpm*,os.h,scoreboard.h,unixd.h,util_*} \
120 $(STAGING_DIR)/etc/{httpd.conf,magic,mime.types,extra,original} \
121 $(STAGING_DIR)/usr/sbin/{ab,apachectl,apxs,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} \
122 $(STAGING_DIR)/usr/share/{error,icons,htdocs,cgi-bin,build} \
123 $(STAGING_DIR)/usr/lib/httpd.exp
126 define Package/apache-server/preinst
128 echo -e "You should take a look in the initscripts, busybox's httpd
\n\
129 uses some parameters which are maybe unsupported by apache.
"
132 define Package/apache-server/install
133 $(INSTALL_DIR) $(1)/usr/sbin
134 # we don't need apxs on the router, it's just for building apache modules.
135 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{ab,apachectl,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} $(1)/usr/sbin/
136 $(INSTALL_DIR) $(1)/usr/lib
137 $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp $(1)/usr/lib/
138 $(INSTALL_DIR) $(1)/usr/share
139 $(CP) $(PKG_INSTALL_DIR)/usr/share/{error,htdocs,cgi-bin,build} $(1)/usr/share/
140 $(INSTALL_DIR) $(1)/etc/apache
141 $(CP) $(PKG_INSTALL_DIR)/etc/apache/{magic,mime.types,extra} $(1)/etc/apache/
142 $(CP) ./files/etc/apache/httpd.conf $(1)/etc/apache/
145 define Package/apache-server/postrm
146 rm -rf /usr/sbin/httpd
147 ln -s /bin/busybox /usr/sbin/httpd
148 echo -e "You may need to change your initscripts back for the use
\n\
149 with busybox
's httpd."
152 define Package/apache-icons/install
153 $(INSTALL_DIR) $(1)/usr/share
154 $(CP) $(PKG_INSTALL_DIR)/usr/share/icons $(1)/usr/share/
157 $(eval $(call BuildPackage,apache-server))
158 $(eval $(call BuildPackage,apache-icons))