Merge branch 'master' into license-updates
[feed/packages.git] / libs / cyrus-sasl / Makefile
1 #
2 # Copyright (C) 2006-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=cyrus-sasl
11 PKG_VERSION:=2.1.26
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=ftp://ftp.cyrusimap.org/cyrus-sasl/
16 PKG_MD5SUM:=a7f4e5e559a0e37b3ffc438c9456e425
17
18 PKG_LICENSE:=BSD-4c BSD
19 PKG_LICENSE_FILES:=COPYING cmulocal/COPYING saslauthd/COPYING
20
21 PKG_FIXUP:=autoreconf
22 PKG_MACRO_PATHS:=cmulocal config ../cmulocal ../config
23 PKG_AUTOMAKE_PATHS:=. saslauthd sasldb
24 PKG_REMOVE_FILES:=aclocal.m4 saslauthd/aclocal.m4 config/libtool.m4
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libsasl2
29 SECTION:=libs
30 CATEGORY:=Libraries
31 TITLE:=A general purpose authentication library
32 URL:=http://asg.web.cmu.edu/sasl/
33 DEPENDS:=libopenssl
34 endef
35
36 TARGET_CFLAGS += $(FPIC)
37 CONFIGURE_ARGS += \
38 --enable-shared \
39 --enable-static \
40 --disable-sample \
41 --enable-staticdlopen \
42 --disable-java \
43 --disable-alwaystrue \
44 --disable-checkapop \
45 --enable-cram \
46 --enable-digest \
47 --without-auth-sasldb \
48 --disable-otp \
49 --disable-srp \
50 --disable-srp-setpass \
51 --disable-krb4 \
52 --disable-gssapi \
53 --disable-gss_mutexes \
54 --enable-plain \
55 --enable-anon \
56 --disable-login \
57 --disable-ntlm \
58 --disable-sql \
59 --disable-ldapdb \
60 --without-dblib \
61 --without-gdbm \
62 --with-devrandom="/dev/urandom" \
63 --without-pam \
64 --without-saslauthd \
65 --without-authdaemond \
66 --without-pwcheck \
67 --with-ipctype=unix \
68 --with-openssl="$(STAGING_DIR)/usr" \
69 --without-des \
70 --without-opie \
71 --without-ldap \
72 --without-mysql \
73 --without-pgsql \
74 --without-sqlite \
75 --without-rc4 \
76 --without-dmalloc \
77 --without-sfio \
78 --disable-sample
79
80 define Build/Compile
81 $(MAKE) -C $(PKG_BUILD_DIR)/include \
82 CC="$(HOSTCC)" \
83 LINK="$(HOSTCC) -o makemd5 -lc" \
84 CFLAGS="" \
85 CPPFLAGS="" \
86 makemd5
87 $(MAKE) -C $(PKG_BUILD_DIR) \
88 DESTDIR="$(PKG_INSTALL_DIR)" \
89 all install
90 endef
91
92 define Build/InstallDev
93 $(INSTALL_DIR) $(1)/usr/include/
94 $(CP) $(PKG_INSTALL_DIR)/usr/include/sasl $(1)/usr/include/
95 $(INSTALL_DIR) $(1)/usr/lib/
96 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.{a,so*} $(1)/usr/lib/
97 ln -sf libsasl2.a $(1)/usr/lib/libsasl.a
98 ln -sf libsasl2.so $(1)/usr/lib/libsasl.so
99 $(INSTALL_DIR) $(1)/usr/lib/sasl2
100 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.{a,so*} $(1)/usr/lib/sasl2/
101 endef
102
103 define Package/libsasl2/install
104 $(INSTALL_DIR) $(1)/usr/lib/
105 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so.* $(1)/usr/lib/
106 $(INSTALL_DIR) $(1)/usr/lib/sasl2
107 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.so.* $(1)/usr/lib/sasl2/
108 endef
109
110 $(eval $(call BuildPackage,libsasl2))