Add gdbserver package, keep things sorted
[openwrt.git] / package / libtasn1 / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=libtasn1
6 PKG_VERSION:=0.2.13
7 PKG_RELEASE:=0
8 PKG_MD5SUM:=d124b11908cfb88883fe71472c25d53a
9
10 PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/libtasn1/ \
11 ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/libtasn1/ \
12 http://www.mirrors.wiretapped.net/security/network-security/gnutls/libtasn1/ \
13 ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/libtasn1/ \
14 http://josefsson.org/gnutls/releases/libtasn1/
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_CAT:=zcat
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
19 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
20
21 include $(TOPDIR)/package/rules.mk
22
23 $(eval $(call PKG_template,LIBTASN1,libtasn1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
24
25 $(PKG_BUILD_DIR)/.configured:
26 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
27 touch configure.ac ; \
28 touch acinclude.m4 ; \
29 touch aclocal.m4 ; \
30 touch Makefile.in ; \
31 touch config.h.in ; \
32 touch configure ; \
33 $(TARGET_CONFIGURE_OPTS) \
34 CFLAGS="$(TARGET_CFLAGS)" \
35 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
36 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
37 ./configure \
38 --target=$(GNU_TARGET_NAME) \
39 --host=$(GNU_TARGET_NAME) \
40 --build=$(GNU_HOST_NAME) \
41 --program-prefix="" \
42 --program-suffix="" \
43 --prefix=/usr \
44 --exec-prefix=/usr \
45 --bindir=/usr/bin \
46 --datadir=/usr/share \
47 --includedir=/usr/include \
48 --infodir=/usr/share/info \
49 --libdir=/usr/lib \
50 --libexecdir=/usr/lib \
51 --localstatedir=/var \
52 --mandir=/usr/share/man \
53 --sbindir=/usr/sbin \
54 --sysconfdir=/etc \
55 $(DISABLE_NLS) \
56 $(DISABLE_LARGEFILE) \
57 --enable-shared \
58 --enable-static \
59 --disable-rpath \
60 );
61 touch $@
62
63 $(PKG_BUILD_DIR)/.built:
64 rm -rf $(PKG_INSTALL_DIR)
65 mkdir -p $(PKG_INSTALL_DIR)
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 DESTDIR="$(PKG_INSTALL_DIR)" \
68 all install
69 touch $@
70
71 $(IPKG_LIBTASN1):
72 install -m0755 -d $(IDIR_LIBTASN1)/usr/lib
73 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libtasn1.so.* $(IDIR_LIBTASN1)/usr/lib/
74 $(RSTRIP) $(IDIR_LIBTASN1)
75 $(IPKG_BUILD) $(IDIR_LIBTASN1) $(PACKAGE_DIR)
76
77 $(STAGING_DIR)/usr/lib/libtasn1.so: $(PKG_BUILD_DIR)/.built
78 mkdir -p $(STAGING_DIR)/usr/bin
79 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/libtasn1-config $(STAGING_DIR)/usr/bin/
80 mkdir -p $(STAGING_DIR)/usr/include
81 cp -fpR $(PKG_INSTALL_DIR)/usr/include/libtasn1.h $(STAGING_DIR)/usr/include/
82 mkdir -p $(STAGING_DIR)/usr/lib
83 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libtasn1.{a,so*} $(STAGING_DIR)/usr/lib/
84 mkdir -p $(STAGING_DIR)/usr/share/aclocal
85 cp -fpR $(PKG_INSTALL_DIR)/usr/share/aclocal/libtasn1.m4 $(STAGING_DIR)/usr/share/aclocal/
86 touch $@
87
88 install-dev: $(STAGING_DIR)/usr/lib/libtasn1.so
89
90 uninstall-dev:
91 rm -rf \
92 $(STAGING_DIR)/usr/bin/libtasn1-config \
93 $(STAGING_DIR)/usr/include/libtasn1.h \
94 $(STAGING_DIR)/usr/lib/libtasn1.{a,so*} \
95 $(STAGING_DIR)/usr/share/aclocal/libtasn1.m4 \
96
97 compile: install-dev
98
99 clean: uninstall-dev
100
101 mostlyclean:
102 make -C $(PKG_BUILD_DIR) clean
103 rm -f $(PKG_BUILD_DIR)/.built
This page took 0.044941 seconds and 5 git commands to generate.