df15ad599a73aa6755f9317ac756ed93e4ea381a
[openwrt/svn-archive/archive.git] / libs / fcgi / Makefile
1 #
2 # Copyright (C) 2007 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:=fcgi
11 PKG_VERSION:=2.4.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.fastcgi.com/dist/
16 PKG_MD5SUM:=d15060a813b91383a9f3c66faf84867e
17
18 PKG_FIXUP:=libtool-ucxx
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/fcgi
23 SECTION:=libs
24 CATEGORY:=Libraries
25 TITLE:=Shared library of FastCGI
26 DEPENDS:=+uclibcxx
27 URL:=http://www.fastcgi.com/
28 endef
29
30 define Package/fcgi/description
31 FastCGI is a language independent, scalable, open extension to
32 CGI that provides high performance without the limitations of
33 server specific APIs.
34 endef
35
36 TARGET_CFLAGS += $(FPIC)
37
38 CONFIGURE_ARGS += \
39 --enable-shared \
40 --enable-static \
41
42 CONFIGURE_VARS += \
43 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClic++" \
44 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
45 LIBS="-nodefaultlibs -luClibc++ -lm" \
46
47 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
49 endef
50
51 define Build/InstallDev
52 $(INSTALL_DIR) $(1)/usr/include
53 $(CP) $(PKG_INSTALL_DIR)/usr/include/fastcgi.h $(1)/usr/include/
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/fcgi{app,_config,misc,o,os,_stdio}.h $(1)/usr/include/
55 $(INSTALL_DIR) $(1)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.{a,so*} $(1)/usr/lib/
57 endef
58
59 define Package/fcgi/install
60 $(INSTALL_DIR) $(1)/usr/bin
61 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgi-fcgi $(1)/usr/bin/
62 $(INSTALL_DIR) $(1)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.so.* $(1)/usr/lib/
64 endef
65
66 $(eval $(call BuildPackage,fcgi))