ソースを参照

apache: import from oldpackages, add myself as maintainer, add license

information, update source-url update to v2.2.27

Signed-off-by: Thomas Heil <heil@terminal-consulting.de>
Thomas Heil 10 年 前
コミット
08379648ee

+ 166
- 0
net/apache/Makefile ファイルの表示

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

+ 14
- 0
net/apache/patches/001-Makefile_in.patch ファイルの表示

@@ -0,0 +1,14 @@
1
+--- a/server/Makefile.in
2
++++ b/server/Makefile.in
3
+@@ -26,7 +26,10 @@ gen_test_char: $(gen_test_char_OBJECTS)
4
+ 	$(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
5
+ 
6
+ test_char.h: gen_test_char
7
+-	./gen_test_char > test_char.h
8
++	true
9
++#	./gen_test_char > test_char.h
10
++#	doesn't matter if you run it on the buildhost or on an wl500gd,
11
++#	same output on both, so i just patched in the test_char.h :).
12
+ 
13
+ util.lo: test_char.h
14
+ 

+ 26
- 0
net/apache/patches/002-test_char_h.patch ファイルの表示

@@ -0,0 +1,26 @@
1
+--- /dev/null
2
++++ b/server/test_char.h
3
+@@ -0,0 +1,23 @@
4
++/* this file is automatically generated by gen_test_char, do not edit */
5
++#define T_ESCAPE_SHELL_CMD     (1)
6
++#define T_ESCAPE_PATH_SEGMENT  (2)
7
++#define T_OS_ESCAPE_PATH       (4)
8
++#define T_HTTP_TOKEN_STOP      (8)
9
++#define T_ESCAPE_LOGITEM       (16)
10
++#define T_ESCAPE_FORENSIC      (32)
11
++
12
++static const unsigned char test_char_table[256] = {
13
++    32,62,62,62,62,62,62,62,62,62,63,62,62,62,62,62,62,62,62,62,
14
++    62,62,62,62,62,62,62,62,62,62,62,62,14,0,23,6,1,38,1,1,
15
++    9,9,1,0,8,0,0,10,0,0,0,0,0,0,0,0,0,0,40,15,
16
++    15,8,15,15,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
17
++    0,0,0,0,0,0,0,0,0,0,0,15,31,15,7,0,7,0,0,0,
18
++    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
19
++    0,0,0,15,39,15,1,62,54,54,54,54,54,54,54,54,54,54,54,54,
20
++    54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
21
++    54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
22
++    54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
23
++    54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
24
++    54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,
25
++    54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54
26
++};

+ 33
- 0
net/apache/patches/003-logdir_fix.patch ファイルの表示

@@ -0,0 +1,33 @@
1
+--- a/build/mkconfNW.awk
2
++++ b/build/mkconfNW.awk
3
+@@ -24,7 +24,7 @@ BEGIN {
4
+     A["sysconfdir"] = "conf"
5
+     A["iconsdir"] = "icons"
6
+     A["manualdir"] = "manual"
7
+-    A["runtimedir"] = "logs"
8
++    A["runtimedir"] = "log"
9
+     A["errordir"] = "error"
10
+     A["proxycachedir"] = "proxy"
11
+ 
12
+--- a/config.layout
13
++++ b/config.layout
14
+@@ -28,8 +28,8 @@
15
+     cgidir:        ${datadir}/cgi-bin
16
+     includedir:    ${prefix}/include
17
+     localstatedir: ${prefix}
18
+-    runtimedir:    ${localstatedir}/logs
19
+-    logfiledir:    ${localstatedir}/logs
20
++    runtimedir:    ${localstatedir}/log
21
++    logfiledir:    ${localstatedir}/log
22
+     proxycachedir: ${localstatedir}/proxy
23
+ </Layout>
24
+ 
25
+@@ -150,7 +150,7 @@
26
+     includedir:    ${prefix}/include
27
+     localstatedir: /var${prefix}
28
+     runtimedir:    ${localstatedir}/run
29
+-    logfiledir:    ${localstatedir}/logs
30
++    logfiledir:    ${localstatedir}/log
31
+     proxycachedir: ${localstatedir}/proxy
32
+ </Layout>
33
+ 

+ 11
- 0
net/apache/patches/004-pidfile_fix.patch ファイルの表示

@@ -0,0 +1,11 @@
1
+--- a/include/scoreboard.h
2
++++ b/include/scoreboard.h
3
+@@ -42,7 +42,7 @@ extern "C" {
4
+ 
5
+ /* Scoreboard file, if there is one */
6
+ #ifndef DEFAULT_SCOREBOARD
7
+-#define DEFAULT_SCOREBOARD "logs/apache_runtime_status"
8
++#define DEFAULT_SCOREBOARD "log/apache_runtime_status"
9
+ #endif
10
+ 
11
+ /* Scoreboard info on a process is, for now, kept very brief --- 

+ 60
- 0
net/apache/patches/005-httpd_conf.patch ファイルの表示

@@ -0,0 +1,60 @@
1
+--- a/docs/conf/httpd.conf.in
2
++++ b/docs/conf/httpd.conf.in
3
+@@ -51,7 +51,6 @@ Listen @@Port@@
4
+ # Example:
5
+ # LoadModule foo_module modules/mod_foo.so
6
+ #
7
+-@@LoadModule@@
8
+ 
9
+ <IfModule !mpm_netware_module>
10
+ <IfModule !mpm_winnt_module>
11
+@@ -63,8 +62,8 @@ Listen @@Port@@
12
+ # It is usually good practice to create a dedicated user and group for
13
+ # running httpd, as with most system services.
14
+ #
15
+-User daemon
16
+-Group daemon
17
++User nobody
18
++Group nogroup
19
+ 
20
+ </IfModule>
21
+ </IfModule>
22
+@@ -191,7 +190,7 @@ ErrorLog "@rel_logfiledir@/error_log"
23
+ # Possible values include: debug, info, notice, warn, error, crit,
24
+ # alert, emerg.
25
+ #
26
+-LogLevel warn
27
++LogLevel debug
28
+ 
29
+ <IfModule log_config_module>
30
+     #
31
+@@ -336,7 +335,7 @@ DefaultType text/plain
32
+ # contents of the file itself to determine its type.  The MIMEMagicFile
33
+ # directive tells the module where the hint definitions are located.
34
+ #
35
+-#MIMEMagicFile @rel_sysconfdir@/magic
36
++MIMEMagicFile @rel_sysconfdir@/magic
37
+ 
38
+ #
39
+ # Customizable error responses come in three flavors:
40
+@@ -358,7 +357,7 @@ DefaultType text/plain
41
+ # broken on your system.
42
+ #
43
+ #EnableMMAP off
44
+-#EnableSendfile off
45
++EnableSendfile off
46
+ 
47
+ # Supplemental configuration
48
+ #
49
+@@ -404,7 +403,7 @@ DefaultType text/plain
50
+ #       starting without SSL on platforms with no /dev/random equivalent
51
+ #       but a statically compiled-in mod_ssl.
52
+ #
53
+-<IfModule ssl_module>
54
+-SSLRandomSeed startup builtin
55
+-SSLRandomSeed connect builtin
56
+-</IfModule>
57
++#<IfModule ssl_module>
58
++#SSLRandomSeed startup builtin
59
++#SSLRandomSeed connect builtin
60
++#</IfModule>