| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2006-2014 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.28 |
| 12 | PKG_RELEASE:=3 |
| 13 | |
| 14 | PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> |
| 15 | |
| 16 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 17 | PKG_SOURCE_URL:=https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-2.1.28/ |
| 18 | PKG_HASH:=7ccfc6abd01ed67c1a0924b353e526f1b766b21f42d4562ee635a8ebfc5bb38c |
| 19 | |
| 20 | PKG_LICENSE:=BSD-4c BSD |
| 21 | PKG_LICENSE_FILES:=COPYING cmulocal/COPYING saslauthd/COPYING |
| 22 | PKG_CPE_ID:=cpe:/a:cmu:cyrus-sasl |
| 23 | |
| 24 | PKG_FIXUP:=autoreconf |
| 25 | PKG_MACRO_PATHS:=cmulocal config ../cmulocal ../config |
| 26 | PKG_AUTOMAKE_PATHS:=. saslauthd sasldb |
| 27 | PKG_REMOVE_FILES:=aclocal.m4 saslauthd/aclocal.m4 config/libtool.m4 |
| 28 | |
| 29 | include $(INCLUDE_DIR)/package.mk |
| 30 | |
| 31 | define Package/libsasl2/Default |
| 32 | SECTION:=libs |
| 33 | CATEGORY:=Libraries |
| 34 | TITLE:=A general purpose authentication library |
| 35 | URL:=http://asg.web.cmu.edu/sasl/ |
| 36 | endef |
| 37 | |
| 38 | define Package/libsasl2 |
| 39 | $(call Package/libsasl2/Default) |
| 40 | DEPENDS:=+libopenssl |
| 41 | TITLE+= (libraries) |
| 42 | endef |
| 43 | |
| 44 | define Package/libsasl2-sasldb |
| 45 | $(call Package/libsasl2/Default) |
| 46 | DEPENDS:=+libsasl2 +libdb47 |
| 47 | TITLE+= (sasldb libraries) |
| 48 | endef |
| 49 | |
| 50 | define Package/libsasl2-utils |
| 51 | $(call Package/libsasl2/Default) |
| 52 | DEPENDS:=+libsasl2 +libdb47 |
| 53 | TITLE+= (sasldb utilities) |
| 54 | endef |
| 55 | |
| 56 | TARGET_CFLAGS += $(FPIC) |
| 57 | CONFIGURE_ARGS += \ |
| 58 | --enable-shared \ |
| 59 | --enable-static \ |
| 60 | --disable-sample \ |
| 61 | --enable-staticdlopen \ |
| 62 | --disable-java \ |
| 63 | --disable-alwaystrue \ |
| 64 | --disable-checkapop \ |
| 65 | --enable-cram \ |
| 66 | --enable-digest \ |
| 67 | --enable-auth-sasldb \ |
| 68 | --disable-otp \ |
| 69 | --disable-srp \ |
| 70 | --disable-srp-setpass \ |
| 71 | --disable-krb4 \ |
| 72 | --disable-gssapi \ |
| 73 | --disable-gss_mutexes \ |
| 74 | --enable-plain \ |
| 75 | --enable-anon \ |
| 76 | --disable-login \ |
| 77 | --disable-ntlm \ |
| 78 | --disable-sql \ |
| 79 | --disable-ldapdb \ |
| 80 | --with-dblib=berkeley \ |
| 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 | --disable-sample |
| 99 | |
| 100 | define Build/Compile |
| 101 | $(MAKE) -C $(PKG_BUILD_DIR)/include \ |
| 102 | CC="$(HOSTCC)" \ |
| 103 | LINK="$(HOSTCC) -o makemd5 -lc" \ |
| 104 | CFLAGS="" \ |
| 105 | CPPFLAGS="" \ |
| 106 | makemd5 |
| 107 | $(MAKE) -C $(PKG_BUILD_DIR) \ |
| 108 | DESTDIR="$(PKG_INSTALL_DIR)" \ |
| 109 | all install |
| 110 | endef |
| 111 | |
| 112 | define Build/InstallDev |
| 113 | $(INSTALL_DIR) $(1)/usr/include/ |
| 114 | $(CP) $(PKG_INSTALL_DIR)/usr/include/sasl $(1)/usr/include/ |
| 115 | $(INSTALL_DIR) $(1)/usr/lib/ |
| 116 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.{a,so*} $(1)/usr/lib/ |
| 117 | ln -sf libsasl2.a $(1)/usr/lib/libsasl.a |
| 118 | ln -sf libsasl2.so $(1)/usr/lib/libsasl.so |
| 119 | $(INSTALL_DIR) $(1)/usr/lib/sasl2 |
| 120 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.{a,so*} $(1)/usr/lib/sasl2/ |
| 121 | $(INSTALL_DIR) $(1)/usr/lib/pkgconfig |
| 122 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsasl2.pc $(1)/usr/lib/pkgconfig/ |
| 123 | endef |
| 124 | |
| 125 | define Package/libsasl2/install |
| 126 | $(INSTALL_DIR) $(1)/usr/lib/ |
| 127 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so.* $(1)/usr/lib/ |
| 128 | $(INSTALL_DIR) $(1)/usr/lib/sasl2 |
| 129 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/libanonymous.so* $(1)/usr/lib/sasl2/ |
| 130 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/libplain.so* $(1)/usr/lib/sasl2/ |
| 131 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/libcrammd5.so* $(1)/usr/lib/sasl2/ |
| 132 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/libdigestmd5.so* $(1)/usr/lib/sasl2/ |
| 133 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/libscram.so* $(1)/usr/lib/sasl2/ |
| 134 | endef |
| 135 | |
| 136 | define Package/libsasl2-sasldb/install |
| 137 | $(INSTALL_DIR) $(1)/usr/lib/sasl2 |
| 138 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/libsasldb.so* $(1)/usr/lib/sasl2/ |
| 139 | endef |
| 140 | |
| 141 | define Package/libsasl2-utils/install |
| 142 | $(INSTALL_DIR) $(1)/usr/sbin/ |
| 143 | $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{pluginviewer,sasldblistusers2,saslpasswd2} $(1)/usr/sbin/ |
| 144 | endef |
| 145 | |
| 146 | $(eval $(call BuildPackage,libsasl2)) |
| 147 | $(eval $(call BuildPackage,libsasl2-sasldb)) |
| 148 | $(eval $(call BuildPackage,libsasl2-utils)) |