Author: qboosh                       Date: Sat Dec 23 21:57:33 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added statimg,htaccess patches, applied path changes by Jan Palus (FHS 
compliance)
- release 14.1 (untested)

---- Files affected:
SPECS:
   lstat.spec (1.67 -> 1.68) 

---- Diffs:

================================================================
Index: SPECS/lstat.spec
diff -u SPECS/lstat.spec:1.67 SPECS/lstat.spec:1.68
--- SPECS/lstat.spec:1.67       Sun Oct  1 19:26:39 2006
+++ SPECS/lstat.spec    Sat Dec 23 22:57:28 2006
@@ -2,15 +2,12 @@
 # TODO:
 # - allow to show while configure where are: 
"w","users","sh","ipchains","df","fping","ifconfig",
 #   "install","perl","chmod","iptables","uptime","htpasswd" Or guess it...
-# - make .htaccess files in /etc/lstat and symlink them into proper places...
-# - /usr/share/lstat/statimg should be in /var?
-# - /en/ docs in .pl?
 %include       /usr/lib/rpm/macros.perl
 Summary:       LinuxStat is for generating and displaying different statistics
 Summary(pl):   LinuxStat służy do generowania i prezentacji różnych statystyk
 Name:          lstat
 Version:       2.3.2
-Release:       14
+Release:       14.1
 Epoch:         1
 License:       GPL
 Group:         Applications/Networking
@@ -22,6 +19,8 @@
 Patch1:                %{name}-PLD.patch
 Patch2:                %{name}-perlhandler.patch
 Patch3:                %{name}-permission.patch
+Patch4:                %{name}-statimg.patch
+Patch5:                %{name}-htaccess.patch
 URL:           http://lstat.sourceforge.net/
 BuildRequires: perl-CGI
 BuildRequires: perl-base
@@ -33,11 +32,11 @@
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _initdir                /etc/rc.d/init.d
-%define                _pkglibdir              /var/lib/%{name}
-%define                _wwwuser                http
-%define                _wwwgroup               http
-%define                _wwwrootdir             /usr/share/%{name}
+%define                _initdir        /etc/rc.d/init.d
+%define                _pkglibdir      /var/lib/%{name}
+%define                _wwwuser        http
+%define                _wwwgroup       http
+%define                _wwwrootdir     /usr/share/%{name}
 %define                _webapps        /etc/webapps
 %define                _webapp         %{name}
 %define                _httpdconf      %{_webapps}/%{_webapp}
@@ -87,6 +86,8 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
 # specify random mod_perl, we use own apache config anyway.
@@ -101,6 +102,7 @@
        --with-rrd=%{_pkglibdir}/rrd \
        --with-pages=%{_pkglibdir}/pages \
        --with-objects=%{_pkglibdir}/objects \
+       --with-statimg=%{_pkglibdir}/statimg \
        --with-templates=%{_pkglibdir}/templates \
        --with-wwwuser=%{_wwwuser} \
        --with-wwwgroup=%{_wwwgroup} \
@@ -118,6 +120,16 @@
 install %{SOURCE1} $RPM_BUILD_ROOT%{_initdir}/lstatd
 rm -rf $RPM_BUILD_ROOT%{_wwwrootdir}/doc
 ln -sf %{_docdir}/%{name}-%{version} $RPM_BUILD_ROOT%{_wwwrootdir}/doc
+rm -rf $RPM_BUILD_ROOT%{_wwwrootdir}/statimg
+ln -sf %{_pkglibdir}/statimg $RPM_BUILD_ROOT%{_wwwrootdir}/statimg
+rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/lstat/users
+touch $RPM_BUILD_ROOT%{_sysconfdir}/lstat/users
+rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/lstat/htaccess.{view,edit}
+touch $RPM_BUILD_ROOT%{_sysconfdir}/lstat/htaccess.{view,edit}
+rm -rf $RPM_BUILD_ROOT%{_wwwrootdir}/.htaccess
+ln -sf %{_sysconfdir}/lstat/htaccess.view 
$RPM_BUILD_ROOT%{_wwwrootdir}/.htaccess
+rm -rf $RPM_BUILD_ROOT%{_wwwrootdir}/edit/.htaccess
+ln -sf %{_sysconfdir}/lstat/htaccess.edit 
$RPM_BUILD_ROOT%{_wwwrootdir}/edit/.htaccess
 
 install %{SOURCE2} $RPM_BUILD_ROOT%{_httpdconf}/httpd.conf
 install %{SOURCE2} $RPM_BUILD_ROOT%{_httpdconf}/apache.conf
@@ -129,6 +141,7 @@
 
 %pre
 test -h %{_wwwrootdir}/doc || rm -rf %{_wwwrootdir}/doc
+test -h %{_wwwrootdir}/statimg || rm -rf %{_wwwrootdir}/lstat/statimg
 
 %post
 /sbin/chkconfig --add lstatd
@@ -170,7 +183,10 @@
        sed -i -e "s#/home/services/apache/lstat/#/usr/share/lstat/#g" 
/etc/lstat/config
 fi
 if [ -s /home/services/apache/lstat/.htaccess ]; then
-       mv /home/services/apache/lstat/.htaccess /usr/share/lstat/
+       mv /home/services/apache/lstat/.htaccess 
%{_sysconfdir}/lstat/htaccess.view
+fi
+if [ -s /home/services/apache/lstat/edit/.htaccess ]; then
+       mv /home/services/apache/lstat/edit/.htaccess 
%{_sysconfdir}/lstat/htaccess.edit
 fi
 
 if [ -s /etc/httpd/httpd.conf/lstat.conf ]; then
@@ -180,7 +196,17 @@
        sed -i -e "s#/home/services/httpd/lstat/#/usr/share/lstat/#g" 
/etc/lstat/config
 fi
 if [ -s /home/services/httpd/lstat/.htaccess ]; then
-       mv /home/services/httpd/lstat/.htaccess /usr/share/lstat/
+       mv /home/services/httpd/lstat/.htaccess 
%{_sysconfdir}/lstat/htaccess.view
+fi
+if [ -s /home/services/httpd/lstat/edit/.htaccess ]; then
+       mv /home/services/httpd/lstat/edit/.htaccess 
%{_sysconfdir}/lstat/htaccess.edit
+fi
+
+if [ -s /usr/share/lstat/.htaccess -a ! -L /usr/share/lstat/.htaccess ]; then
+       mv /usr/share/lstat/.htaccess %{_sysconfdir}/lstat/htaccess.view
+fi
+if [ -s /usr/share/lstat/edit/.htaccess -a ! -L 
/usr/share/lstat/edit/.htaccess ]; then
+       mv /usr/share/lstat/edit/.htaccess %{_sysconfdir}/lstat/htaccess.edit
 fi
 
 %triggerpostun -- %{name} < 1:2.3.2-10.3
@@ -199,6 +225,7 @@
 %attr(754,root,root) %{_initdir}/lstatd
 %dir %{_sysconfdir}/lstat
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lstat/config
+%config(noreplace,missingok) %verify(not size mtime md5) 
%{_sysconfdir}/lstat/users
 
 %attr(755,root,root) %{_bindir}/lstatd
 %attr(755,root,root) %{_bindir}/show_filters
@@ -214,21 +241,24 @@
 
 %files cgi
 %defattr(644,root,root,755)
+%config(noreplace) %verify(not size mtime md5) 
%{_sysconfdir}/lstat/htaccess.view
+%config(noreplace) %verify(not size mtime md5) 
%{_sysconfdir}/lstat/htaccess.edit
 %dir %attr(750,root,http) %{_httpdconf}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
%{_httpdconf}/apache.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
%{_httpdconf}/httpd.conf
 
 %dir %{_wwwrootdir}
 %{_wwwrootdir}/doc
-%dir %{_wwwrootdir}/icons
-%dir %{_wwwrootdir}/skins
+%{_wwwrootdir}/icons
+%{_wwwrootdir}/skins
 %dir %{_wwwrootdir}/edit
-%dir %{_pkglibdir}
-%attr(770,root,http) %dir %{_wwwrootdir}/statimg
 %attr(755,root,root) %{_wwwrootdir}/edit/edit.cgi
+%{_wwwrootdir}/lstat/edit/.htaccess
+%{_wwwrootdir}/statimg
 %attr(755,root,root) %{_wwwrootdir}/lstat.cgi
-%{_wwwrootdir}/skins/*
-%{_wwwrootdir}/icons/*
+%{_wwwrootdir}/.htaccess
+%dir %{_pkglibdir}
+%attr(700,http,http) %dir %{_pkglibdir}/statimg
 
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -236,6 +266,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.68  2006/12/23 21:57:28  qboosh
+- added statimg,htaccess patches, applied path changes by Jan Palus (FHS 
compliance)
+- release 14.1 (untested)
+
 Revision 1.67  2006/10/01 17:26:39  glen
 - rel 14
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/lstat.spec?r1=1.67&r2=1.68&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to