+#
+# Conditional build:
+%bcond_without samba # without samba passwords support
+%bcond_without squid # without squid passwords support
+
#TODO
# - move cgi binary to /usr/share/changepassword
# - write changepassword.conf for apache redirection + execution
Summary(pl): ChangePassword - modyfikator hase³
Name: changepassword
Version: 0.7
-Release: 3
+Release: 4
License: GPL
Group: Networking/Admin
Source0: http://dl.sourceforge.net/changepassword/%{name}-%{version}.tar.gz
# Source0-md5: b68a179e64dcffbfc4e410a84b6d3ecb
+Source1: pldlogo.png
URL: http://changepassword.sourceforge.net/
Requires: apache
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%prep
%setup -q
+cp %{SOURCE1} .
%build
%configure \
--enable-cgidir=%{_cgidir} \
--enable-language=Polish \
+ --enable-logo=pldlogo.png \
--enable-smbpasswd=%{_sysconfdir}/smbpasswd \
- --enable-squidpasswd=%{_sysconfdir}/squid/passwd
+ --enable-squidpasswd=%{_sysconfdir}/squid/passwd \
+%if %{without samba}
+ --disable-smbpasswd \
+%endif
+%if %{without squid}
+ --disable-squidpasswd
+%endif
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_cgidir}
+install -d $RPM_BUILD_ROOT/home/services/httpd/html
install changepassword.cgi $RPM_BUILD_ROOT%{_cgidir}
+install %{SOURCE1} $RPM_BUILD_ROOT/home/services/httpd/html
%clean
rm -rf $RPM_BUILD_ROOT
%doc BUGS CHANGELOG README TODO
%lang(pt_BR) %doc README.brazilian
%attr(755,root,root) %{_cgidir}/changepassword.cgi
+%attr(644,root,root) /home/services/httpd/html/pldlogo.png