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