libtasn1:
[openwrt/svn-archive/archive.git] / libs / libtasn1 / 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:=libtasn1
12 PKG_VERSION:=1.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/libtasn1/ \
17 ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/libtasn1/ \
18 http://www.mirrors.wiretapped.net/security/network-security/gnutls/libtasn1/ \
19 ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/libtasn1/ \
20 http://josefsson.org/gnutls/releases/libtasn1/
21 PKG_MD5SUM:=93b43cc5013bda4d8bf64508f1566c54
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libtasn1
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=An ASN.1 and DER structures manipulation library
29 URL:=ftp://ftp.gnutls.org/pub/gnutls/libtasn1/
30 endef
31
32 define Package/libtasn1/description
33 This is a library for Abstract Syntax Notation One (ASN.1) and
34 Distinguish Encoding Rules (DER) manipulation.
35 endef
36
37 define Build/Configure
38 $(call Build/Configure/Default, \
39 --enable-shared \
40 --enable-static \
41 )
42 $(call libtool_disable_rpath)
43 endef
44
45 define Build/Compile
46 $(MAKE) -C $(PKG_BUILD_DIR) all
47 $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
48 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
49 endef
50
51 define Build/InstallDev
52 mkdir -p $(STAGING_DIR)/usr/bin
53 $(CP) $(PKG_INSTALL_DIR)/usr/bin/libtasn1-config $(STAGING_DIR)/usr/bin/
54 mkdir -p $(STAGING_DIR)/usr/include
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/libtasn1.h $(STAGING_DIR)/usr/include/
56 mkdir -p $(STAGING_DIR)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtasn1.{a,so*} $(STAGING_DIR)/usr/lib/
58 $(SED) 's,-I$$$${prefix}/include,,g' $(STAGING_DIR)/usr/bin/libtasn1-config
59 $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(STAGING_DIR)/usr/bin/libtasn1-config
60 endef
61
62 define Build/UninstallDev
63 rm -rf \
64 $(STAGING_DIR)/usr/bin/libtasn1-config \
65 $(STAGING_DIR)/usr/include/libtasn1.h \
66 $(STAGING_DIR)/usr/lib/libtasn1.{a,so*} \
67 $(STAGING_DIR)/usr/share/aclocal/libtasn1.m4
68 endef
69
70 define Package/libtasn1/install
71 $(INSTALL_DIR) $(1)/usr/lib
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtasn1.so.* $(1)/usr/lib/
73 endef
74
75 $(eval $(call BuildPackage,libtasn1))