[package] stage krb5 headers and libs
[openwrt/svn-archive/archive.git] / net / krb5 / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=krb5
4 PKG_VERSION:=1.8
5 PKG_RELEASE:=1
6
7 PKG_SOURCE:=krb5-$(PKG_VERSION)-signed.tar
8 PKG_SOURCE_URL:=http://web.mit.edu/kerberos/dist/krb5/$(PKG_VERSION)/
9 PKG_MD5SUM:=74257d68373a8df8b9391fc093d594be
10
11 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
12
13 PKG_BUILD_PARALLEL:=1
14 PKG_INSTALL:=1
15
16 include $(INCLUDE_DIR)/package.mk
17
18 MAKE_PATH:=src
19
20 define Package/krb5/Default
21 SECTION:=net
22 CATAGORY:=Network
23 TITLE:=Kerberos
24 URL:=http://web.mit.edu/kerberos/
25 endef
26
27 define Package/krb5-libs
28 SECTION:=net
29 CATAGORY:=Network
30 TITLE:=Kerberos
31 DEPENDS:=+libncurses
32 TITLE:=Kerberos 5 Shared Libraries
33 URL:=http://web.mit.edu/kerberos/
34 endef
35
36 define Package/krb5-server
37 $(call Package/krb5/Default)
38 DEPENDS:=+krb5-libs +libpthread
39 TITLE:=Kerberos 5 Server
40 endef
41
42 define Package/krb5-client
43 $(call Package/krb5/Default)
44 TITLE:=Kerberos 5 Client
45 endef
46
47 define Package/krb5/decription
48 Kerberos
49 endef
50
51 define Build/Prepare
52 # Krb5 tarball contains signature and a second tarball
53 # containing source code.
54 tar xf "$(DL_DIR)/$(PKG_SOURCE)" -C "$(BUILD_DIR)"
55 tar xzf "$(BUILD_DIR)/krb5-$(PKG_VERSION).tar.gz" -C "$(BUILD_DIR)"
56 patch -p1 -d "$(PKG_BUILD_DIR)" < "$(PATCH_DIR)/001-krb5kdc-dir-to-etc.patch"
57 endef
58
59 CONFIGURE_PATH = ./src
60
61 CONFIGURE_VARS += \
62 cross_compiling=yes \
63 krb5_cv_attr_constructor_destructor=yes,yes \
64 ac_cv_func_regcomp=yes \
65 ac_cv_printf_positional=yes \
66 ac_cv_file__etc_environment=no \
67 ac_cv_file__etc_TIMEZONE=no
68
69 CONFIGURE_ARGS += \
70 --enable-thread-support \
71 --without-krb4 \
72 --without-tcl \
73 --disable-ipv6
74
75 define Build/InstallDev
76 $(INSTALL_DIR) $(1)/usr
77 $(CP) \
78 $(PKG_INSTALL_DIR)/usr/include \
79 $(PKG_INSTALL_DIR)/usr/lib \
80 $(1)/usr/
81 endef
82
83 define Package/krb5-libs/install
84 $(INSTALL_DIR) $(1)/usr/lib
85 $(INSTALL_DIR) $(1)/usr/lib/krb5
86 $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins
87 $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins/kdb
88 $(INSTALL_DIR) $(1)/usr/lib/krb5/plugins/libkrb5
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/krb5/plugins/kdb/db2.so $(1)/usr/lib/krb5/plugins/kdb
90 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
91 endef
92
93 define Package/krb5-client/install
94 $(INSTALL_DIR) $(1)/usr/bin
95 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kdestroy $(1)/usr/bin
96 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kinit $(1)/usr/bin
97 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/klist $(1)/usr/bin
98 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kpasswd $(1)/usr/bin
99 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ksu $(1)/usr/bin
100 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kvno $(1)/usr/bin
101 $(INSTALL_DIR) $(1)/usr/sbin
102 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5-send-pr $(1)/usr/sbin
103 endef
104
105 define Package/krb5-server/install
106 $(INSTALL_DIR) $(1)/etc/init.d
107 $(INSTALL_BIN) ./files/krb5kdc $(1)/etc/init.d/krb5kdc
108 $(INSTALL_DIR) $(1)/usr/bin
109 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sclient $(1)/usr/bin
110 $(INSTALL_DIR) $(1)/usr/sbin
111 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmin.local $(1)/usr/sbin
112 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin
113 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdb5_util $(1)/usr/sbin
114 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdb5_util $(1)/usr/sbin
115 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin
116 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin
117 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5kdc $(1)/usr/sbin
118 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sim_server $(1)/usr/sbin
119 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sserver $(1)/usr/sbin
120 endef
121
122 $(eval $(call BuildPackage,krb5-libs))
123 $(eval $(call BuildPackage,krb5-server))
124 $(eval $(call BuildPackage,krb5-client))