abdae6150e8433675acc1a0a757f372362eee699
[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 endef
63
64 CONFIGURE_PATH = ./src
65
66 CONFIGURE_VARS += \
67 cross_compiling=yes \
68 krb5_cv_attr_constructor_destructor=yes,yes \
69 ac_cv_func_regcomp=yes \
70 ac_cv_printf_positional=yes \
71 ac_cv_file__etc_environment=no \
72 ac_cv_file__etc_TIMEZONE=no
73
74 CONFIGURE_ARGS += \
75 --enable-thread-support \
76 --without-krb4 \
77 --without-tcl \
78 --disable-ipv6
79
80 define Build/Configure
81 $(call Build/Configure/Default)
82 endef
83
84 define Build/Compile
85 rm -rf "$(PKG_INSTALL_DIR)"
86 mkdir -p "$(PKG_INSTALL_DIR)"
87 $(MAKE) -C $(PKG_BUILD_DIR)/src \
88 DESTDIR="$(PKG_INSTALL_DIR)" \
89 CFLAGS="$(TARGET_CFLAGS)" \
90 CC="$(TARGET_CC)" \
91 all install
92 endef
93
94 define Package/krb5-libs/install
95 $(INSTALL_DIR) $(1)/usr/lib
96 $(INSTALL_DIR) $(1)/usr/lib/krb5
97 $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins
98 $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins/kdb
99 $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins/libkrb5
100 $(CP) $(PKG_INSTALL_DIR)/usr/lib/krb5/plugins/kdb/db2.so $(1)/usr/lib/krb5/plugins/kdb
101 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
102 endef
103
104 define Package/krb5-client/install
105 $(INSTALL_DIR) $(1)/usr/bin
106 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kdestroy $(1)/usr/bin
107 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kinit $(1)/usr/bin
108 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/klist $(1)/usr/bin
109 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kpasswd $(1)/usr/bin
110 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ksu $(1)/usr/bin
111 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kvno $(1)/usr/bin
112 $(INSTALL_DIR) $(1)/usr/sbin
113 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5-send-pr $(1)/usr/sbin
114 endef
115
116 define Package/krb5-server/install
117 $(INSTALL_DIR) $(1)/etc/init.d
118 $(INSTALL_BIN) ./files/krb5kdc $(1)/etc/init.d/krb5kdc
119 $(INSTALL_DIR) $(1)/usr/bin
120 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sclient $(1)/usr/bin
121 $(INSTALL_DIR) $(1)/usr/sbin
122 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmin.local $(1)/usr/sbin
123 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin
124 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdb5_util $(1)/usr/sbin
125 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdb5_util $(1)/usr/sbin
126 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin
127 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin
128 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5kdc $(1)/usr/sbin
129 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sim_server $(1)/usr/sbin
130 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sserver $(1)/usr/sbin
131 endef
132
133 define Package/krb5-apps/install
134 $(INSTALL_DIR) $(1)/usr/kerberos
135 $(INSTALL_DIR) $(1)/usr/kerberos/bin
136 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ftp $(1)/usr/kerberos/bin
137 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rcp $(1)/usr/kerberos/bin
138 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rlogin $(1)/usr/kerberos/bin
139 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rsh $(1)/usr/kerberos/bin
140 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/telnet $(1)/usr/kerberos/bin
141 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uuclient $(1)/usr/kerberos/bin
142 endef
143
144 define Package/krb5-daemons/install
145 $(INSTALL_DIR) $(1)/usr/kerberos/sbin
146 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ftpd $(1)/usr/kerberos/sbin
147 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/klogind $(1)/usr/kerberos/sbin
148 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/login.krb5 $(1)/usr/kerberos/sbin
149 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/telnetd $(1)/usr/kerberos/sbin
150 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/uuserver $(1)/usr/kerberos/sbin
151 endef
152
153 $(eval $(call BuildPackage,krb5-libs))
154 $(eval $(call BuildPackage,krb5-server))
155 $(eval $(call BuildPackage,krb5-client))
156 $(eval $(call BuildPackage,krb5-apps))
157 $(eval $(call BuildPackage,krb5-daemons))