fcgi: add fcgi package (#2090)
[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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=fcgi
12 PKG_VERSION:=2.4.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.fastcgi.com/dist/
17 PKG_MD5SUM:=d15060a813b91383a9f3c66faf84867e
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/fcgi
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=Shared library of FastCGI
25 DESCRIPTION:=\
26 FastCGI is a language independent, scalable, open extension to \\\
27 CGI that provides high performance without the limitations of \\\
28 server specific APIs.
29 URL:=http://www.fastcgi.com/
30 endef
31
32 CONFIGURE_ARGS += \
33 --enable-shared \
34 --enable-static
35
36 MAKE_FLAGS += \
37 CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \
38 DESTDIR="$(PKG_INSTALL_DIR)" \
39 LDFLAGS="$(LDFLAGS) -lm" \
40 all install
41
42 define Build/InstallDev
43 $(INSTALL_DIR) $(STAGING_DIR)/usr/include
44 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(STAGING_DIR)/usr/include/
45 $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
46 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.{a,so*} $(STAGING_DIR)/usr/lib/
47 endef
48
49 define Build/UninstallDev
50 rm -rf \
51 $(STAGING_DIR)/usr/include/f*cgi*.h \
52 $(STAGING_DIR)/usr/lib/libfcgi.{a,so*}
53 endef
54
55 define Package/fcgi/install
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfcgi.so* $(1)/usr/lib/
58 $(INSTALL_DIR) $(1)/usr/bin
59 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgi-fcgi $(1)/usr/bin/
60 endef
61
62 $(eval $(call BuildPackage,fcgi))