4e7ccb95e0f762e687406314943925c68246b05b
[openwrt.git] / package / gnutls / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=gnutls
6 PKG_VERSION:=1.0.25
7 PKG_RELEASE:=0
8 PKG_MD5SUM:=3585b5b204135e51e0efc9084b3e028b
9
10 PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/ \
11 ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/ \
12 http://www.mirrors.wiretapped.net/security/network-security/gnutls/ \
13 ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/ \
14 http://josefsson.org/gnutls/releases/
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,LIBGNUTLS,libgnutls,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
24 $(eval $(call PKG_template,GNUTLS_UTILS,gnutls-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
25 $(eval $(call PKG_template,LIBGNUTLS_OPENSSL,libgnutls-openssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
26
27 $(PKG_BUILD_DIR)/.configured:
28 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
29 touch configure.in ; \
30 touch acinclude.m4 ; \
31 touch aclocal.m4 ; \
32 touch Makefile.in ; \
33 touch config.h.in ; \
34 touch configure ; \
35 $(TARGET_CONFIGURE_OPTS) \
36 CFLAGS="$(TARGET_CFLAGS)" \
37 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
38 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
39 ./configure \
40 --target=$(GNU_TARGET_NAME) \
41 --host=$(GNU_TARGET_NAME) \
42 --build=$(GNU_HOST_NAME) \
43 --program-prefix="" \
44 --program-suffix="" \
45 --prefix=/usr \
46 --exec-prefix=/usr \
47 --bindir=/usr/bin \
48 --datadir=/usr/share \
49 --includedir=/usr/include \
50 --infodir=/usr/share/info \
51 --libdir=/usr/lib \
52 --libexecdir=/usr/lib \
53 --localstatedir=/var \
54 --mandir=/usr/share/man \
55 --sbindir=/usr/sbin \
56 --sysconfdir=/etc \
57 $(DISABLE_NLS) \
58 $(DISABLE_LARGEFILE) \
59 --enable-shared \
60 --enable-static \
61 --disable-rpath \
62 --disable-srp-authentication \
63 --disable-anon-authentication \
64 --disable-openpgp-authentication \
65 --with-included-opencdk=yes \
66 --with-included-libtasn1=yes \
67 --with-included-libcfg=yes \
68 --without-zlib \
69 --without-lzo \
70 );
71 touch $@
72
73 $(PKG_BUILD_DIR)/.built:
74 rm -rf $(PKG_INSTALL_DIR)
75 mkdir -p $(PKG_INSTALL_DIR)
76 $(MAKE) -C $(PKG_BUILD_DIR) \
77 DESTDIR="$(PKG_INSTALL_DIR)" \
78 all install
79 touch $@
80
81 $(IPKG_LIBGNUTLS):
82 install -m0755 -d $(IDIR_LIBGNUTLS)/usr/lib
83 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra}.so.* $(IDIR_LIBGNUTLS)/usr/lib/
84 $(RSTRIP) $(IDIR_LIBGNUTLS)
85 $(IPKG_BUILD) $(IDIR_LIBGNUTLS) $(PACKAGE_DIR)
86
87 $(IPKG_LIBGNUTLS_OPENSSL):
88 install -m0755 -d $(IDIR_LIBGNUTLS_OPENSSL)/usr/lib
89 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgnutls-openssl.so.* $(IDIR_LIBGNUTLS_OPENSSL)/usr/lib/
90 $(RSTRIP) $(IDIR_LIBGNUTLS_OPENSSL)
91 $(IPKG_BUILD) $(IDIR_LIBGNUTLS_OPENSSL) $(PACKAGE_DIR)
92
93 $(IPKG_GNUTLS_UTILS):
94 install -m0755 -d $(IDIR_GNUTLS_UTILS)/usr/bin
95 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/certtool $(IDIR_GNUTLS_UTILS)/usr/bin/
96 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} $(IDIR_GNUTLS_UTILS)/usr/bin/
97 $(RSTRIP) $(IDIR_GNUTLS_UTILS)
98 $(IPKG_BUILD) $(IDIR_GNUTLS_UTILS) $(PACKAGE_DIR)
99
100 $(STAGING_DIR)/usr/lib/libgnutls.so: $(PKG_BUILD_DIR)/.built
101 mkdir -p $(STAGING_DIR)/usr/bin
102 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/libgnutls{,-extra}-config $(STAGING_DIR)/usr/bin/
103 mkdir -p $(STAGING_DIR)/usr/include
104 cp -fpR $(PKG_INSTALL_DIR)/usr/include/gnutls $(STAGING_DIR)/usr/include/
105 mkdir -p $(STAGING_DIR)/usr/lib
106 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} $(STAGING_DIR)/usr/lib/
107 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
108 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc $(STAGING_DIR)/usr/lib/pkgconfig/
109 mkdir -p $(STAGING_DIR)/usr/share/aclocal
110 cp -fpR $(PKG_INSTALL_DIR)/usr/share/aclocal/libgnutls{,-extra}.m4 $(STAGING_DIR)/usr/share/aclocal/
111 touch $@
112
113 install-dev: $(STAGING_DIR)/usr/lib/libgnutls.so
114
115 uninstall-dev:
116 rm -rf \
117 $(STAGING_DIR)/usr/bin/libgnutls{,-extra}-config \
118 $(STAGING_DIR)/usr/include/gnutls \
119 $(STAGING_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} \
120 $(STAGING_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc \
121 $(STAGING_DIR)/usr/share/aclocal/libgnutls{,-extra}.m4 \
122
123 compile-targets: install-dev
124 clean-targets: uninstall-dev
125
126 mostlyclean:
127 make -C $(PKG_BUILD_DIR) clean
128 rm -f $(PKG_BUILD_DIR)/.built
This page took 0.040361 seconds and 3 git commands to generate.