[packages] Use default templates instead of custom reimplementations where applicable
[openwrt/svn-archive/archive.git] / libs / fcgi / Makefile
index 61400225f0d5940d2df9352210994bd7afaca5d3..dbf0213f8e54ecca7a2b0bec63bc63429b606ffe 100644 (file)
@@ -4,7 +4,6 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
@@ -16,47 +15,49 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.fastcgi.com/dist/
 PKG_MD5SUM:=d15060a813b91383a9f3c66faf84867e
 
+PKG_FIXUP:=libtool-ucxx
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/fcgi
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Shared library of FastCGI
-  DESCRIPTION:=\
-       FastCGI is a language independent, scalable, open extension to \\\
-       CGI that provides high performance without the limitations of \\\
-       server specific APIs.
+  DEPENDS:=+uclibcxx
   URL:=http://www.fastcgi.com/
 endef
 
+define Package/fcgi/description
+ FastCGI is a language independent, scalable, open extension to 
+ CGI that provides high performance without the limitations of 
+ server specific APIs.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
 CONFIGURE_ARGS += \
        --enable-shared \
-       --enable-static
+       --enable-static \
 
-MAKE_FLAGS += \
-       CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \
-       DESTDIR="$(PKG_INSTALL_DIR)" \
-       LDFLAGS="$(LDFLAGS) -lm" \
-       all install
+CONFIGURE_VARS += \
+       CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClic++" \
+       CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
+       LIBS="-nodefaultlibs -luClibc++ -lm" \
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(STAGING_DIR)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(STAGING_DIR)/usr/include/
-       $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.{a,so*} $(STAGING_DIR)/usr/lib/
-endef
-
-define Build/UninstallDev
-       rm -rf \
-               $(STAGING_DIR)/usr/include/f*cgi*.h \
-               $(STAGING_DIR)/usr/lib/libfcgi.{a,so*}
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/fastcgi.h $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/fcgi{app,_config,misc,o,os,_stdio}.h $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.{a,so*} $(1)/usr/lib/
 endef
 
 define Package/fcgi/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.so* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgi-fcgi $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.so.* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,fcgi))