libs: add userspace-rcu library
[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.23
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://ftp.andrew.cmu.edu/pub/cyrus-mail/
16 PKG_MD5SUM:=2eb0e48106f0e9cd8001e654f267ecbc
17
18 PKG_LICENSE:=BSD-4c BSD
19 PKG_LICENSE_FILES:=COPYING cmulocal/COPYING saslauthd/COPYING
20
21 PKG_BUILD_DEPENDS:=libopenssl
22
23 PKG_FIXUP:=autoreconf
24 PKG_MACRO_PATHS:=cmulocal config ../cmulocal ../config
25 PKG_AUTOMAKE_PATHS:=. saslauthd sasldb
26 PKG_REMOVE_FILES:=aclocal.m4 saslauthd/aclocal.m4
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/libsasl2
31   SECTION:=libs
32   CATEGORY:=Libraries
33   TITLE:=A general purpose authentication library
34   URL:=http://asg.web.cmu.edu/sasl/
35 endef
36
37 TARGET_CFLAGS += $(FPIC)
38 CONFIGURE_ARGS += \
39         --enable-shared \
40         --enable-static \
41         --disable-sample \
42         --enable-staticdlopen \
43         --disable-java \
44         --disable-alwaystrue \
45         --disable-checkapop \
46         --enable-cram \
47         --enable-digest \
48         --without-auth-sasldb \
49         --disable-otp \
50         --disable-srp \
51         --disable-srp-setpass \
52         --disable-krb4 \
53         --disable-gssapi \
54         --disable-gss_mutexes \
55         --enable-plain \
56         --enable-anon \
57         --disable-login \
58         --disable-ntlm \
59         --disable-sql \
60         --disable-ldapdb \
61         --without-dblib \
62         --without-gdbm \
63         --with-devrandom="/dev/urandom" \
64         --without-pam \
65         --without-saslauthd \
66         --without-authdaemond \
67         --without-pwcheck \
68         --with-ipctype=unix \
69         --with-openssl="$(STAGING_DIR)/usr" \
70         --without-des \
71         --without-opie \
72         --without-ldap \
73         --without-mysql \
74         --without-pgsql \
75         --without-sqlite \
76         --without-rc4 \
77         --without-dmalloc \
78         --without-sfio \
79         --disable-sample
80
81 define Build/Compile
82         $(MAKE) -C $(PKG_BUILD_DIR)/include \
83                 CC="$(HOSTCC)" \
84                 LINK="$(HOSTCC) -o makemd5 -lc" \
85                 CFLAGS="" \
86                 CPPFLAGS="" \
87                 makemd5
88         $(MAKE) -C $(PKG_BUILD_DIR) \
89                 DESTDIR="$(PKG_INSTALL_DIR)" \
90                 all install
91 endef
92
93 define Build/InstallDev
94         $(INSTALL_DIR) $(1)/usr/include/
95         $(CP) $(PKG_INSTALL_DIR)/usr/include/sasl $(1)/usr/include/
96         $(INSTALL_DIR) $(1)/usr/lib/
97         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.{a,so*} $(1)/usr/lib/
98         ln -sf libsasl2.a $(1)/usr/lib/libsasl.a
99         ln -sf libsasl2.so $(1)/usr/lib/libsasl.so
100         $(INSTALL_DIR) $(1)/usr/lib/sasl2
101         $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.{a,so*} $(1)/usr/lib/sasl2/
102 endef
103
104 define Package/libsasl2/install
105         $(INSTALL_DIR) $(1)/usr/lib/
106         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so.* $(1)/usr/lib/
107         $(INSTALL_DIR) $(1)/usr/lib/sasl2
108         $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.so.* $(1)/usr/lib/sasl2/
109 endef
110
111 $(eval $(call BuildPackage,libsasl2))