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
:=3add41e0b924d4bb53c2dee55a38c09e
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-icons
51 $(call Package/apache/Default)
52 TITLE:=Icons from Apache
56 define Build/Configure
57 $(call Build/Configure/Default, \
58 --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
59 --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
60 --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
63 --disable-disk-cache \
64 --enable-maintainer-mode \
66 --without-suexec-bin \
67 ap_void_ptr_lt_long=no \
68 logfiledir="/var/log" \
73 $(MAKE) -C $(PKG_BUILD_DIR) \
74 DESTDIR="$(PKG_INSTALL_DIR)" \
78 define Build/InstallDev
79 rm -rf $(PKG_INSTALL_DIR)/usr/man/ \
80 $(PKG_INSTALL_DIR)/usr/share/manual/
81 # if you need docs take a look into the build-dir :)
82 mkdir -p $(STAGING_DIR)/etc
83 $(CP) $(PKG_INSTALL_DIR)/etc/* \
85 mkdir -p $(STAGING_DIR)/usr/include
86 $(CP) $(PKG_INSTALL_DIR)/usr/include/* \
87 $(STAGING_DIR)/usr/include
88 mkdir -p $(STAGING_DIR)/usr/lib
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp \
90 $(STAGING_DIR)/usr/lib
91 mkdir -p $(STAGING_DIR)/usr/sbin
92 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* \
93 $(STAGING_DIR)/usr/sbin
94 mkdir -p $(STAGING_DIR)/usr/share
95 $(CP) $(PKG_INSTALL_DIR)/usr/share/* \
96 $(STAGING_DIR)/usr/share
99 define Build/UninstallDev
100 rm -rf $(STAGING_DIR)/usr/include/{ap_*,http*,mod_*,mpm*,os.h,scoreboard.h,unixd.h,util_*} \
101 $(STAGING_DIR)/etc/{httpd.conf,magic,mime.types,extra,original} \
102 $(STAGING_DIR)/usr/sbin/{ab,apachectl,apxs,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} \
103 $(STAGING_DIR)/usr/share/{error,icons,htdocs,cgi-bin,build} \
104 $(STAGING_DIR)/usr/lib/httpd.exp
107 define Package/apache-server/preinst
109 echo -e "You should take a look in the initscripts, busybox's httpd
\n\
110 uses some parameters which are maybe unsupported by apache.
"
113 define Package/apache-server/install
114 $(INSTALL_DIR) $(1)/usr/sbin
115 # we don't need apxs on the router, it's just for building apache modules.
116 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{ab,apachectl,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} $(1)/usr/sbin/
117 $(INSTALL_DIR) $(1)/usr/lib
118 $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp $(1)/usr/lib/
119 $(INSTALL_DIR) $(1)/usr/share
120 $(CP) $(PKG_INSTALL_DIR)/usr/share/{error,htdocs,cgi-bin,build} $(1)/usr/share/
121 $(INSTALL_DIR) $(1)/etc
122 $(CP) $(PKG_INSTALL_DIR)/etc/{magic,mime.types,extra} $(1)/etc/
123 $(CP) ./files/etc/httpd.conf $(1)/etc/
126 define Package/apache-server/postrm
127 rm -rf /usr/sbin/httpd
128 ln -s /bin/busybox /usr/sbin/httpd
129 echo -e "You may need to change your initscripts back for the use
\n\
130 with busybox
's httpd."
133 define Package/apache-icons/install
134 $(INSTALL_DIR) $(1)/usr/share
135 $(CP) $(PKG_INSTALL_DIR)/usr/share/icons $(1)/usr/share/
138 $(eval $(call BuildPackage,apache-server))
139 $(eval $(call BuildPackage,apache-icons))