| 1 |
|
| 2 |
abs_srcdir = $(shell cd $(srcdir) && pwd)
|
| 3 |
EXTRA_INSTALL_HOOKS =
|
| 4 |
EXTRA_UNINSTALL_HOOKS =
|
| 5 |
EXTRA_CLEAN_HOOKS =
|
| 6 |
|
| 7 |
PPFLAGS =
|
| 8 |
|
| 9 |
AUTOMAKE_OPTIONS = foreign
|
| 10 |
|
| 11 |
# The directories that we install into
|
| 12 |
scriptdir = $(datadir)/php
|
| 13 |
|
| 14 |
# installed PHP scripts, also used as documentation source
|
| 15 |
dist_script_DATA = scripts/vasapi.php \
|
| 16 |
scripts/vas_gss.php \
|
| 17 |
scripts/vas_ldap.php \
|
| 18 |
scripts/vas.php
|
| 19 |
|
| 20 |
# the vas.so module is simply put in the datadir
|
| 21 |
data_DATA = extension/vas.so
|
| 22 |
#-- note: don't use a _SOURCES var here because its only intended for
|
| 23 |
# PROGRAMS, LIBRARIES and LT_LIBRARIES.
|
| 24 |
vas_so_sources = extension/vasapi.c \
|
| 25 |
extension/php_vas.h
|
| 26 |
|
| 27 |
#-- Some explicit rules to build the vas.so extension using phpize
|
| 28 |
extension/configure: extension/config.m4
|
| 29 |
if test ! -d extension; then \
|
| 30 |
mkdir -p extension; \
|
| 31 |
touch extension/.linked; \
|
| 32 |
ln -s $(abs_srcdir)/extension/config.m4 extension/config.m4; \
|
| 33 |
ln -s $(abs_srcdir)/extension/vasapi.c extension/vasapi.c; \
|
| 34 |
fi
|
| 35 |
cd extension && $(PHPIZE)
|
| 36 |
extension/Makefile: extension/configure
|
| 37 |
cd extension && ./configure CPPFLAGS=-I$(abs_srcdir)/extension
|
| 38 |
extension/vas.so: extension/Makefile $(vas_so_sources)
|
| 39 |
cd extension && $(MAKE)
|
| 40 |
cp extension/modules/vas.so $@
|
| 41 |
|
| 42 |
clean-vas_so:
|
| 43 |
-cd extension && $(MAKE) clean
|
| 44 |
-cd extension && $(PHPIZE) --clean
|
| 45 |
-rm -rf extension/vas.so extension/autom4te.cache
|
| 46 |
-if [ -f extension/.linked ]; then \
|
| 47 |
rm extension/config.m4 extension/vasapi.c extension/.linked; \
|
| 48 |
rmdir extension; \
|
| 49 |
fi
|
| 50 |
|
| 51 |
EXTRA_DIST = $(vas_so_sources) \
|
| 52 |
extension/config.m4 \
|
| 53 |
LICENCE NEWS README \
|
| 54 |
doxvas.in
|
| 55 |
|
| 56 |
if HAVE_DOXYGEN
|
| 57 |
#------------------------------------------------------------------------------
|
| 58 |
# Create the documentation, html and man pages, in the doc subdirectory.
|
| 59 |
#------------------------------------------------------------------------------
|
| 60 |
|
| 61 |
PPFLAGS += docdir=$(docdir)
|
| 62 |
|
| 63 |
doc/html/index.html: $(script_DATA) doxvas
|
| 64 |
$(DOXYGEN) doxvas
|
| 65 |
doxvas: doxvas.in
|
| 66 |
sed -e 's,[@]srcdir[@],$(srcdir),g' < $(srcdir)/doxvas.in > $@
|
| 67 |
install-doc: doc/html/index.html
|
| 68 |
$(install_sh) -d $(DESTDIR)$(docdir)
|
| 69 |
cp -r doc/* $(DESTDIR)$(docdir)/
|
| 70 |
uninstall-doc:
|
| 71 |
rm -rf $(DESTDIR)$(docdir)
|
| 72 |
clean-doc:
|
| 73 |
-rm -rf doc doxvas
|
| 74 |
|
| 75 |
EXTRA_INSTALL_HOOKS += install-doc
|
| 76 |
EXTRA_UNINSTALL_HOOKS += uninstall-doc
|
| 77 |
EXTRA_CLEAN_HOOKS += clean-doc
|
| 78 |
endif
|
| 79 |
|
| 80 |
uninstall-local: $(EXTRA_UNINSTALL_HOOKS)
|
| 81 |
install-data-local: $(EXTRA_INSTALL_HOOKS)
|
| 82 |
clean-local: clean-vas_so $(EXTRA_CLEAN_HOOKS)
|
| 83 |
|
| 84 |
#------------------------------------------------------------------------------
|
| 85 |
# This is for Polypkg...
|
| 86 |
#------------------------------------------------------------------------------
|
| 87 |
package:
|
| 88 |
$(MAKE) install DESTDIR=$$PWD/pkgroot
|
| 89 |
$(srcdir)/pp --destdir=$$PWD/pkgroot $(srcdir)/php-vas.pp \
|
| 90 |
version=$(VERSION) \
|
| 91 |
scriptdir=$(scriptdir) \
|
| 92 |
datadir=$(datadir) \
|
| 93 |
$(PPFLAGS)
|
| 94 |
|
| 95 |
EXTRA_DIST += pp php-vas.pp
|
| 96 |
|
| 97 |
#------------------------------------------------------------------------------
|
| 98 |
# Tests
|
| 99 |
#------------------------------------------------------------------------------
|
| 100 |
|
| 101 |
TESTS_ENVIRONMENT= EXTDIR=$$PWD/extension \
|
| 102 |
INCPATH=$(srcdir)/tests:$(srcdir)/scripts \
|
| 103 |
$(SHELL) $(srcdir)/tests/driver -f
|
| 104 |
|
| 105 |
EXTRA_DIST += tests/driver tests/driver.php \
|
| 106 |
tests/test.php tests/checkAttribute.php
|
| 107 |
|
| 108 |
TESTS = \
|
| 109 |
tests/t_vas_ctx_alloc.php \
|
| 110 |
tests/t_vas_ctx_set_option.php \
|
| 111 |
tests/t_vas_ctx_get_option.php \
|
| 112 |
tests/t_vas_id_alloc.php \
|
| 113 |
tests/t_vas_id_get_ccache_name.php \
|
| 114 |
tests/t_vas_id_get_keytab_name.php \
|
| 115 |
tests/t_vas_id_get_name.php \
|
| 116 |
tests/t_vas_id_get_user.php \
|
| 117 |
tests/t_vas_id_is_cred_established.php \
|
| 118 |
tests/t_vas_id_establish_cred_password.php \
|
| 119 |
tests/t_vas_id_establish_cred_keytab.php \
|
| 120 |
tests/t_vas_id_renew_cred.php \
|
| 121 |
tests/t_vas_auth.php \
|
| 122 |
tests/t_vas_auth_with_password.php \
|
| 123 |
tests/t_vas_auth_check_client_membership.php \
|
| 124 |
tests/t_vas_auth_get_client_groups.php \
|
| 125 |
tests/t_vas_attrs_alloc.php \
|
| 126 |
tests/t_vas_attrs_find.php \
|
| 127 |
tests/t_vas_attrs_find_continue.php \
|
| 128 |
tests/t_vas_attrs_set_option.php \
|
| 129 |
tests/t_vas_attrs_get_option.php \
|
| 130 |
tests/t_vas_vals_get_string.php \
|
| 131 |
tests/t_vas_vals_get_integer.php \
|
| 132 |
tests/t_vas_vals_get_binary.php \
|
| 133 |
tests/t_vas_vals_get_anames.php \
|
| 134 |
tests/t_vas_vals_get_dn.php \
|
| 135 |
tests/t_vas_name_to_principal.php \
|
| 136 |
tests/t_vas_name_to_dn.php \
|
| 137 |
tests/t_vas_info_forest_root.php \
|
| 138 |
tests/t_vas_info_joined_domain.php \
|
| 139 |
tests/t_vas_info_site.php \
|
| 140 |
tests/t_vas_info_domains.php \
|
| 141 |
tests/t_vas_info_servers.php \
|
| 142 |
tests/t_vas_prompt_for_cred_string.php \
|
| 143 |
tests/t_vas_err_get_code.php \
|
| 144 |
tests/t_vas_err_get_string.php \
|
| 145 |
tests/t_vas_err_clear.php \
|
| 146 |
tests/t_vas_err_get_info.php \
|
| 147 |
tests/t_vas_err_info_get_string.php \
|
| 148 |
tests/t_vas_err_get_cause_by_type.php \
|
| 149 |
tests/t_vas_user_init.php \
|
| 150 |
tests/t_vas_user_is_member.php \
|
| 151 |
tests/t_vas_user_get_groups.php \
|
| 152 |
tests/t_vas_user_get_attrs.php \
|
| 153 |
tests/t_vas_user_get_dn.php \
|
| 154 |
tests/t_vas_user_get_domain.php \
|
| 155 |
tests/t_vas_user_get_sam_account_name.php \
|
| 156 |
tests/t_vas_user_get_sid.php \
|
| 157 |
tests/t_vas_user_get_upn.php \
|
| 158 |
tests/t_vas_user_get_pwinfo.php \
|
| 159 |
tests/t_vas_user_get_krb5_client_name.php \
|
| 160 |
tests/t_vas_user_get_account_control.php \
|
| 161 |
tests/t_vas_user_check_access.php \
|
| 162 |
tests/t_vas_user_check_conflicts.php \
|
| 163 |
tests/t_vas_group_init.php \
|
| 164 |
tests/t_vas_group_has_member.php \
|
| 165 |
tests/t_vas_group_get_attrs.php \
|
| 166 |
tests/t_vas_group_get_dn.php \
|
| 167 |
tests/t_vas_group_get_domain.php \
|
| 168 |
tests/t_vas_group_get_sid.php \
|
| 169 |
tests/t_vas_service_init.php \
|
| 170 |
tests/t_vas_service_get_attrs.php \
|
| 171 |
tests/t_vas_service_get_dn.php \
|
| 172 |
tests/t_vas_service_get_domain.php \
|
| 173 |
tests/t_vas_service_get_krb5_client_name.php \
|
| 174 |
tests/t_vas_service_get_spns.php \
|
| 175 |
tests/t_vas_service_get_upn.php \
|
| 176 |
tests/t_vas_computer_init.php \
|
| 177 |
tests/t_vas_computer_is_member.php \
|
| 178 |
tests/t_vas_computer_get_attrs.php \
|
| 179 |
tests/t_vas_computer_get_dn.php \
|
| 180 |
tests/t_vas_computer_get_dns_hostname.php \
|
| 181 |
tests/t_vas_computer_get_domain.php \
|
| 182 |
tests/t_vas_computer_get_sid.php \
|
| 183 |
tests/t_vas_computer_get_spns.php \
|
| 184 |
tests/t_vas_computer_get_sam_account_name.php \
|
| 185 |
tests/t_vas_computer_get_upn.php \
|
| 186 |
tests/t_vas_computer_get_krb5_client_name.php \
|
| 187 |
tests/t_vas_computer_get_host_spn.php \
|
| 188 |
tests/t_vas_computer_get_account_control.php \
|
| 189 |
tests/t_vas_gss_initialize.php \
|
| 190 |
tests/t_vas_gss_acquire_cred.php \
|
| 191 |
tests/t_vas_gss_auth.php \
|
| 192 |
tests/t_vas_gss_spnego_initiate.php \
|
| 193 |
tests/t_vas_gss_spnego_accept.php \
|
| 194 |
tests/t_vas_krb5_get_context.php \
|
| 195 |
tests/t_vas_krb5_get_principal.php \
|
| 196 |
tests/t_vas_krb5_get_ccache.php \
|
| 197 |
tests/t_vas_ldap_init_and_bind.php \
|
| 198 |
tests/t_vas_ldap_set_attributes.php \
|
| 199 |
tests/t_vas_ldap_set_attributes1.php \
|
| 200 |
tests/t_vas_ldap_set_attributes2.php \
|
| 201 |
tests/t_vas_ldap_set_attributes3.php \
|
| 202 |
tests/t_vas_ldap_set_attributes4.php \
|
| 203 |
# end of tests
|
| 204 |
MISSING_TESTS = \
|
| 205 |
tests/t_vas_gss_krb5_get_subkey.php \
|
| 206 |
tests/t_vas_krb5_get_credentials.php \
|
| 207 |
tests/t_vas_krb5_validate_credentials.php \
|
| 208 |
# end of missing tests
|
| 209 |
|
| 210 |
EXTRA_DIST += $(TESTS)
|