Add clearsilver (#2095)
[openwrt/svn-archive/archive.git] / libs / clearsilver / 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:=clearsilver
11 PKG_VERSION:=0.10.5
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.clearsilver.net/downloads/
16 PKG_MD5SUM:=b8c0c7fbe0ef5e06e0c935f134304d44
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/clearsilver
21 SECTION:=libs
22 CATEGORY:=Libraries
23 DEPENDS:=+neon +zlib
24 TITLE:=ClearSilver template system
25 DESCRIPTION:=Clearsilver is a fast, powerful, and language-neutral HTML template system. In both static content sites and dynamic HTML applications, it provides a separation between presentation code and application logic which makes working with your project easier.
26 URL:=http://www.clearsilver.net/
27 endef
28
29 CONFIGURE_ARGS += \
30 --disable-wdb \
31 --disable-apache \
32 --disable-python \
33 --disable-perl \
34 --disable-ruby \
35 --disable-java \
36 --disable-csharp \
37 --prefix=/usr
38
39 MAKE_FLAGS += \
40 $(TARGET_CONFIGURE_OPTS) \
41 AR="$(AR) cr" \
42 LD="$(TARGET_CROSS)ld -o" \
43 DESTDIR="$(PKG_INSTALL_DIR)" \
44 all install
45
46 define Build/InstallDev
47 $(INSTALL_DIR) $(STAGING_DIR)/usr/include/ClearSilver
48 $(INSTALL_DIR) $(STAGING_DIR)/usr/include/ClearSilver/cs
49 $(INSTALL_DIR) $(STAGING_DIR)/usr/include/ClearSilver/cgi
50 $(INSTALL_DIR) $(STAGING_DIR)/usr/include/ClearSilver/util
51
52 $(CP) $(PKG_BUILD_DIR)/ClearSilver.h $(STAGING_DIR)/usr/include/ClearSilver/
53 $(CP) $(PKG_BUILD_DIR)/cs_config.h $(STAGING_DIR)/usr/include/ClearSilver/
54
55 $(CP) $(PKG_BUILD_DIR)/cs/cs.h $(STAGING_DIR)/usr/include/ClearSilver/cs/
56
57 $(CP) $(PKG_BUILD_DIR)/cgi/cgi.h $(STAGING_DIR)/usr/include/ClearSilver/cgi/
58 $(CP) $(PKG_BUILD_DIR)/cgi/cgiwrap.h $(STAGING_DIR)/usr/include/ClearSilver/cgi/
59 $(CP) $(PKG_BUILD_DIR)/cgi/date.h $(STAGING_DIR)/usr/include/ClearSilver/cgi/
60 $(CP) $(PKG_BUILD_DIR)/cgi/html.h $(STAGING_DIR)/usr/include/ClearSilver/cgi/
61
62 $(CP) $(PKG_BUILD_DIR)/util/neo_err.h $(STAGING_DIR)/usr/include/ClearSilver/util/
63 $(CP) $(PKG_BUILD_DIR)/util/neo_files.h $(STAGING_DIR)/usr/include/ClearSilver/util/
64 $(CP) $(PKG_BUILD_DIR)/util/neo_misc.h $(STAGING_DIR)/usr/include/ClearSilver/util/
65 $(CP) $(PKG_BUILD_DIR)/util/neo_rand.h $(STAGING_DIR)/usr/include/ClearSilver/util/
66 $(CP) $(PKG_BUILD_DIR)/util/ulist.h $(STAGING_DIR)/usr/include/ClearSilver/util/
67 $(CP) $(PKG_BUILD_DIR)/util/neo_hdf.h $(STAGING_DIR)/usr/include/ClearSilver/util/
68 $(CP) $(PKG_BUILD_DIR)/util/neo_str.h $(STAGING_DIR)/usr/include/ClearSilver/util/
69 $(CP) $(PKG_BUILD_DIR)/util/neo_date.h $(STAGING_DIR)/usr/include/ClearSilver/util/
70 $(CP) $(PKG_BUILD_DIR)/util/wildmat.h $(STAGING_DIR)/usr/include/ClearSilver/util/
71 $(CP) $(PKG_BUILD_DIR)/util/neo_hash.h $(STAGING_DIR)/usr/include/ClearSilver/util/
72 $(CP) $(PKG_BUILD_DIR)/util/ulocks.h $(STAGING_DIR)/usr/include/ClearSilver/util/
73 $(CP) $(PKG_BUILD_DIR)/util/rcfs.h $(STAGING_DIR)/usr/include/ClearSilver/util/
74 $(CP) $(PKG_BUILD_DIR)/util/skiplist.h $(STAGING_DIR)/usr/include/ClearSilver/util/
75 $(CP) $(PKG_BUILD_DIR)/util/dict.h $(STAGING_DIR)/usr/include/ClearSilver/util/
76 $(CP) $(PKG_BUILD_DIR)/util/filter.h $(STAGING_DIR)/usr/include/ClearSilver/util/
77 $(CP) $(PKG_BUILD_DIR)/util/neo_net.h $(STAGING_DIR)/usr/include/ClearSilver/util/
78 $(CP) $(PKG_BUILD_DIR)/util/neo_server.h $(STAGING_DIR)/usr/include/ClearSilver/util/
79
80 $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
81
82 $(CP) $(PKG_BUILD_DIR)/libs/libneo_cs.a $(STAGING_DIR)/usr/lib/
83 $(CP) $(PKG_BUILD_DIR)/libs/libneo_cgi.a $(STAGING_DIR)/usr/lib/
84 $(CP) $(PKG_BUILD_DIR)/libs/libneo_utl.a $(STAGING_DIR)/usr/lib/
85
86 $(INSTALL_DIR) $(STAGING_DIR)/usr/bin
87
88 $(CP) $(PKG_BUILD_DIR)/cs/cs $(STAGING_DIR)/usr/bin/
89 $(CP) $(PKG_BUILD_DIR)/cs/cstest $(STAGING_DIR)/usr/bin/
90 $(CP) $(PKG_BUILD_DIR)/cgi/cs_static.cgi $(STAGING_DIR)/usr/bin/
91 endef
92
93 define Build/UninstallDev
94 rm -rf \
95 $(STAGING_DIR)/usr/include/ClearSilver \
96 $(STAGING_DIR)/usr/lib/libneo_* \
97 $(STAGING_DIR)/usr/bin/cs \
98 $(STAGING_DIR)/usr/bin/cstest \
99 $(STAGING_DIR)/usr/bin/cs_static.cgi
100 endef
101
102 define Package/clearsilver/install
103 $(INSTALL_DIR) $(1)/usr/lib
104 $(INSTALL_BIN) $(PKG_BUILD_DIR)/libs/libneo_cs.a $(1)/usr/lib/
105 $(INSTALL_BIN) $(PKG_BUILD_DIR)/libs/libneo_cgi.a $(1)/usr/lib/
106 $(INSTALL_BIN) $(PKG_BUILD_DIR)/libs/libneo_utl.a $(1)/usr/lib/
107
108 $(INSTALL_DIR) $(1)/usr/bin
109 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cs/cs $(1)/usr/bin/
110 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cs/cstest $(1)/usr/bin/
111 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgi/cs_static.cgi $(1)/usr/bin/
112 endef
113
114 $(eval $(call BuildPackage,clearsilver))