]> git.pld-linux.org Git - packages/changepassword.git/blobdiff - changepassword.spec
rel 4
[packages/changepassword.git] / changepassword.spec
index 84a4a263ea1b62653bdf4833130b27a8fe8a5fd2..5a810a3ccc0caee0a1b71bc5e73334f853d14553 100644 (file)
@@ -1,50 +1,87 @@
+# TODO
+# - webapps
+# - move cgi binary to /usr/lib/changepassword
+# - write changepassword.conf for apache redirection + execution
+#
+# Conditional build:
+%bcond_without samba   # without samba passwords support
+%bcond_without squid   # without squid passwords support
+#
 Summary:       ChangePassword
-Summary(pl):   ChangePassword - modyfikator hase³
+Summary(pl.UTF-8):     ChangePassword - modyfikator haseł
 Name:          changepassword
-Version:       0.7
-Release:       1
+Version:       0.9
+Release:       4
 License:       GPL
 Group:         Networking/Admin
 Source0:       http://dl.sourceforge.net/changepassword/%{name}-%{version}.tar.gz
-# Source0-md5: b68a179e64dcffbfc4e410a84b6d3ecb
+# Source0-md5: 7449a80c65db2e37c0aa3bb709926127
+Source1:       pldlogo.png
+Patch0:         build.patch
 URL:           http://changepassword.sourceforge.net/
-Requires:      apache
+Requires:      webserver = apache
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define         _cgidir         /home/services/httpd/cgi-bin
+%define                _cgidir         /home/services/httpd/cgi-bin
 
 %description
 ChangePassword modifies the passwords of passwd, Samba, and Squid
 through the Web. All passwords are syncronized and changed in real
 time through browsers like Mozilla, Netscape, IE, Opera, and others.
 
-%description -l pl
-ChangePassword modyfikuje has³a dla passwd, Samby i Squida za
-po¶rednictwem interfejsu WWW. Wszystkie has³a s± synchronizowane i
+%description -l pl.UTF-8
+ChangePassword modyfikuje hasła dla passwd, Samby i Squida za
+pośrednictwem interfejsu WWW. Wszystkie hasła są synchronizowane i
 zmieniane w trybie rzeczywistym.
 
 %prep
-%setup -q -n %{name}-%{version}
+%setup -q
+cp %{SOURCE1} .
+tar -xf smbencrypt/libdes-4.04b.tar.gz
+%patch0 -p1
 
 %build
 %configure \
-       --enable-cgidir=/home/services/httpd/cgi-bin \
+       --enable-cgidir=%{_cgidir} \
        --enable-language=Polish \
-       --enable-smbpasswd=%{_sysconfdir}/smbpasswd \
-       --enable-squidpasswd=%{_sysconfdir}/squid/passwd
+       --enable-logo=pldlogo.png \
+       --enable-smbpasswd=/etc/samba/smbpasswd \
+       --enable-squidpasswd=/etc/squid/passwd \
+%if %{without samba}
+       --disable-smbpasswd \
+%endif
+%if %{without squid}
+       --disable-squidpasswd
+%endif
 
-%{__make}
+%{__make} -C des \
+       CC="%{__cc}" \
+%ifarch %{ix86}
+       DES_INC="asm/dx86-elf.o asm/yx86-elf.o" \
+       CFLAG="%{rpmcflags} -DELF"
+%else
+       CFLAG="%{rpmcflags}"
+%endif
+install des/libdes.a smbencrypt
+
+%{__make} \
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags}"
 
 %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.09576 seconds and 4 git commands to generate.