999b85dd70c0d01a361981499847e1bc0e31c22a
[openwrt/svn-archive/archive.git] / net / apache / Makefile
1 #
2 # Copyright (C) 2007-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=apache
11 PKG_VERSION:=2.2.15
12 PKG_RELEASE:=2
13 PKG_SOURCE_NAME:=httpd
14
15 PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://ftp.uni-erlangen.de/pub/mirrors/apache/httpd/ \
17 http://apache.imsam.info/httpd/
18 PKG_MD5SUM:=016cec97337eccead2aad6a7c27f2e14
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
21
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/apache/Default
27 SECTION:=net
28 CATEGORY:=Network
29 SUBMENU:=Web Servers/Proxies
30 TITLE:=The Apache Web Server
31 URL:=http://httpd.apache.org/
32 endef
33
34 define Package/apache/Default/description
35 The Apache Web Server is a powerful and flexible HTTP/1.1 compliant
36 web server. Originally designed as a replacement for the NCSA HTTP
37 Server, it has grown to be the most popular web server on the Internet.
38 endef
39
40 define Package/apache
41 $(call Package/apache/Default)
42 DEPENDS:=+libapr +libaprutil +libpcre +libopenssl
43 endef
44
45 define Package/apache/description
46 $(call Package/apache/Default/description)
47 .
48 This package contains the Apache web server and utility programs.
49 .
50 Take care that you don't include apache at the moment into your image
51 please select it only as module because busybox will override
52 /usr/sbin/httpd. It'll be solved soon. If you need to include this
53 package in the image anyway, remove httpd from busybox
54 (Base system --> Configuration --> Networking Utilities --> httpd).
55 Also you should take care for the initscripts, apache's httpd isn't
56 compatible with the one from busybox, so if you want to use apache
57 for running your webif, you'll need to change the parameters in the
58 scripts and configure the rest in /etc/httpd.conf.
59 endef
60
61 define Package/apache/conffiles
62 /etc/apache/httpd.conf
63 /etc/apache/extra/httpd-autoindex.conf
64 /etc/apache/extra/httpd-dav.conf
65 /etc/apache/extra/httpd-default.conf
66 /etc/apache/extra/httpd-info.conf
67 /etc/apache/extra/httpd-languages.conf
68 /etc/apache/extra/httpd-manual.conf
69 /etc/apache/extra/httpd-mpm.conf
70 /etc/apache/extra/httpd-multilang-errordoc.conf
71 /etc/apache/extra/httpd-ssl.conf
72 /etc/apache/extra/httpd-userdir.conf
73 /etc/apache/extra/httpd-vhosts.conf
74 /etc/apache/magic
75 /etc/apache/mime.types
76 endef
77
78 define Package/apache-icons
79 $(call Package/apache/Default)
80 TITLE:=Icons from Apache
81 DEPENDS:=apache
82 endef
83
84 define Package/apache-icons/description
85 $(call Package/apache/Default/description)
86 .
87 This package contains the icons from Apache.
88 endef
89
90 define Build/Configure
91 $(call Build/Configure/Default, \
92 --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
93 --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
94 --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
95 --enable-http \
96 --enable-ssl \
97 --enable-proxy \
98 --disable-disk-cache \
99 --enable-maintainer-mode \
100 --enable-mime-magic \
101 --without-suexec-bin \
102 --sysconfdir=/etc/apache \
103 ap_cv_void_ptr_lt_long=no \
104 logfiledir="/var/log" \
105 )
106 endef
107
108 define Build/InstallDev
109 rm -rf $(PKG_INSTALL_DIR)/usr/man/ \
110 $(PKG_INSTALL_DIR)/usr/share/manual/
111 # if you need docs take a look into the build-dir :)
112 $(INSTALL_DIR) $(1)/etc
113 $(CP) $(PKG_INSTALL_DIR)/etc/* \
114 $(1)/etc
115 $(INSTALL_DIR) $(1)/usr/include/apache
116 $(CP) $(PKG_INSTALL_DIR)/usr/include/* \
117 $(1)/usr/include/apache
118 $(INSTALL_DIR) $(1)/usr/lib
119 $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp \
120 $(1)/usr/lib
121 $(INSTALL_DIR) $(1)/usr/sbin
122 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* \
123 $(1)/usr/sbin
124 $(INSTALL_DIR) $(1)/usr/share
125 $(CP) $(PKG_INSTALL_DIR)/usr/share/* \
126 $(1)/usr/share
127 endef
128
129 define Package/apache/preinst
130 rm /usr/sbin/httpd
131 echo -e "You should take a look in the initscripts, busybox's httpd \n\
132 uses some parameters which are maybe unsupported by apache."
133 endef
134
135 define Package/apache/install
136 $(INSTALL_DIR) $(1)/usr/sbin
137 # we don't need apxs on the router, it's just for building apache modules.
138 $(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/
139 $(INSTALL_DIR) $(1)/usr/lib
140 $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp $(1)/usr/lib/
141 $(INSTALL_DIR) $(1)/usr/share
142 $(CP) $(PKG_INSTALL_DIR)/usr/share/{error,htdocs,cgi-bin,build} $(1)/usr/share/
143 $(INSTALL_DIR) $(1)/etc/apache
144 $(CP) $(PKG_INSTALL_DIR)/etc/apache/{httpd.conf,magic,mime.types,extra} $(1)/etc/apache/
145 endef
146
147 define Package/apache/postrm
148 rm -rf /usr/sbin/httpd
149 ln -s /bin/busybox /usr/sbin/httpd
150 echo -e "You may need to change your initscripts back for the use \n\
151 with busybox's httpd."
152 endef
153
154 define Package/apache-icons/install
155 $(INSTALL_DIR) $(1)/usr/share
156 $(CP) $(PKG_INSTALL_DIR)/usr/share/icons $(1)/usr/share/
157 endef
158
159 $(eval $(call BuildPackage,apache))
160 $(eval $(call BuildPackage,apache-icons))