webalizer/webalizer.spec

Thu, 09 Apr 2009 14:59:46 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 09 Apr 2009 14:59:46 +0200
changeset 154
dfe80a536491
parent 151
d176107091ef
child 156
3831ba5c7ba7
permissions
-rw-r--r--

Integrate GeoIP geographical resolution service.

     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:      20090408
    42 #   package options
    43 %option       with_dns    no
    44 %option       with_geoip  no
    46 #   list of sources
    47 Source0:      ftp://ftp.mrunix.net/pub/webalizer/webalizer-%{V_real}-src.tgz
    48 Source1:      ftp://ftp.mrunix.net/pub/webalizer/geodb/webalizer-geodb-%{V_geodb}.tgz
    49 Source2:      ftp://ftp.mrunix.net/pub/webalizer/webalizer-flags.tgz
    50 Source3:      rc.webalizer
    52 #   build information
    53 Prefix:       %{l_prefix}
    54 BuildRoot:    %{l_buildroot}
    55 BuildPreReq:  OpenPKG, openpkg >= 20040130
    56 PreReq:       OpenPKG, openpkg >= 20040130
    57 BuildPreReq:  gd, png, zlib, bzip2, db >= 4.1.24
    58 PreReq:       gd, png, zlib, bzip2, db >= 4.1.24
    59 %if "%{with_dns}" == "yes"
    60 BuildPreReq:  db::with_compat = yes
    61 PreReq:       db::with_compat = yes
    62 %endif
    63 %if "%{with_geoip}" == "yes"
    64 BuildPreReq:  geoip
    65 PreReq:       geoip
    66 %endif
    67 AutoReq:      no
    68 AutoReqProv:  no
    70 %description
    71     The Webalizer is a fast, free web server log file analysis program.
    72     It produces highly detailed, easily configurable usage reports in
    73     HTML format, for viewing with a standard web browser.
    75 %track
    76     prog webalizer = {
    77         version   = %{V_real}
    78         url       = ftp://ftp.mrunix.net/pub/webalizer/
    79         regex     = webalizer-(__VER__)-src\.tgz
    80     }
    82 %prep
    83     %setup -q -n webalizer-%{V_real}
    84     ( cd webalizer-%{V_real}
    85       %{l_gzip} -d -c %{SOURCE1} | %{l_tar} xf -
    86       %{l_gzip} -d -c %{SOURCE2} | %{l_tar} xf -
    87     ) || exit $?
    89 %build
    90     CC="%{l_cc}" \
    91     CFLAGS="%{l_cflags -O}" \
    92     CPPFLAGS="%{l_cppflags} -DHAVE_DB_185_H" \
    93     GREP="grep" \
    94     ./configure \
    95         --prefix=%{l_prefix} \
    96         --sysconfdir=%{l_prefix}/etc/%{name} \
    97         --with-geodb=%{l_prefix}/var/%{name} \
    98 %if "%{with_dns}" == "yes"
    99         --enable-dns \
   100 %endif
   101 %if "%{with_geoip}" == "yes"
   102         --enable-geoip \
   103 %endif
   104         --enable-bz2 \
   105         --with-bz2lib=%{l_prefix}/lib \
   106         --with-bz2=%{l_prefix}/include \
   107         --with-etcdir=%{l_prefix}/etc/webalizer \
   108         --with-gdlib=%{l_prefix}/lib \
   109         --with-gd=%{l_prefix}/include \
   110         --with-z-inc=%{l_prefix}/include \
   111         --with-zlib=%{l_prefix}/lib \
   112         --with-png-inc=%{l_prefix}/include \
   113         --with-png=%{l_prefix}/lib \
   114         --with-db=%{l_prefix}/include \
   115         --with-dblib=%{l_prefix}/lib
   116     %{l_make} %{l_mflags -O}
   118 %install
   119     rm -rf $RPM_BUILD_ROOT
   120     %{l_shtool} mkdir -f -p -m 755 \
   121         $RPM_BUILD_ROOT%{l_prefix}/bin \
   122         $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
   123         $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
   124         $RPM_BUILD_ROOT%{l_prefix}/etc/webalizer \
   125         $RPM_BUILD_ROOT%{l_prefix}/share/webalizer \
   126         $RPM_BUILD_ROOT%{l_prefix}/var/webalizer \
   127         $RPM_BUILD_ROOT%{l_prefix}/web/webalizer
   128     %{l_shtool} install -c -s -m 755 \
   129         webalizer $RPM_BUILD_ROOT%{l_prefix}/bin/
   130     %{l_shtool} install -c -m 644 \
   131         webalizer.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
   132     %{l_shtool} install -c -m 644 \
   133         sample.conf $RPM_BUILD_ROOT%{l_prefix}/etc/webalizer/webalizer.conf
   134     %{l_shtool} install -c -m 644 \
   135         GeoDB.dat $RPM_BUILD_ROOT%{l_prefix}/var/webalizer/
   136     mv flags $RPM_BUILD_ROOT%{l_prefix}/share/webalizer/
   137     ln $RPM_BUILD_ROOT%{l_prefix}/bin/webalizer \
   138        $RPM_BUILD_ROOT%{l_prefix}/bin/webazolver
   139     %{l_shtool} install -c -m 755 %{l_value -s -a} \
   140         %{SOURCE rc.webalizer} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   141     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   142         %{l_files_std} \
   143         '%config %{l_prefix}/etc/webalizer/*'
   145 %files -f files
   147 %clean
   148     rm -rf $RPM_BUILD_ROOT

mercurial