Forum Turris
Fórum Turris Nápověda

Milí majitelé routerů Turris,

toto fórum bylo 9. 12. 2016 zmrazeno a nahrazeno naším novým Turris fórem. Ještě chvíli bude dostupné k prohlížení, ale již zde není možné přispívat. Více informací naleznete v oznámení o uzavření fóra.


Dear Turris routers users,

this forum has been frozen on Dec 9th, 2016 and replaced by our new Turris forum. It will be read-only accessible for some time after. For more information, read the announcement about closing the forum.

Nahoru Téma Majitelé routerů / Technická podpora / Kompilace Apache
- - Od WeeHool Dne 2015-11-01 15:03
Zdravíčko..
Snažím se zkompilovat Apache dle návodu https://www.turris.cz/forum/topic_show.pl?tid=366
Makefile mám tohle

#
# Copyright (C) 2007-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=apache
PKG_VERSION:=2.2.15
PKG_RELEASE:=3
PKG_SOURCE_NAME:=httpd

PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://ftp.uni-erlangen.de/pub/mirrors/apache/httpd/ \
    http://apache.imsam.info/httpd/
PKG_MD5SUM:=016cec97337eccead2aad6a7c27f2e14

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)

PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/apache/Default
  SECTION:=net
  CATEGORY:=Network
  SUBMENU:=Web Servers/Proxies
  TITLE:=The Apache Web Server
  URL:=http://httpd.apache.org/
endef

define Package/apache/Default/description
The Apache Web Server is a powerful and flexible HTTP/1.1 compliant
web server.  Originally designed as a replacement for the NCSA HTTP
Server, it has grown to be the most popular web server on the Internet.
endef

define Package/apache
$(call Package/apache/Default)
  DEPENDS:=+libapr +libaprutil +libpcre +libopenssl +unixodbc
endef

define Package/apache/description
$(call Package/apache/Default/description)
.
This package contains the Apache web server and utility programs.
.
Take care that you don't include apache at the moment into your image
please select it only as module because busybox will override
/usr/sbin/httpd. It'll be solved soon. If you need to include this
package in the image anyway, remove httpd from busybox
(Base system --> Configuration --> Networking Utilities --> httpd).
Also you should take care for the initscripts, apache's httpd isn't
compatible with the one from busybox, so if you want to use apache
for running your webif, you'll need to change the parameters in the
scripts and configure the rest in /etc/httpd.conf.
endef

define Package/apache/conffiles
/etc/apache/httpd.conf
/etc/apache/extra/httpd-autoindex.conf
/etc/apache/extra/httpd-dav.conf
/etc/apache/extra/httpd-default.conf
/etc/apache/extra/httpd-info.conf
/etc/apache/extra/httpd-languages.conf
/etc/apache/extra/httpd-manual.conf
/etc/apache/extra/httpd-mpm.conf
/etc/apache/extra/httpd-multilang-errordoc.conf
/etc/apache/extra/httpd-ssl.conf
/etc/apache/extra/httpd-userdir.conf
/etc/apache/extra/httpd-vhosts.conf
/etc/apache/magic
/etc/apache/mime.types
endef

define Package/apache-icons
$(call Package/apache/Default)
  TITLE:=Icons from Apache
  DEPENDS:=apache
endef

define Package/apache-icons/description
$(call Package/apache/Default/description)
.
This package contains the icons from Apache.
endef

TARGET_CFLAGS += $(FPIC)
TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE

define Build/Configure
  $(call Build/Configure/Default, \
    --with-included-apr \
    --with-included-apr-util \
    --with-included-pcre \
    --enable-http \
    --enable-ssl \
    --enable-proxy \
    --disable-disk-cache \
    --enable-maintainer-mode \
    --enable-mime-magic \
    --enable-so \
    --enable-module=rewrite \
    --without-suexec-bin \
    --sysconfdir=/etc/apache \
    ap_cv_void_ptr_lt_long=no \
    logfiledir="/var/log" \
    runtimedir="/var/run" \
  )
endef

define Build/InstallDev
  rm -rf  $(PKG_INSTALL_DIR)/usr/man/ \
    $(PKG_INSTALL_DIR)/usr/share/manual/
  # if you need docs take a look into the build-dir :)
  $(INSTALL_DIR) $(1)/etc
  $(CP)   $(PKG_INSTALL_DIR)/etc/* \
    $(1)/etc
  $(INSTALL_DIR) $(1)/usr/include/apache
  $(CP)  $(PKG_INSTALL_DIR)/usr/include/* \
    $(1)/usr/include/apache
  $(INSTALL_DIR) $(1)/usr/lib
  $(CP)   $(PKG_INSTALL_DIR)/usr/lib/httpd.exp \
    $(1)/usr/lib
  $(INSTALL_DIR) $(1)/usr/sbin
  $(CP)   $(PKG_INSTALL_DIR)/usr/sbin/* \
    $(1)/usr/sbin
  $(INSTALL_DIR) $(1)/usr/share
  $(CP)   $(PKG_INSTALL_DIR)/usr/share/* \
    $(1)/usr/share
endef

define Package/apache/preinst
  rm /usr/sbin/httpd
  echo -e "You should take a look in the initscripts, busybox's httpd \n\
  uses some parameters which are maybe unsupported by apache."
endef

define Package/apache/install
  $(INSTALL_DIR) $(1)/usr/sbin
  # we don't need apxs on the router, it's just for building apache modules.
  $(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/
  $(INSTALL_DIR) $(1)/usr/lib
  $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp $(1)/usr/lib/
  $(INSTALL_DIR) $(1)/usr/share
  $(CP) $(PKG_INSTALL_DIR)/usr/share/{error,htdocs,cgi-bin,build} $(1)/usr/share/
  $(INSTALL_DIR) $(1)/etc/apache
  $(CP) $(PKG_INSTALL_DIR)/etc/apache/{httpd.conf,magic,mime.types,extra} $(1)/etc/apache/
endef

define Package/apache/postrm
  rm -rf /usr/sbin/httpd
  ln -s /bin/busybox /usr/sbin/httpd
  echo -e "You may need to change your initscripts back for the use \n\
    with busybox's httpd."
endef

define Package/apache-icons/install
  $(INSTALL_DIR) $(1)/usr/share
  $(CP) $(PKG_INSTALL_DIR)/usr/share/icons $(1)/usr/share/
endef

$(eval $(call BuildPackage,apache))
$(eval $(call BuildPackage,apache-icons))

No a neudělá se to kvůli
checking whether TCP_NODELAY and TCP_CORK can both be enabled... configure: error: in `/home/weehool/turris/OpenWrt-SDK-mpc85xx-for-pc-x86_64-gcc-4.6-linaro_uClibc-0.9.33.2/build_dir/target-powerpc_8540_uClibc-0.9.33.2/httpd-2.2.15/srclib/apr':
configure: error: cannot run test program while cross compiling
configure failed for srclib/apr

Vůbec netuším, co s tím.

Pomůže mi někdo??
Předem děkuji za odpověď..
Nadřazený - - Od rene.kliment (>) Dne 2015-11-01 16:55
Sice odpověď mimo, ale nedá mi to se, i vzhledem k těm dvěma dalším topicům, nezeptat: Opravdu potřebujete Apache? Já například provozuji nginx spolu s PHP a bez problému (i když PHP cronem jednou za den restartuji, protože padá, ale to je jiná věc).
Nadřazený - Od WeeHool Dne 2015-11-01 17:06
no teď zkouším appweb, protože to má stejný configy.. ale nějak, nevím proč, mi tam nefaká php.. a nginx je moje další volba :-)
Nahoru Téma Majitelé routerů / Technická podpora / Kompilace Apache

Powered by mwForum 2.29.3 © 1999-2013 Markus Wichitill