change SECTION and CATEGORY to put packages in the right place, change PKG_BUILDDEPs...
[openwrt/svn-archive/archive.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_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://ftp.andrew.cmu.edu/pub/cyrus-mail/
18 PKG_MD5SUM:=268ead27f4ac39bcfe17d9e38e0f2977
19 PKG_CAT:=zcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22 PKG_BUILDDEP:=libopenssl
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/libsasl2
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=A general purpose authentication library
30 DESCRIPTION:=A general purpose authentication library.
31 URL:=http://asg.web.cmu.edu/sasl/
32 endef
33
34 define Build/Configure
35 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
36 $(TARGET_CONFIGURE_OPTS) \
37 CFLAGS="$(TARGET_CFLAGS)" \
38 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
39 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
40 ./configure \
41 --target=$(GNU_TARGET_NAME) \
42 --host=$(GNU_TARGET_NAME) \
43 --build=$(GNU_HOST_NAME) \
44 --program-prefix="" \
45 --program-suffix="" \
46 --prefix=/usr \
47 --exec-prefix=/usr \
48 --bindir=/usr/bin \
49 --datadir=/usr/share \
50 --includedir=/usr/include \
51 --infodir=/usr/share/info \
52 --libdir=/usr/lib \
53 --libexecdir=/usr/lib \
54 --localstatedir=/var \
55 --mandir=/usr/share/man \
56 --sbindir=/usr/sbin \
57 --sysconfdir=/etc \
58 $(DISABLE_NLS) \
59 $(DISABLE_LARGEFILE) \
60 --enable-shared \
61 --enable-static \
62 --disable-sample \
63 --enable-staticdlopen \
64 --disable-java \
65 --disable-alwaystrue \
66 --disable-checkapop \
67 --enable-cram \
68 --enable-digest \
69 --disable-otp \
70 --disable-srp \
71 --disable-srp-setpass \
72 --disable-krb4 \
73 --disable-gssapi \
74 --disable-gss_mutexes \
75 --enable-plain \
76 --enable-anon \
77 --disable-login \
78 --disable-ntlm \
79 --disable-sql \
80 --with-dblib="none" \
81 --without-gdbm \
82 --with-devrandom="/dev/urandom" \
83 --without-pam \
84 --without-saslauthd \
85 --without-authdaemond \
86 --without-pwcheck \
87 --with-ipctype=unix \
88 --with-openssl="$(STAGING_DIR)/usr" \
89 --without-des \
90 --without-opie \
91 --without-ldap \
92 --without-mysql \
93 --without-pgsql \
94 --without-sqlite \
95 --without-rc4 \
96 --without-dmalloc \
97 --without-sfio \
98 );
99 endef
100
101 define Build/Compile
102 rm -rf $(PKG_INSTALL_DIR)
103 mkdir -p $(PKG_INSTALL_DIR)
104 $(MAKE) -C $(PKG_BUILD_DIR)/include \
105 CC="$(HOSTCC)" \
106 LINK="$(HOSTCC) -o makemd5 -lc" \
107 CFLAGS="" \
108 CPPFLAGS="" \
109 makemd5
110 $(MAKE) -C $(PKG_BUILD_DIR) \
111 DESTDIR="$(PKG_INSTALL_DIR)" \
112 all install
113 endef
114
115 define Package/libsasl2/install
116 install -m0755 -d $(1)/usr/lib/
117 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so.* $(1)/usr/lib/
118 install -m0755 -d $(1)/usr/lib/sasl2
119 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.so.* $(1)/usr/lib/sasl2/
120 endef
121
122 define Build/InstallDev
123 mkdir -p $(STAGING_DIR)/usr/include/
124 $(CP) $(PKG_INSTALL_DIR)/usr/include/sasl $(STAGING_DIR)/usr/include/
125 mkdir -p $(STAGING_DIR)/usr/lib/
126 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.{a,so*} $(STAGING_DIR)/usr/lib/
127 ln -sf libsasl2.a $(STAGING_DIR)/usr/lib/libsasl.a
128 ln -sf libsasl2.so $(STAGING_DIR)/usr/lib/libsasl.so
129 mkdir -p $(STAGING_DIR)/usr/lib/sasl2
130 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.{a,so*} $(STAGING_DIR)/usr/lib/sasl2/
131 endef
132
133 define Build/UninstallDev
134 rm -rf \
135 $(STAGING_DIR)/usr/include/sasl \
136 $(STAGING_DIR)/usr/lib/libsasl{2,}.{a,so*} \
137 $(STAGING_DIR)/usr/lib/sasl2
138 endef
139
140 $(eval $(call BuildPackage,libsasl2))