[packages] Use default templates instead of custom reimplementations where applicable
[openwrt/svn-archive/archive.git] / libs / iksemel / Makefile
1 #
2 # Copyright (C) 2006-2009 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:=iksemel
11 PKG_VERSION:=1.4
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://iksemel.googlecode.com/files/
16 PKG_MD5SUM:=532e77181694f87ad5eb59435d11c1ca
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libiksemel
24 SECTION:=libs
25 CATEGORY:=Libraries
26 TITLE:=Iksemel Jabber Library
27 URL:=http://code.google.com/p/iksemel/
28 DEPENDS:= +libgnutls +libtasn1
29 endef
30
31 define Package/libiksemel/description
32 Iksemel is an XML parser library mainly designed for Jabber applications.
33 It provides SAX, DOM, and special Jabber stream APIs. Library is coded
34 in ANSI C except the network code (which is POSIX compatible), thus
35 highly portable.
36 endef
37
38 TARGET_CFLAGS += $(FPIC)
39 TARGET_LDFLAGS += \
40 -Wl,-rpath-link,$(STAGING_DIR)/usr/lib \
41 -lgnutls -lgcrypt -lgpg-error
42
43 define Build/Configure
44 $(call Build/Configure/Default, \
45 --enable-shared \
46 --enable-static \
47 --with-libgnutls-prefix="$(STAGING_DIR)/usr" \
48 , \
49 LIBS="$(TARGET_LDFLAGS)" \
50 )
51 endef
52
53 define Build/InstallDev
54 $(INSTALL_DIR) $(1)/usr/include/
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/iksemel.h $(1)/usr/include/
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiksemel.{a,so*} $(1)/usr/lib/
58 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/iksemel.pc $(1)/usr/lib/pkgconfig/
60 endef
61
62 define Package/libiksemel/install
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiksemel.so.* $(1)/usr/lib/
65 endef
66
67 $(eval $(call BuildPackage,libiksemel))