25175c55c891613f474a27553a866382694292fc
[openwrt/svn-archive/archive.git] / libs / cgilib / Makefile
1 #
2 # Copyright (C) 2006 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:=cgilib
12 PKG_VERSION:=0.5
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.infodrom.org/projects/cgilib/download
17 PKG_MD5SUM:=5187ba11b2ec165b6c5b6629087733b0
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/cgilib
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=Simple CGI Library
28 URL:=http://www.infodrom.org/projects/cgilib/
29 endef
30
31 define Build/Configure
32 endef
33
34 define Build/Compile
35 $(MAKE) -C $(PKG_BUILD_DIR) \
36 $(TARGET_CONFIGURE_OPTS) \
37 OFLAGS="$(TARGET_CFLAGS)" \
38 all
39 endef
40
41 define Build/InstallDev
42 mkdir -p $(STAGING_DIR)/usr/include
43 $(CP) $(PKG_BUILD_DIR)/cgi.h $(STAGING_DIR)/usr/include/
44 mkdir -p $(STAGING_DIR)/usr/lib
45 $(CP) $(PKG_BUILD_DIR)/libcgi.{a,so*} $(STAGING_DIR)/usr/lib/
46 touch $(STAGING_DIR)/usr/lib/libcgi.so
47 endef
48
49 define Build/UninstallDev
50 rm -rf \
51 $(STAGING_DIR)/usr/include/cgi.h \
52 $(STAGING_DIR)/usr/lib/libcgi.{a,so*}
53 endef
54
55 define Package/cgilib/install
56 install -d -m0755 $(1)/usr/lib
57 $(CP) $(PKG_BUILD_DIR)/libcgi.so.* $(1)/usr/lib/
58 endef
59
60 $(eval $(call BuildPackage,cgilib))