webalizer/webalizer.spec

Thu, 05 Nov 2009 13:42:13 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 05 Nov 2009 13:42:13 +0100
changeset 237
76b4896bea63
parent 175
66c4ec7f657e
child 554
9d786c9d3d15
permissions
-rw-r--r--

Resynchronize with upstream package maintainer version.
This is needed due to large changeset after upgrade of vendor
distribution from version 1.1.* to 1.2.*.

     1 ##
     2 ##  webalizer.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package version
    25 %define       V_real  2.21-02
    26 %define       V_here  2.21.02
    27 %define       V_geodb 20090401
    29 #   package information
    30 Name:         webalizer
    31 Summary:      Graphical Web Statistics Program
    32 URL:          http://www.mrunix.net/webalizer/
    33 Vendor:       Bradford L. Barrett
    34 Packager:     OpenPKG Foundation e.V.
    35 Distribution: OpenPKG Community
    36 Class:        PLUS
    37 Group:        Logfile
    38 License:      GPL
    39 Version:      %{V_here}
    40 Release:      20090418
    42 #   package options
    43 %option       with_dns    no
    44 %option       with_geoip  no
    45 %option       with_gwidth 512
    47 #   list of sources
    48 Source0:      ftp://ftp.mrunix.net/pub/webalizer/webalizer-%{V_real}-src.tgz
    49 Source1:      ftp://ftp.mrunix.net/pub/webalizer/geodb/webalizer-geodb-%{V_geodb}.tgz
    50 Source2:      ftp://ftp.mrunix.net/pub/webalizer/webalizer-flags.tgz
    51 Source3:      webgraphicon.png
    52 Source4:      rc.webalizer
    53 Patch0:       webalizer.patch
    55 #   build information
    56 Prefix:       %{l_prefix}
    57 BuildRoot:    %{l_buildroot}
    58 BuildPreReq:  OpenPKG, openpkg >= 20040130
    59 PreReq:       OpenPKG, openpkg >= 20040130
    60 BuildPreReq:  gd, png, zlib, bzip2, db >= 4.1.24
    61 PreReq:       gd, png, zlib, bzip2, db >= 4.1.24
    62 %if "%{with_dns}" == "yes"
    63 BuildPreReq:  db::with_compat = yes
    64 PreReq:       db::with_compat = yes
    65 %endif
    66 %if "%{with_geoip}" == "yes"
    67 BuildPreReq:  geoip
    68 PreReq:       geoip
    69 %endif
    70 AutoReq:      no
    71 AutoReqProv:  no
    73 %description
    74     The Webalizer is a fast, free web server log file analysis program.
    75     It produces highly detailed, easily configurable usage reports in
    76     HTML format, for viewing with a standard web browser.
    78 %track
    79     prog webalizer = {
    80         version   = %{V_real}
    81         url       = ftp://ftp.mrunix.net/pub/webalizer/
    82         regex     = webalizer-(__VER__)-src\.tgz
    83     }
    85 %prep
    86     %setup -q -n webalizer-%{V_real}
    87     ( cd webalizer-%{V_real}
    88       %{l_gzip} -d -c %{SOURCE1} | %{l_tar} xf -
    89       %{l_gzip} -d -c %{SOURCE2} | %{l_tar} xf -
    90     ) || exit $?
    91     %patch -p0
    92     %{l_shtool} subst \
    93         -e "s;@l_gwidth@;%{with_gwidth};g" \
    94         graphs.c \
    95         output.c
    97 %build
    98     CC="%{l_cc}" \
    99     CFLAGS="%{l_cflags -O}" \
   100     CPPFLAGS="%{l_cppflags} -DHAVE_DB_185_H" \
   101     GREP="grep" \
   102     ./configure \
   103         --prefix=%{l_prefix} \
   104         --sysconfdir=%{l_prefix}/etc/%{name} \
   105         --with-geodb=%{l_prefix}/var/%{name} \
   106 %if "%{with_dns}" == "yes"
   107         --enable-dns \
   108 %endif
   109 %if "%{with_geoip}" == "yes"
   110         --enable-geoip \
   111 %endif
   112         --enable-bz2 \
   113         --with-bz2lib=%{l_prefix}/lib \
   114         --with-bz2=%{l_prefix}/include \
   115         --with-etcdir=%{l_prefix}/etc/webalizer \
   116         --with-gdlib=%{l_prefix}/lib \
   117         --with-gd=%{l_prefix}/include \
   118         --with-z-inc=%{l_prefix}/include \
   119         --with-zlib=%{l_prefix}/lib \
   120         --with-png-inc=%{l_prefix}/include \
   121         --with-png=%{l_prefix}/lib \
   122         --with-db=%{l_prefix}/include \
   123         --with-dblib=%{l_prefix}/lib
   124     %{l_make} %{l_mflags -O}
   126 %install
   127     rm -rf $RPM_BUILD_ROOT
   128     %{l_shtool} mkdir -f -p -m 755 \
   129         $RPM_BUILD_ROOT%{l_prefix}/bin \
   130         $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
   131         $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
   132         $RPM_BUILD_ROOT%{l_prefix}/etc/webalizer \
   133         $RPM_BUILD_ROOT%{l_prefix}/share/webalizer \
   134         $RPM_BUILD_ROOT%{l_prefix}/var/webalizer \
   135         $RPM_BUILD_ROOT%{l_prefix}/web/webalizer
   136     %{l_shtool} install -c -s -m 755 \
   137         webalizer $RPM_BUILD_ROOT%{l_prefix}/bin/
   138     %{l_shtool} install -c -m 644 \
   139         webalizer.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
   140     %{l_shtool} install -c -m 644 \
   141         sample.conf $RPM_BUILD_ROOT%{l_prefix}/etc/webalizer/webalizer.conf
   142     %{l_shtool} install -c -m 644 \
   143         GeoDB.dat $RPM_BUILD_ROOT%{l_prefix}/var/webalizer/
   144     %{l_shtool} install -c -m 644 \
   145         %{SOURCE webgraphicon.png} $RPM_BUILD_ROOT%{l_prefix}/web/webalizer/
   146     mv flags $RPM_BUILD_ROOT%{l_prefix}/share/webalizer/
   147     ln $RPM_BUILD_ROOT%{l_prefix}/bin/webalizer \
   148        $RPM_BUILD_ROOT%{l_prefix}/bin/webazolver
   149     %{l_shtool} install -c -m 755 %{l_value -s -a} \
   150         %{SOURCE rc.webalizer} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   151     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   152         %{l_files_std} \
   153         '%config %{l_prefix}/etc/webalizer/*'
   155 %files -f files
   157 %clean
   158     rm -rf $RPM_BUILD_ROOT

mercurial