[package] fcgi: fix fcgi++ build and put it in a separate package
[openwrt/svn-archive/archive.git] / libs / fcgi / Makefile
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:=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 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/fcgi/Default
25 SECTION:=libs
26 CATEGORY:=Libraries
27 URL:=http://www.fastcgi.com/
28 endef
29
30 define Package/fcgi
31 $(call Package/fcgi/Default)
32 MENU:=1
33 DEPENDS:= +libpthread
34 TITLE:=Shared library of FastCGI
35 endef
36
37 define Package/fcgixx
38 $(call Package/fcgi/Default)
39 DEPENDS:=fcgi +USE_UCLIBC:uclibcxx
40 TITLE:=Shared library of FastCGI++
41 endef
42
43 define Package/fcgi/description
44 FastCGI is a language independent, scalable, open extension to
45 CGI that provides high performance without the limitations of
46 server specific APIs.
47 endef
48
49 TARGET_CFLAGS += $(FPIC)
50
51 CONFIGURE_ARGS += \
52 --enable-shared \
53 --enable-static \
54
55 CONFIGURE_VARS += \
56 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
57 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
58 LIBS="-nodefaultlibs -luClibc++ -lm" \
59
60 define Build/InstallDev
61 $(INSTALL_DIR) $(1)/usr/include
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/fastcgi.h $(1)/usr/include/
63 $(CP) $(PKG_INSTALL_DIR)/usr/include/fcgi{app,_config,misc,o,os,_stdio}.h $(1)/usr/include/
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi{,++}.{a,so*} $(1)/usr/lib/
66 endef
67
68 define Package/fcgi/install
69 $(INSTALL_DIR) $(1)/usr/bin
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgi-fcgi $(1)/usr/bin/
71 $(INSTALL_DIR) $(1)/usr/lib
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.so.* $(1)/usr/lib/
73 endef
74
75 define Package/fcgixx/install
76 $(INSTALL_DIR) $(1)/usr/lib
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi++.so.* $(1)/usr/lib/
78 endef
79
80 $(eval $(call BuildPackage,fcgi))
81 $(eval $(call BuildPackage,fcgixx))