%global _moonshot_krb5 %{!?_moonshot_krb5:krb5-devel}%{?_moonshot_krb5}
Name: moonshot-gss-eap
Version: @VERSION@
-Release: 5%{?dist}
+Release: 1%{?dist}
Summary: Moonshot GSS-API Mechanism
Group: Security Tools
BuildRequires: jansson-devel
Requires: moonshot-ui
BuildRequires: libradsec-devel >= 0.0.3
-BuildRequires: shibboleth-devel >= 2.5
+BuildRequires: shibboleth-sp-devel >= 2.5
BuildRequires: libshibresolver-devel
%build
-%configure --with-libmoonshot=%{_prefix} --with-krb5=%{_prefix} --enable-reauth
+%configure --with-libmoonshot=%{_prefix} --with-krb5=%{_prefix} --enable-reauth LDFLAGs="${LDFLAGS} -L/opt/shibboleth/%{_lib} -Wl,--rpath=/opt/shibboleth/%{_lib}" CPPFLAGS="${CPPFLAGS} -I/opt/shibboleth/include"
make %{?_smp_mflags}
%clean
rm -rf $RPM_BUILD_ROOT
+%post
+oid_aes128=1.3.6.1.5.5.15.1.1.17
+oid_aes256=1.3.6.1.5.5.15.1.1.18
+mechfile=%{_sysconfdir}/gss/mech
+mkdir -p %{_sysconfdir}/gss
+test -e $mechfile |touch $mechfile
+fgrep $oid_aes128 $mechfile ||echo eap-aes128 $oid_aes128 mech_eap.so >>$mechfile
+fgrep $oid_aes256 $mechfile ||echo eap-aes256 $oid_aes256 mech_eap.so >>$mechfile
+
%files
%defattr(-,root,root,-)