InstallDev should be using (1) and not (STAGING_DIR)
[packages.git] / libs / cyrus-sasl / Makefile
1
2 # Copyright (C) 2006 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 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 PKG_BUILD_DEPENDS:=libopenssl
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/libsasl2
28   SECTION:=libs
29   CATEGORY:=Libraries
30   TITLE:=A general purpose authentication library
31   URL:=http://asg.web.cmu.edu/sasl/
32 endef
33
34 define Build/Configure
35         $(call Build/Configure/Default, \
36                 --enable-shared \
37                 --enable-static \
38                 --disable-sample \
39                 --enable-staticdlopen \
40                 --disable-java \
41                 --disable-alwaystrue \
42                 --disable-checkapop \
43                 --enable-cram \
44                 --enable-digest \
45                 --disable-otp \
46                 --disable-srp \
47                 --disable-srp-setpass \
48                 --disable-krb4 \
49                 --disable-gssapi \
50                 --disable-gss_mutexes \
51                 --enable-plain \
52                 --enable-anon \
53                 --disable-login \
54                 --disable-ntlm \
55                 --disable-sql \
56                 --with-dblib="none" \
57                 --without-gdbm \
58                 --with-devrandom="/dev/urandom" \
59                 --without-pam \
60                 --without-saslauthd \
61                 --without-authdaemond \
62                 --without-pwcheck \
63                 --with-ipctype=unix \
64                 --with-openssl="$(STAGING_DIR)/usr" \
65                 --without-des \
66                 --without-opie \
67                 --without-ldap \
68                 --without-mysql \
69                 --without-pgsql \
70                 --without-sqlite \
71                 --without-rc4 \
72                 --without-dmalloc \
73                 --without-sfio \
74         );
75 endef
76
77 define Build/Compile
78         $(MAKE) -C $(PKG_BUILD_DIR)/include \
79                 CC="$(HOSTCC)" \
80                 LINK="$(HOSTCC) -o makemd5 -lc" \
81                 CFLAGS="" \
82                 CPPFLAGS="" \
83                 makemd5
84         $(MAKE) -C $(PKG_BUILD_DIR) \
85                 DESTDIR="$(PKG_INSTALL_DIR)" \
86                 all install
87 endef
88
89 define Build/InstallDev
90         mkdir -p $(1)/usr/include/
91         $(CP) $(PKG_INSTALL_DIR)/usr/include/sasl $(1)/usr/include/
92         mkdir -p $(1)/usr/lib/
93         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.{a,so*} $(1)/usr/lib/
94         ln -sf libsasl2.a $(1)/usr/lib/libsasl.a
95         ln -sf libsasl2.so $(1)/usr/lib/libsasl.so
96         mkdir -p $(1)/usr/lib/sasl2
97         $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.{a,so*} $(1)/usr/lib/sasl2/
98 endef
99
100 define Build/UninstallDev
101         rm -rf  $(STAGING_DIR)/usr/include/sasl \
102                 $(STAGING_DIR)/usr/lib/libsasl{2,}.{a,so*} \
103                 $(STAGING_DIR)/usr/lib/sasl2
104 endef
105
106 define Package/libsasl2/install
107         $(INSTALL_DIR) $(1)/usr/lib/
108         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so.* $(1)/usr/lib/
109         $(INSTALL_DIR) $(1)/usr/lib/sasl2
110         $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.so.* $(1)/usr/lib/sasl2/
111 endef
112
113 $(eval $(call BuildPackage,libsasl2))