]> git.pld-linux.org Git - packages/changepassword.git/blobdiff - changepassword.spec
- don't use %{without ...}, it may not work after inverting bcond
[packages/changepassword.git] / changepassword.spec
index 4c6d4cf311427c589c6dabd8f9913f42c4d11d97..ff46e44fd762b1104204ecf10a3791816bd228ff 100644 (file)
@@ -1,17 +1,28 @@
+#
+# 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
+# - get sources for libdes and compile then instead of using
+#   precompiled version for x86!!!
 Summary:       ChangePassword
 Summary(pl):   ChangePassword - modyfikator haseĀ³
 Name:          changepassword
-Version:       0.5
+Version:       0.9
 Release:       1
 License:       GPL
 Group:         Networking/Admin
 Source0:       http://dl.sourceforge.net/changepassword/%{name}-%{version}.tar.gz
-# Source0-md5: c730d9878f65ada0b81e16e4150cb6a7
+# Source0-md5: 7449a80c65db2e37c0aa3bb709926127
+Source1:       pldlogo.png
 URL:           http://changepassword.sourceforge.net/
-Requires:      apache
+Requires:      webserver = apache
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define         _cgidir         /home/services/httpd/html/cgi-bin
+%define                _cgidir         /home/services/httpd/cgi-bin
 
 %description
 ChangePassword modifies the passwords of passwd, Samba, and Squid
@@ -25,26 +36,38 @@ zmieniane w trybie rzeczywistym.
 
 %prep
 %setup -q
+cp %{SOURCE1} .
 
 %build
 %configure \
-       --enable-cgidir=/home/services/httpd/html/cgi-bin \
+       --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 !%{with samba}
+       --disable-smbpasswd \
+%endif
+%if !%{with 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 changepassword.cgi $RPM_BUILD_ROOT%{_cgidir}
+install %{SOURCE1} $RPM_BUILD_ROOT/home/services/httpd/html
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc {README,CHANGELOG,LICENSE,BUGS,TODO}
+%doc BUGS CHANGELOG README TODO
+%lang(pt_BR) %doc README.brazilian
 %attr(755,root,root) %{_cgidir}/changepassword.cgi
+/home/services/httpd/html/pldlogo.png
This page took 0.089925 seconds and 4 git commands to generate.