updated to new upstream release (v0.4.0),
[openwrt.git] / openwrt / package / opencdk / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=opencdk
6 PKG_VERSION:=0.5.5
7 PKG_RELEASE:=0
8 PKG_MD5SUM:=aaff60107f0153873192ffda00699a96
9
10 PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/opencdk/ \
11 ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/opencdk/ \
12 http://www.mirrors.wiretapped.net/security/network-security/gnutls/opencdk/ \
13 ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/opencdk/ \
14 http://josefsson.org/gnutls/releases/opencdk/
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_CAT:=bzcat
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,LIBOPENCDK,libopencdk,$(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 --with-libgcrypt-prefix="$(STAGING_DIR)/usr" \
61 );
62 touch $@
63
64 $(PKG_BUILD_DIR)/.built:
65 rm -rf $(PKG_INSTALL_DIR)
66 mkdir -p $(PKG_INSTALL_DIR)
67 $(MAKE) -C $(PKG_BUILD_DIR) \
68 DESTDIR="$(PKG_INSTALL_DIR)" \
69 all install
70 touch $@
71
72 $(IPKG_LIBOPENCDK):
73 install -m0755 -d $(IDIR_LIBOPENCDK)/usr/lib
74 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libopencdk.so.* $(IDIR_LIBOPENCDK)/usr/lib/
75 $(RSTRIP) $(IDIR_LIBOPENCDK)
76 $(IPKG_BUILD) $(IDIR_LIBOPENCDK) $(PACKAGE_DIR)
77
78 $(STAGING_DIR)/usr/lib/libopencdk.so: $(PKG_BUILD_DIR)/.built
79 mkdir -p $(STAGING_DIR)/usr/bin
80 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/opencdk-config $(STAGING_DIR)/usr/bin/
81 mkdir -p $(STAGING_DIR)/usr/include
82 cp -fpR $(PKG_INSTALL_DIR)/usr/include/opencdk.h $(STAGING_DIR)/usr/include/
83 mkdir -p $(STAGING_DIR)/usr/lib
84 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libopencdk.{a,so*} $(STAGING_DIR)/usr/lib/
85 touch $@
86
87 install-dev: $(STAGING_DIR)/usr/lib/libopencdk.so
88
89 uninstall-dev:
90 rm -rf \
91 $(STAGING_DIR)/usr/bin/opencdk-config \
92 $(STAGING_DIR)/usr/include/opencdk.h \
93 $(STAGING_DIR)/usr/lib/libopencdk.{a,so*} \
94
95 compile: install-dev
96
97 clean: uninstall-dev
98
99 mostlyclean:
100 make -C $(PKG_BUILD_DIR) clean
101 rm -f $(PKG_BUILD_DIR)/.built
This page took 0.0443 seconds and 5 git commands to generate.