[packages] krb5: ensure linking against supplied libcom_err (#6508)
[openwrt/svn-archive/archive.git] / net / krb5 / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=krb5
4 PKG_VERSION:=1.7
5 PKG_RELEASE:=1
6
7 PKG_SOURCE:=krb5-$(PKG_VERSION)-signed.tar
8 PKG_SOURCE_URL:=http://web.mit.edu/kerberos/dist/krb5/1.7/
9 PKG_MD5SUM:=9f7b3402b4731a7fa543db193bf1b564
10
11 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
12
13 include $(INCLUDE_DIR)/package.mk
14
15 define Package/krb5/Default
16 SECTION:=net
17 CATAGORY:=Network
18 TITLE:=Kerberos
19 URL:=http://web.mit.edu/kerberos/
20 endef
21
22 define Package/krb5-libs
23 SECTION:=net
24 CATAGORY:=Network
25 TITLE:=Kerberos
26 DEPENDS:=+libncurses
27 TITLE:=Kerberos 5 Shared Libraries
28 URL:=http://web.mit.edu/kerberos/
29 endef
30
31 define Package/krb5-server
32 $(call Package/krb5/Default)
33 DEPENDS:=+krb5-libs
34 TITLE:=Kerberos 5 Server
35 endef
36
37 define Package/krb5-client
38 $(call Package/krb5/Default)
39 TITLE:=Kerberos 5 Client
40 endef
41
42 define Package/krb5-apps
43 $(call Package/krb5/Default)
44 TITLE:=Kerberized Network Applications
45 endef
46
47 define Package/krb5-daemons
48 $(call Package/krb5/Default)
49 TITLE:=Kerberized Network Daemons
50 endef
51
52 define Package/krb5/decription
53 Kerberos
54 endef
55
56 define Build/Prepare
57 # Krb5 tarball contains signature and a second tarball
58 # containing source code.
59 tar xf "$(DL_DIR)/$(PKG_SOURCE)" -C "$(BUILD_DIR)"
60 tar xzf "$(BUILD_DIR)/krb5-$(PKG_VERSION).tar.gz" -C "$(BUILD_DIR)"
61 patch -p1 -d "$(PKG_BUILD_DIR)" < "$(PATCH_DIR)/001-uclibc-symbol-collision-fix.patch"
62 patch -p1 -d "$(PKG_BUILD_DIR)" < "$(PATCH_DIR)/002-krb5kdc-dir-to-etc.patch"
63 patch -p1 -d "$(PKG_BUILD_DIR)" < "$(PATCH_DIR)/003-krb5kdc-com-err-fix.patch"
64 endef
65
66 CONFIGURE_PATH = ./src
67
68 CONFIGURE_VARS += \
69 cross_compiling=yes \
70 krb5_cv_attr_constructor_destructor=yes,yes \
71 ac_cv_func_regcomp=yes \
72 ac_cv_printf_positional=yes \
73 ac_cv_file__etc_environment=no \
74 ac_cv_file__etc_TIMEZONE=no
75
76 CONFIGURE_ARGS += \
77 --enable-thread-support \
78 --without-krb4 \
79 --without-tcl \
80 --disable-ipv6
81
82 define Build/Configure
83 $(call Build/Configure/Default)
84 endef
85
86 define Build/Compile
87 rm -rf "$(PKG_INSTALL_DIR)"
88 mkdir -p "$(PKG_INSTALL_DIR)"
89 $(MAKE) -C $(PKG_BUILD_DIR)/src \
90 DESTDIR="$(PKG_INSTALL_DIR)" \
91 CFLAGS="$(TARGET_CFLAGS)" \
92 CC="$(TARGET_CC)" \
93 all install
94 endef
95
96 define Package/krb5-libs/install
97 $(INSTALL_DIR) $(1)/usr/lib
98 $(INSTALL_DIR) $(1)/usr/lib/krb5
99 $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins
100 $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins/kdb
101 $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins/libkrb5
102 $(CP) $(PKG_INSTALL_DIR)/usr/lib/krb5/plugins/kdb/db2.so $(1)/usr/lib/krb5/plugins/kdb
103 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
104 endef
105
106 define Package/krb5-client/install
107 $(INSTALL_DIR) $(1)/usr/bin
108 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kdestroy $(1)/usr/bin
109 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kinit $(1)/usr/bin
110 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/klist $(1)/usr/bin
111 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kpasswd $(1)/usr/bin
112 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ksu $(1)/usr/bin
113 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kvno $(1)/usr/bin
114 $(INSTALL_DIR) $(1)/usr/sbin
115 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5-send-pr $(1)/usr/sbin
116 endef
117
118 define Package/krb5-server/install
119 $(INSTALL_DIR) $(1)/etc/init.d
120 $(INSTALL_BIN) ./files/krb5kdc $(1)/etc/init.d/krb5kdc
121 $(INSTALL_DIR) $(1)/usr/bin
122 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sclient $(1)/usr/bin
123 $(INSTALL_DIR) $(1)/usr/sbin
124 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmin.local $(1)/usr/sbin
125 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin
126 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdb5_util $(1)/usr/sbin
127 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdb5_util $(1)/usr/sbin
128 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin
129 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin
130 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5kdc $(1)/usr/sbin
131 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sim_server $(1)/usr/sbin
132 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sserver $(1)/usr/sbin
133 endef
134
135 define Package/krb5-apps/install
136 $(INSTALL_DIR) $(1)/usr/kerberos
137 $(INSTALL_DIR) $(1)/usr/kerberos/bin
138 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ftp $(1)/usr/kerberos/bin
139 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rcp $(1)/usr/kerberos/bin
140 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rlogin $(1)/usr/kerberos/bin
141 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rsh $(1)/usr/kerberos/bin
142 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/telnet $(1)/usr/kerberos/bin
143 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uuclient $(1)/usr/kerberos/bin
144 endef
145
146 define Package/krb5-daemons/install
147 $(INSTALL_DIR) $(1)/usr/kerberos/sbin
148 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ftpd $(1)/usr/kerberos/sbin
149 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/klogind $(1)/usr/kerberos/sbin
150 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/login.krb5 $(1)/usr/kerberos/sbin
151 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/telnetd $(1)/usr/kerberos/sbin
152 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/uuserver $(1)/usr/kerberos/sbin
153 endef
154
155 $(eval $(call BuildPackage,krb5-libs))
156 $(eval $(call BuildPackage,krb5-server))
157 $(eval $(call BuildPackage,krb5-client))
158 $(eval $(call BuildPackage,krb5-apps))
159 $(eval $(call BuildPackage,krb5-daemons))