treewide: refactor to use PKG_BUILD_FLAGS:=no-mips16
[feed/packages.git] / net / krb5 / Makefile
1 #
2 # Copyright (C) 2009-2015 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:=krb5
11 PKG_VERSION:=1.20.1
12 PKG_RELEASE:=1
13
14 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
15
16 PKG_LICENSE:=MIT
17 PKG_LICENSE_FILES:=NOTICE
18 PKG_CPE_ID:=cpe:/a:mit:kerberos
19
20 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
21 PKG_SOURCE_URL:=https://web.mit.edu/kerberos/dist/krb5/1.20
22 PKG_HASH:=704aed49b19eb5a7178b34b2873620ec299db08752d6a8574f95d41879ab8851
23
24 PKG_BUILD_PARALLEL:=1
25 PKG_INSTALL:=1
26 PKG_BUILD_FLAGS:=no-mips16
27
28 include $(INCLUDE_DIR)/package.mk
29
30 MAKE_PATH:=src
31
32 define Package/krb5/Default
33 SECTION:=net
34 CATEGORY:=Network
35 TITLE:=Kerberos
36 URL:=https://web.mit.edu/kerberos/
37 endef
38
39 define Package/krb5-libs
40 SECTION:=net
41 CATEGORY:=Network
42 TITLE:=Kerberos
43 DEPENDS:=+libncurses +libss +libcomerr
44 TITLE:=Kerberos 5 Shared Libraries
45 URL:=http://web.mit.edu/kerberos/
46 endef
47
48 define Package/krb5-server
49 $(call Package/krb5/Default)
50 DEPENDS:=+krb5-libs +libpthread
51 TITLE:=Kerberos 5 Server
52 endef
53
54 define Package/krb5-server-extras
55 $(call Package/krb5/Default)
56 DEPENDS:=+krb5-libs +libpthread
57 TITLE:=Kerberos 5 Admin Server
58 endef
59
60 define Package/krb5-client
61 $(call Package/krb5/Default)
62 DEPENDS:=+krb5-libs
63 TITLE:=Kerberos 5 Client
64 endef
65
66 define Package/krb5/description
67 Kerberos is a network authentication protocol.
68 It is designed to provide strong authentication for client/server applications by using secret-key cryptography.
69 endef
70
71 CONFIGURE_PATH = ./src
72
73 CONFIGURE_VARS += \
74 cross_compiling=yes \
75 krb5_cv_attr_constructor_destructor=yes,yes \
76 krb5_cv_sys_rcdir=/tmp \
77 ac_cv_func_regcomp=yes \
78 ac_cv_printf_positional=yes \
79 ac_cv_file__etc_environment=no \
80 ac_cv_file__etc_TIMEZONE=no \
81 ac_cv_header_keyutils_h=no
82
83 CONFIGURE_ARGS += \
84 --localstatedir=/etc \
85 --with-system-ss \
86 --with-system-et \
87 --without-system-verto \
88 --without-tcl \
89 --without-tls-impl \
90 --without-libedit \
91 --without-readline \
92 --disable-rpath \
93 --disable-pkinit \
94 --with-size-optimizations \
95 --with-crypto-impl=builtin
96
97 define Build/InstallDev
98 $(INSTALL_DIR) $(1)/usr/include
99 $(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr
100 $(INSTALL_DIR) $(1)/usr
101 $(CP) $(PKG_INSTALL_DIR)/usr/lib $(1)/usr
102 # needed for samba4, to detect system-krb5
103 $(INSTALL_DIR) $(1)/usr/bin
104 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/krb5-config $(1)/usr/bin
105 $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/krb5-config
106 $(INSTALL_DIR) $(2)/bin
107 $(LN) ../../usr/bin/krb5-config $(2)/bin/krb5-config
108 endef
109
110 define Package/krb5-libs/install
111 $(INSTALL_DIR) $(1)/usr/lib
112 $(INSTALL_DIR) $(1)/usr/lib/krb5
113 $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins
114 $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins/kdb
115 $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins/libkrb5
116 $(CP) $(PKG_INSTALL_DIR)/usr/lib/krb5/plugins/kdb/db2.so $(1)/usr/lib/krb5/plugins/kdb
117 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
118 endef
119
120 define Package/krb5-client/install
121 $(INSTALL_DIR) $(1)/usr/bin
122 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kdestroy $(1)/usr/bin
123 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kinit $(1)/usr/bin
124 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/klist $(1)/usr/bin
125 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kpasswd $(1)/usr/bin
126 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ksu $(1)/usr/bin
127 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kvno $(1)/usr/bin
128 $(INSTALL_DIR) $(1)/usr/sbin
129 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5-send-pr $(1)/usr/sbin
130 endef
131
132 # Removed some server-side software to reduce package size. This should be
133 # put in a separate package if needed.
134 define Package/krb5-server/install
135 $(INSTALL_DIR) $(1)/etc/init.d
136 $(INSTALL_BIN) ./files/krb5kdc $(1)/etc/init.d/krb5kdc
137 $(INSTALL_DIR) $(1)/usr/sbin
138 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmin.local $(1)/usr/sbin
139 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdb5_util $(1)/usr/sbin
140 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5kdc $(1)/usr/sbin
141 endef
142
143 define Package/krb5-server-extras/install
144 $(INSTALL_DIR) $(1)/usr/sbin
145 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin
146 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin
147 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin
148 endef
149
150 define Package/krb5-server/postinst
151 mkdir -p $${IPKG_INSTROOT}/etc/krb5kdc
152 touch $${IPKG_INSTROOT}/etc/krb5kdc/kadm5.acl
153 endef
154
155 $(eval $(call BuildPackage,krb5-libs))
156 $(eval $(call BuildPackage,krb5-server))
157 $(eval $(call BuildPackage,krb5-server-extras))
158 $(eval $(call BuildPackage,krb5-client))