| 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= cyrus-sasl
|
|---|
| 10 | PKG_VERSION:= 2.1.20
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= 268ead27f4ac39bcfe17d9e38e0f2977
|
|---|
| 13 |
|
|---|
| 14 | PKG_SOURCE_URL:= http://ftp.andrew.cmu.edu/pub/cyrus-mail/
|
|---|
| 15 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| 16 |
|
|---|
| 17 | include $(TOPDIR)/mk/package.mk
|
|---|
| 18 |
|
|---|
| 19 | $(eval $(call PKG_template,LIBSASL2,libsasl2,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 20 |
|
|---|
| 21 | $(WRKBUILD)/.configured:
|
|---|
| 22 | (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 23 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 24 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 25 | CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
|
|---|
| 26 | LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
|
|---|
| 27 | ./configure \
|
|---|
| 28 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 29 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 30 | --build=$(GNU_HOST_NAME) \
|
|---|
| 31 | --program-prefix="" \
|
|---|
| 32 | --program-suffix="" \
|
|---|
| 33 | --prefix=/usr \
|
|---|
| 34 | --exec-prefix=/usr \
|
|---|
| 35 | --bindir=/usr/bin \
|
|---|
| 36 | --datadir=/usr/share \
|
|---|
| 37 | --includedir=/usr/include \
|
|---|
| 38 | --infodir=/usr/share/info \
|
|---|
| 39 | --libdir=/usr/lib \
|
|---|
| 40 | --libexecdir=/usr/lib \
|
|---|
| 41 | --localstatedir=/var \
|
|---|
| 42 | --mandir=/usr/share/man \
|
|---|
| 43 | --sbindir=/usr/sbin \
|
|---|
| 44 | --sysconfdir=/etc \
|
|---|
| 45 | --disable-nls \
|
|---|
| 46 | --enable-largefile \
|
|---|
| 47 | --enable-shared \
|
|---|
| 48 | --enable-static \
|
|---|
| 49 | --disable-sample \
|
|---|
| 50 | --enable-staticdlopen \
|
|---|
| 51 | --disable-java \
|
|---|
| 52 | --disable-alwaystrue \
|
|---|
| 53 | --disable-checkapop \
|
|---|
| 54 | --enable-cram \
|
|---|
| 55 | --enable-digest \
|
|---|
| 56 | --disable-otp \
|
|---|
| 57 | --disable-srp \
|
|---|
| 58 | --disable-srp-setpass \
|
|---|
| 59 | --disable-krb4 \
|
|---|
| 60 | --disable-gssapi \
|
|---|
| 61 | --disable-gss_mutexes \
|
|---|
| 62 | --enable-plain \
|
|---|
| 63 | --enable-anon \
|
|---|
| 64 | --disable-login \
|
|---|
| 65 | --disable-ntlm \
|
|---|
| 66 | --disable-sql \
|
|---|
| 67 | --with-dblib="none" \
|
|---|
| 68 | --without-gdbm \
|
|---|
| 69 | --with-devrandom="/dev/urandom" \
|
|---|
| 70 | --without-pam \
|
|---|
| 71 | --without-saslauthd \
|
|---|
| 72 | --without-authdaemond \
|
|---|
| 73 | --without-pwcheck \
|
|---|
| 74 | --with-ipctype=unix \
|
|---|
| 75 | --with-openssl="$(STAGING_DIR)/usr" \
|
|---|
| 76 | --without-des \
|
|---|
| 77 | --without-opie \
|
|---|
| 78 | --without-ldap \
|
|---|
| 79 | --without-mysql \
|
|---|
| 80 | --without-pgsql \
|
|---|
| 81 | --without-sqlite \
|
|---|
| 82 | --without-rc4 \
|
|---|
| 83 | --without-dmalloc \
|
|---|
| 84 | --without-sfio \
|
|---|
| 85 | );
|
|---|
| 86 | touch $@
|
|---|
| 87 |
|
|---|
| 88 | $(WRKBUILD)/.built:
|
|---|
| 89 | rm -rf $(WRKINST)
|
|---|
| 90 | mkdir -p $(WRKINST)
|
|---|
| 91 | $(MAKE) -C $(WRKBUILD)/include \
|
|---|
| 92 | CC="$(HOSTCC)" \
|
|---|
| 93 | LINK="$(HOSTCC) -o makemd5 -lc" \
|
|---|
| 94 | CFLAGS="" \
|
|---|
| 95 | makemd5
|
|---|
| 96 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 97 | DESTDIR="$(WRKINST)" \
|
|---|
| 98 | all install
|
|---|
| 99 | touch $@
|
|---|
| 100 |
|
|---|
| 101 | $(IPKG_LIBSASL2):
|
|---|
| 102 | install -m0755 -d $(IDIR_LIBSASL2)/usr/lib/
|
|---|
| 103 | $(CP) $(WRKINST)/usr/lib/libsasl2.so.* $(IDIR_LIBSASL2)/usr/lib/
|
|---|
| 104 | install -m0755 -d $(IDIR_LIBSASL2)/usr/lib/sasl2
|
|---|
| 105 | $(CP) $(WRKINST)/usr/lib/sasl2/lib*.so.* $(IDIR_LIBSASL2)/usr/lib/sasl2/
|
|---|
| 106 | $(RSTRIP) $(IDIR_LIBSASL2)
|
|---|
| 107 | $(IPKG_BUILD) $(IDIR_LIBSASL2) $(PACKAGE_DIR)
|
|---|
| 108 |
|
|---|
| 109 | $(STAGING_DIR)/usr/lib/libsasl2.so: $(WRKBUILD)/.built
|
|---|
| 110 | mkdir -p $(STAGING_DIR)/usr/include/
|
|---|
| 111 | $(CP) $(WRKINST)/usr/include/sasl $(STAGING_DIR)/usr/include/
|
|---|
| 112 | mkdir -p $(STAGING_DIR)/usr/lib/
|
|---|
| 113 | $(CP) $(WRKINST)/usr/lib/libsasl2.{a,so*} $(STAGING_DIR)/usr/lib/
|
|---|
| 114 | ln -sf libsasl2.a $(STAGING_DIR)/usr/lib/libsasl.a
|
|---|
| 115 | ln -sf libsasl2.so $(STAGING_DIR)/usr/lib/libsasl.so
|
|---|
| 116 | mkdir -p $(STAGING_DIR)/usr/lib/sasl2
|
|---|
| 117 | $(CP) $(WRKINST)/usr/lib/sasl2/lib*.{a,so*} $(STAGING_DIR)/usr/lib/sasl2/
|
|---|
| 118 |
|
|---|
| 119 | install-dev: $(STAGING_DIR)/usr/lib/libsasl2.so
|
|---|
| 120 |
|
|---|
| 121 | uninstall-dev:
|
|---|
| 122 | rm -rf $(STAGING_DIR)/usr/include/sasl
|
|---|
| 123 | rm -rf $(STAGING_DIR)/usr/lib/libsasl{2,}.{a,so*}
|
|---|
| 124 | rm -rf $(STAGING_DIR)/usr/lib/sasl2
|
|---|
| 125 |
|
|---|
| 126 | compile-targets: install-dev
|
|---|
| 127 | clean-targets: uninstall-dev
|
|---|