#Module-Specific definitions %define mod_name mod_pubcookie %define mod_conf A62_%{mod_name}.conf %define mod_so %{mod_name}.so Summary: Intra-institutional web authentication Name: pubcookie Version: 3.3.3 Release: %mkrel 10 Group: System/Servers License: Apache License URL: http://www.pubcookie.org/ Source0: http://www.pubcookie.org/downloads/%{name}-%{version}.tar.gz Source1: %{mod_conf} Source2: pubcookie.xinetd Patch0: pubcookie-DESTDIR.diff Patch1: pubcookie-paths.diff Patch2: pubcookie-3.3.0a-pki_dir.diff Patch3: pubcookie-3.3.3-format_not_a_string_literal_and_no_format_arguments.diff Requires: xinetd Requires: rootcerts Requires: openssl Requires(pre): rpm-helper Requires(postun): rpm-helper BuildRequires: apache-mpm-prefork >= 2.2.4 BuildRequires: apache-devel >= 2.2.4 BuildRequires: openssl-devel BuildRequires: openldap-devel BuildRequires: krb5-devel BuildRequires: libfcgi-devel BuildRequires: file BuildRequires: autoconf2.5 BuildRequires: automake1.7 BuildRequires: libtool BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description Pubcookie consists of a standalone login server and modules for common web server platforms like Apache and Microsoft IIS. Together, these components can turn existing authentication services (like Kerberos, LDAP, or NIS) into a solution for single sign-on authentication to websites throughout an institution. %package -n apache-%{mod_name} Summary: Intra-institutional web authentication Group: System/Servers Requires(pre): rpm-helper Requires(postun): rpm-helper Requires(pre): apache-conf >= 2.2.4 Requires(pre): apache >= 2.2.4 Requires(pre): apache-mod_ssl >= 2.2.4 Requires(pre): %{name} = %{version}-%{release} Requires: apache-conf >= 2.2.4 Requires: apache >= 2.2.4 Requires: apache-mod_ssl >= 2.2.4 Requires: %{name} = %{version}-%{release} %description -n apache-%{mod_name} Pubcookie consists of a standalone login server and modules for common web server platforms like Apache and Microsoft IIS. Together, these components can turn existing authentication services (like Kerberos, LDAP, or NIS) into a solution for single sign-on authentication to websites throughout an institution. %prep %setup -q -n %{name}-%{version} %patch0 -p0 %patch1 -p1 %patch2 -p0 %patch3 -p0 cp %{SOURCE1} %{mod_conf} cp %{SOURCE2} pubcookie.xinetd find . -type d -perm 0700 -exec chmod 755 {} \; find . -type d -perm 0555 -exec chmod 755 {} \; find . -type f -perm 0555 -exec chmod 755 {} \; find . -type f -perm 0444 -exec chmod 644 {} \; for i in `find . -type d -name CVS` `find . -type d -name .svn` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do if [ -e "$i" ]; then rm -r $i; fi >&/dev/null done # strip away annoying ^M find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//' find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//' %build %serverbuild export CFLAGS="$CFLAGS -DLDAP_DEPRECATED" rm -f configure libtoolize --copy --force; aclocal-1.7; autoconf %configure2_5x \ --enable-apache \ --enable-login \ --enable-default-des \ --enable-krb5 \ --enable-ldap \ --enable-shadow \ --with-fcgi=%{_prefix} \ --with-apxs=%{_sbindir}/apxs %make %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_sysconfdir}/httpd/modules.d install -d %{buildroot}%{_sysconfdir}/xinetd.d install -d %{buildroot}%{_libdir}/apache-extramodules install -d %{buildroot}%{_datadir}/%{name}/login_templates.default install -d %{buildroot}/var/lib/%{name}/keys install -d %{buildroot}%{_sbindir} install -d %{buildroot}/var/www/cgi-bin %makeinstall_std PUBCOOKIE_DIR=%{_sysconfdir}/%{name} mv %{buildroot}%{_libdir}/apache/%{mod_so} %{buildroot}%{_libdir}/apache-extramodules/ install -m0644 %{mod_conf} %{buildroot}%{_sysconfdir}/httpd/modules.d/%{mod_conf} install -m0644 pubcookie.xinetd %{buildroot}%{_sysconfdir}/xinetd.d/%{name} install -m0755 keyclient %{buildroot}%{_sbindir}/keyclient install -m0755 keyserver %{buildroot}%{_sbindir}/keyserver mv %{buildroot}%{_datadir}/%{name}/login/index.cgi %{buildroot}/var/www/cgi-bin/%{name}.cgi # cleansing... rm -f %{buildroot}%{_sysconfdir}/%{name}/keyclient rm -f %{buildroot}%{_sysconfdir}/%{name}/keyserver %post service xinetd restart %postun service xinetd restart %post -n apache-%{mod_name} if [ -f /var/lock/subsys/httpd ]; then %{_initrddir}/httpd restart 1>&2; fi %postun -n apache-%{mod_name} if [ "$1" = "0" ]; then if [ -f /var/lock/subsys/httpd ]; then %{_initrddir}/httpd restart 1>&2 fi fi %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc doc/*.txt doc/*.html %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/xinetd.d/%{name} %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/config %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/config.login.sample %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/starter.key %attr(0755,root,root) %{_sbindir}/keyclient %attr(0755,root,root) %{_sbindir}/keyserver %dir %attr(0755,root,root) /var/lib/%{name} %dir %attr(0755,root,root) /var/lib/%{name}/keys %{_datadir}/%{name} %attr(0755,root,root) /var/www/cgi-bin/%{name}.cgi %files -n apache-%{mod_name} %defattr(-,root,root) %doc doc/*.html doc/*.css %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/%{mod_conf} %attr(0755,root,root) %{_libdir}/apache-extramodules/%{mod_so} %changelog * Tue Apr 13 2010 Funda Wang <fwang@mandriva.org> 3.3.3-10mdv2010.1 + Revision: 534505 - rebuild * Sat Aug 01 2009 Oden Eriksson <oeriksson@mandriva.com> 3.3.3-9mdv2010.0 + Revision: 406695 - rebuild * Wed Jan 07 2009 Oden Eriksson <oeriksson@mandriva.com> 3.3.3-8mdv2009.1 + Revision: 326713 - fix build with -Werror=format-security * Tue Jul 29 2008 Oden Eriksson <oeriksson@mandriva.com> 3.3.3-7mdv2009.0 + Revision: 252247 - hardcode %%{_localstatedir} * Mon Jul 14 2008 Oden Eriksson <oeriksson@mandriva.com> 3.3.3-6mdv2009.0 + Revision: 235146 - rebuild * Sat Jun 07 2008 Oden Eriksson <oeriksson@mandriva.com> 3.3.3-5mdv2009.0 + Revision: 216740 - rebuild + Pixel <pixel@mandriva.com> - adapt to %%_localstatedir now being /var instead of /var/lib (#22312) * Mon Feb 18 2008 Thierry Vignaud <tv@mandriva.org> 3.3.3-4mdv2008.1 + Revision: 171054 - rebuild - rebuild with fixed %%serverbuild macro + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Mon Dec 24 2007 Oden Eriksson <oeriksson@mandriva.com> 3.3.3-2mdv2008.1 + Revision: 137538 - rebuilt against openldap-2.4.7 libs + Thierry Vignaud <tv@mandriva.org> - kill re-definition of %%buildroot on Pixel's request * Fri Sep 14 2007 Oden Eriksson <oeriksson@mandriva.com> 3.3.3-1mdv2008.1 + Revision: 85613 - 3.3.3 * Sun Sep 09 2007 Oden Eriksson <oeriksson@mandriva.com> 3.3.2d-2mdv2008.0 + Revision: 83439 - rebuild * Sun Aug 19 2007 Oden Eriksson <oeriksson@mandriva.com> 3.3.2d-1mdv2008.0 + Revision: 66640 - 3.3.2d - user the new %%serverbuild macro - fix possible ldap borkiness with adding -DLDAP_DEPRECATED to the CFLAGS * Sun Mar 11 2007 Oden Eriksson <oeriksson@mandriva.com> 3.3.2c-1mdv2007.1 + Revision: 141376 - fix build deps (thanks spturtle) - Import pubcookie * Sun Mar 11 2007 Oden Eriksson <oeriksson@mandriva.com> 3.3.2c-1mdv2007.1 - 3.3.2c - bunzip sources and patches - rediffed patches; P0,P1 - enable fcgi support * Sat Aug 12 2006 Oden Eriksson <oeriksson@mandriva.com> 3.3.0a-2mdk - rebuild * Fri May 12 2006 Oden Eriksson <oeriksson@mandriva.com> 3.3.0a-1mdk - initial Mandriva package