Correct path to geodb.dat, add runcommand logic, and mark config files.

Thu, 02 Apr 2009 14:29:36 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 02 Apr 2009 14:29:36 +0200
changeset 132
648dc0227614
parent 131
092213021aa5
child 133
49dc954a9435

Correct path to geodb.dat, add runcommand logic, and mark config files.

webalizer/rc.webalizer file | annotate | diff | comparison | revisions
webalizer/webalizer.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/webalizer/rc.webalizer	Thu Apr 02 14:29:36 2009 +0200
     1.3 @@ -0,0 +1,21 @@
     1.4 +#!@l_prefix@/bin/openpkg rc
     1.5 +##
     1.6 +##  rc.webalizer -- Run-Commands
     1.7 +##
     1.8 +
     1.9 +%config
    1.10 +    webalizer_enable="$openpkg_rc_def"
    1.11 +
    1.12 +%common
    1.13 +    webalizer_etcdir="@l_prefix@/etc/webalizer"
    1.14 +    webalizer_webdir="@l_prefix@/web/webalizer"
    1.15 +
    1.16 +%daily
    1.17 +    rcService webalizer enable yes || exit 0
    1.18 +
    1.19 +    for cfgfile in $webalizer_etcdir/*.conf; do
    1.20 +        [ ".`grep '^disable' $cfgfile`" != . ] && continue
    1.21 +        @l_prefix@/bin/webalizer \
    1.22 +            -c $cfgfile || exit $?
    1.23 +    done
    1.24 +
     2.1 --- a/webalizer/webalizer.spec	Thu Apr 02 14:03:12 2009 +0200
     2.2 +++ b/webalizer/webalizer.spec	Thu Apr 02 14:29:36 2009 +0200
     2.3 @@ -36,13 +36,14 @@
     2.4  Group:        Logfile
     2.5  License:      GPL
     2.6  Version:      %{V_here}
     2.7 -Release:      20090401
     2.8 +Release:      20090402
     2.9  
    2.10  #   package options
    2.11  %option       with_dns       no
    2.12  
    2.13  #   list of sources
    2.14  Source0:      ftp://ftp.mrunix.net/pub/webalizer/webalizer-%{V_real}-src.tgz
    2.15 +Source1:      rc.webalizer
    2.16  
    2.17  #   build information
    2.18  Prefix:       %{l_prefix}
    2.19 @@ -81,6 +82,7 @@
    2.20      ./configure \
    2.21          --prefix=%{l_prefix} \
    2.22          --sysconfdir=%{l_prefix}/etc/%{name} \
    2.23 +        --with-geodb=%{l_prefix}/var/%{name} \
    2.24  %if "%{with_dns}" == "yes"
    2.25          --enable-dns \
    2.26  %endif
    2.27 @@ -103,7 +105,10 @@
    2.28      %{l_shtool} mkdir -f -p -m 755 \
    2.29          $RPM_BUILD_ROOT%{l_prefix}/bin \
    2.30          $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
    2.31 -        $RPM_BUILD_ROOT%{l_prefix}/etc/webalizer
    2.32 +        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
    2.33 +        $RPM_BUILD_ROOT%{l_prefix}/etc/webalizer \
    2.34 +        $RPM_BUILD_ROOT%{l_prefix}/var/webalizer \
    2.35 +        $RPM_BUILD_ROOT%{l_prefix}/web/webalizer
    2.36      %{l_shtool} install -c -s -m 755 \
    2.37          webalizer $RPM_BUILD_ROOT%{l_prefix}/bin/
    2.38      %{l_shtool} install -c -m 644 \
    2.39 @@ -112,7 +117,11 @@
    2.40          sample.conf $RPM_BUILD_ROOT%{l_prefix}/etc/webalizer/webalizer.conf
    2.41      ln $RPM_BUILD_ROOT%{l_prefix}/bin/webalizer \
    2.42         $RPM_BUILD_ROOT%{l_prefix}/bin/webazolver
    2.43 -    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
    2.44 +    %{l_shtool} install -c -m 755 %{l_value -s -a} \
    2.45 +        %{SOURCE rc.webalizer} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
    2.46 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
    2.47 +        %{l_files_std} \
    2.48 +        '%config %{l_prefix}/etc/webalizer/*'
    2.49  
    2.50  %files -f files
    2.51  

mercurial