Remove unused SOURCE_DIR variable
[openwrt.git] / openwrt / package / freeradius / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=freeradius
6 PKG_VERSION:=1.0.2
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=f5dfce4efbb03bbc47ceae08270a875e
9
10 PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/radius/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 define PKG_mod_template
20
21 $$(IPKG_$(1)):
22 install -d -m0755 $$(IDIR_$(1))/usr/lib/freeradius
23 for m in $(2); do \
24 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/freeradius/$$$${m}{,-*}.so \
25 $$(IDIR_$(1))/usr/lib/freeradius/ ; \
26 done
27 install -d -m0755 $$(IDIR_$(1))/etc/freeradius
28 for f in $(3); do \
29 cp -fpR $(PKG_INSTALL_DIR)/etc/freeradius/$$$${f} \
30 $$(IDIR_$(1))/etc/freeradius/ ; \
31 done
32 $(RSTRIP) $$(IDIR_$(1))
33 $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
34
35 endef
36
37 $(eval $(call PKG_template,FREERADIUS,freeradius,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
38 $(eval $(call PKG_template,FREERADIUS_DEMOCERTS,freeradius-democerts,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
39 $(eval $(call PKG_template,FREERADIUS_MOD_CHAP,freeradius-mod-chap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
40 $(eval $(call PKG_template,FREERADIUS_MOD_EAP,freeradius-mod-eap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
41 $(eval $(call PKG_template,FREERADIUS_MOD_EAP_GTC,freeradius-mod-eap-gtc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
42 $(eval $(call PKG_template,FREERADIUS_MOD_EAP_MD5,freeradius-mod-eap-md5,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
43 $(eval $(call PKG_template,FREERADIUS_MOD_EAP_MSCHAPV2,freeradius-mod-eap-mschapv2,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
44 $(eval $(call PKG_template,FREERADIUS_MOD_EAP_PEAP,freeradius-mod-eap-peap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
45 $(eval $(call PKG_template,FREERADIUS_MOD_EAP_TLS,freeradius-mod-eap-tls,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
46 $(eval $(call PKG_template,FREERADIUS_MOD_EAP_TTLS,freeradius-mod-eap-ttls,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
47 $(eval $(call PKG_template,FREERADIUS_MOD_FILES,freeradius-mod-files,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
48 $(eval $(call PKG_template,FREERADIUS_MOD_LDAP,freeradius-mod-ldap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
49 $(eval $(call PKG_template,FREERADIUS_MOD_MSCHAP,freeradius-mod-mschap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
50 $(eval $(call PKG_template,FREERADIUS_MOD_PAP,freeradius-mod-pap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
51 $(eval $(call PKG_template,FREERADIUS_MOD_SQL,freeradius-mod-sql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
52 $(eval $(call PKG_template,FREERADIUS_MOD_SQL_MYSQL,freeradius-mod-sql-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
53 $(eval $(call PKG_template,FREERADIUS_MOD_SQL_PGSQL,freeradius-mod-sql-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
54 $(eval $(call PKG_template,FREERADIUS_UTILS,freeradius-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
55
56 $(eval $(call PKG_mod_template,FREERADIUS_MOD_CHAP,rlm_chap,))
57 $(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP,libeap rlm_eap,eap.conf))
58 $(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_GTC,rlm_eap_gtc,))
59 $(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_MD5,rlm_eap_md5,))
60 $(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_MSCHAPV2,rlm_eap_mschapv2,))
61 $(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_PEAP,rlm_eap_peap,))
62 $(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_TLS,rlm_eap_tls,))
63 $(eval $(call PKG_mod_template,FREERADIUS_MOD_EAP_TTLS,rlm_eap_ttls,))
64 $(eval $(call PKG_mod_template,FREERADIUS_MOD_FILES,rlm_files,acct_users preproxy_users users))
65 $(eval $(call PKG_mod_template,FREERADIUS_MOD_LDAP,rlm_ldap,ldap.attrmap))
66 $(eval $(call PKG_mod_template,FREERADIUS_MOD_MSCHAP,rlm_mschap,))
67 $(eval $(call PKG_mod_template,FREERADIUS_MOD_PAP,rlm_pap,))
68 $(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL,rlm_sql,sql.conf))
69 $(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL_MYSQL,rlm_sql_mysql,))
70 $(eval $(call PKG_mod_template,FREERADIUS_MOD_SQL_PGSQL,rlm_sql_postgresql,))
71
72 $(PKG_BUILD_DIR)/.configured:
73 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
74 $(TARGET_CONFIGURE_OPTS) \
75 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
76 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
77 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(PKG_INSTALL_DIR)/usr/lib/freeradius" \
78 lt_sys_lib_search_path_spec="$(STAGING_DIR)/usr/lib" \
79 MYSQL_CONFIG="no" \
80 ./configure \
81 --target=$(GNU_TARGET_NAME) \
82 --host=$(GNU_TARGET_NAME) \
83 --build=$(GNU_HOST_NAME) \
84 --program-prefix="" \
85 --program-suffix="" \
86 --prefix=/usr \
87 --exec-prefix=/usr \
88 --bindir=/usr/bin \
89 --datadir=/usr/share \
90 --includedir=/usr/include \
91 --infodir=/usr/share/info \
92 --libdir=/usr/lib/freeradius \
93 --libexecdir=/usr/lib/freeradius \
94 --localstatedir=/var \
95 --mandir=/usr/share/man \
96 --sbindir=/usr/sbin \
97 --sysconfdir=/etc \
98 $(DISABLE_LARGEFILE) \
99 $(DISABLE_NLS) \
100 --enable-shared \
101 --disable-static \
102 --disable-ltdl-install \
103 --with-ltdl-include="$(STAGING_DIR)/usr/include" \
104 --with-ltdl-lib="$(STAGING_DIR)/usr/lib" \
105 --with-openssl-includes="$(STAGING_DIR)/usr/include" \
106 --with-openssl-libraries="$(STAGING_DIR)/usr/lib" \
107 --enable-strict-dependencies \
108 --with-raddbdir=/etc/freeradius \
109 --without-edir \
110 --without-snmp \
111 --without-rlm_attr-rewrite \
112 --with-rlm_checkval \
113 --without-rlm_counter \
114 --without-rlm_dbm \
115 --with-rlm_eap \
116 --without-rlm_eap_sim \
117 --with-rlm_files \
118 --without-rlm_ippool \
119 --without-rlm_krb5 \
120 --with-rlm_ldap-include-dir="$(STAGING_DIR)/usr/include" \
121 --with-rlm_ldap-lib-dir="$(STAGING_DIR)/usr/lib" \
122 --without-rlm_pam \
123 --without-rlm_radutmp \
124 --without-rlm_sql_iodbc \
125 --with-mysql-include-dir="$(STAGING_DIR)/usr/include/mysql" \
126 --with-mysql-lib-dir="$(STAGING_DIR)/usr/lib/mysql" \
127 --without-rlm_sql_oracle \
128 --with-rlm_sql_postgresql-include-dir="$(STAGING_DIR)/usr/include" \
129 --with-rlm_sql_postgresql-lib-dir="$(STAGING_DIR)/usr/lib" \
130 --without-rlm_sql_unixodbc \
131 --without-rlm_unix \
132 --without-rlm_x99-token \
133 )
134 touch $@
135
136 $(PKG_BUILD_DIR)/.built:
137 rm -rf $(PKG_INSTALL_DIR)
138 mkdir -p $(PKG_INSTALL_DIR)
139 $(MAKE) -C $(PKG_BUILD_DIR) \
140 R="$(PKG_INSTALL_DIR)" \
141 INSTALLSTRIP="" \
142 all install
143 touch $@
144
145 $(IPKG_FREERADIUS):
146 install -m0755 -d $(IDIR_FREERADIUS)/etc/init.d
147 install -m0755 ./files/radiusd.init $(IDIR_FREERADIUS)/etc/init.d/radiusd
148 install -m0755 -d $(IDIR_FREERADIUS)/etc/freeradius
149 for f in clients.conf dictionary radiusd.conf; do \
150 cp -fpR $(PKG_INSTALL_DIR)/etc/freeradius/$${f} \
151 $(IDIR_FREERADIUS)/etc/freeradius/ ; \
152 done
153 install -m0755 -d $(IDIR_FREERADIUS)/usr/share/freeradius
154 cp -fpR $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary \
155 $(IDIR_FREERADIUS)/usr/share/freeradius/
156 for f in cisco freeradius microsoft tunnel wispr; do \
157 cp -fpR $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary.$${f} \
158 $(IDIR_FREERADIUS)/usr/share/freeradius/ ; \
159 done
160 install -m0755 -d $(IDIR_FREERADIUS)/usr/lib/freeradius
161 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/freeradius/libradius{,-*}.so \
162 $(IDIR_FREERADIUS)/usr/lib/freeradius/
163 install -m0755 -d $(IDIR_FREERADIUS)/usr/sbin
164 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/radiusd \
165 $(IDIR_FREERADIUS)/usr/sbin/
166 $(RSTRIP) $(IDIR_FREERADIUS)
167 $(IPKG_BUILD) $(IDIR_FREERADIUS) $(PACKAGE_DIR)
168
169 $(IPKG_FREERADIUS_DEMOCERTS):
170 install -m0755 -d $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius
171 cp -fpR $(PKG_INSTALL_DIR)/etc/freeradius/certs \
172 $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/
173 rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/README
174 rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/new*
175 rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/demoCA/index*
176 rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/demoCA/serial*
177 $(RSTRIP) $(IDIR_FREERADIUS_DEMOCERTS)
178 $(IPKG_BUILD) $(IDIR_FREERADIUS_DEMOCERTS) $(PACKAGE_DIR)
179
180 $(IPKG_FREERADIUS_UTILS):
181 install -m0755 -d $(IDIR_FREERADIUS_UTILS)/usr/bin
182 for f in radclient radeapclient; do \
183 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/$${f} \
184 $(IDIR_FREERADIUS_UTILS)/usr/bin/ ; \
185 done
186 $(RSTRIP) $(IDIR_FREERADIUS_UTILS)
187 $(IPKG_BUILD) $(IDIR_FREERADIUS_UTILS) $(PACKAGE_DIR)
188
This page took 0.050722 seconds and 5 git commands to generate.