fix typo
[openwrt/svn-archive/archive.git] / libs / libtasn1 / 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:=libtasn1
12 PKG_VERSION:=0.2.13
13 PKG_RELEASE:=0
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/libtasn1/ \
18 ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/libtasn1/ \
19 http://www.mirrors.wiretapped.net/security/network-security/gnutls/libtasn1/ \
20 ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/libtasn1/ \
21 http://josefsson.org/gnutls/releases/libtasn1/
22 PKG_MD5SUM:=d124b11908cfb88883fe71472c25d53a
23 PKG_CAT:=zcat
24
25 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/libtasn1
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=An ASN.1 and DER structures manipulation library
33 DESCRIPTION:=An ASN.1 and DER structures manipulation library. \\\
34 This is a library for Abstract Syntax Notation One (ASN.1) and \\\
35 Distinguish Encoding Rules (DER) manipulation.
36 URL:=ftp://ftp.gnutls.org/pub/gnutls/libtasn1/
37 endef
38
39 define Build/Configure
40 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
41 touch configure.ac ; \
42 touch acinclude.m4 ; \
43 touch aclocal.m4 ; \
44 touch Makefile.in ; \
45 touch config.h.in ; \
46 touch configure ; \
47 $(TARGET_CONFIGURE_OPTS) \
48 CFLAGS="$(TARGET_CFLAGS)" \
49 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
50 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
51 ./configure \
52 --target=$(GNU_TARGET_NAME) \
53 --host=$(GNU_TARGET_NAME) \
54 --build=$(GNU_HOST_NAME) \
55 --program-prefix="" \
56 --program-suffix="" \
57 --prefix=/usr \
58 --exec-prefix=/usr \
59 --bindir=/usr/bin \
60 --datadir=/usr/share \
61 --includedir=/usr/include \
62 --infodir=/usr/share/info \
63 --libdir=/usr/lib \
64 --libexecdir=/usr/lib \
65 --localstatedir=/var \
66 --mandir=/usr/share/man \
67 --sbindir=/usr/sbin \
68 --sysconfdir=/etc \
69 $(DISABLE_NLS) \
70 $(DISABLE_LARGEFILE) \
71 --enable-shared \
72 --enable-static \
73 --disable-rpath \
74 );
75 endef
76
77 define Build/Compile
78 rm -rf $(PKG_INSTALL_DIR)
79 mkdir -p $(PKG_INSTALL_DIR)
80 $(MAKE) -C $(PKG_BUILD_DIR) \
81 DESTDIR="$(PKG_INSTALL_DIR)" \
82 all install
83 endef
84
85 define Package/libtasn1/install
86 install -m0755 -d $(1)/usr/lib
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtasn1.so.* $(1)/usr/lib/
88 endef
89
90 define Build/InstallDev
91 mkdir -p $(STAGING_DIR)/usr/bin
92 $(CP) $(PKG_INSTALL_DIR)/usr/bin/libtasn1-config $(STAGING_DIR)/usr/bin/
93 mkdir -p $(STAGING_DIR)/usr/include
94 $(CP) $(PKG_INSTALL_DIR)/usr/include/libtasn1.h $(STAGING_DIR)/usr/include/
95 mkdir -p $(STAGING_DIR)/usr/lib
96 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtasn1.{a,so*} $(STAGING_DIR)/usr/lib/
97 mkdir -p $(STAGING_DIR)/usr/share/aclocal
98 $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libtasn1.m4 $(STAGING_DIR)/usr/share/aclocal/
99 endef
100
101 define Build/UninstallDev
102 rm -rf \
103 $(STAGING_DIR)/usr/bin/libtasn1-config \
104 $(STAGING_DIR)/usr/include/libtasn1.h \
105 $(STAGING_DIR)/usr/lib/libtasn1.{a,so*} \
106 $(STAGING_DIR)/usr/share/aclocal/libtasn1.m4
107 endef
108
109 $(eval $(call BuildPackage,libtasn1))