webalizer/webalizer.spec

Thu, 04 Oct 2012 20:30:05 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 04 Oct 2012 20:30:05 +0200
changeset 715
c10fb90893b9
parent 177
ba548e351342
child 788
221a37376cee
permissions
-rw-r--r--

Correct out of date build configuration, porting to Solaris 11 network
link infrastructure and new libpcap logic. This additionally allows for
device drivers in subdirectories of /dev. Correct packaged nmap
personalities and signatures to work out of the box. Finally, hack
arpd logic to properly close sockets and quit on TERM by repeating
signaling in the run command script. Sadly, all this fails to correct
the run time behaviour of honeyd which fails to bind to the IP layer.

     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.23-05
    26 %define       V_here  2.23.05
    27 %define       V_geodb 20120801
    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:      20120800
    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 BuildPreReq:  OpenPKG, openpkg >= 20100101
    57 PreReq:       OpenPKG, openpkg >= 20100101
    58 BuildPreReq:  gd, png, zlib, bzip2, db >= 4.1.24, pkgconfig
    59 PreReq:       gd, png, zlib, bzip2, db >= 4.1.24
    60 %if "%{with_dns}" == "yes"
    61 BuildPreReq:  db::with_compat = yes
    62 PreReq:       db::with_compat = yes
    63 %endif
    64 %if "%{with_geoip}" == "yes"
    65 BuildPreReq:  geoip
    66 PreReq:       geoip
    67 %endif
    69 %description
    70     The Webalizer is a fast, free web server log file analysis program.
    71     It produces highly detailed, easily configurable usage reports in
    72     HTML format, for viewing with a standard web browser.
    74 %track
    75     prog webalizer = {
    76         version   = %{V_real}
    77         url       = ftp://ftp.mrunix.net/pub/webalizer/
    78         regex     = webalizer-(__VER__)-src\.tgz
    79     }
    81 %prep
    82     %setup -q -n webalizer-%{V_real}
    83     ( cd webalizer-%{V_real}
    84       %{l_gzip} -d -c %{SOURCE1} | %{l_tar} xf -
    85       %{l_gzip} -d -c %{SOURCE2} | %{l_tar} xf -
    86     ) || exit $?
    87     %patch -p0
    88     %{l_shtool} subst \
    89         -e "s;@l_gwidth@;%{with_gwidth};g" \
    90         graphs.c \
    91         output.c
    92     %{l_shtool} subst \
    93         -e 's;u_int64_t;uint64_t;g' \
    94         *.c *.h configure
    95     %{l_shtool} subst \
    96         -e "s;\(\${LIBS}\);\1 `%{l_prefix}/bin/pkg-config --libs-only-l db`;g" \
    97         -e "s;\(\${WCMGR_LIBS}\);\1 `%{l_prefix}/bin/pkg-config --libs-only-l db`;g" \
    98         Makefile.in
   100 %build
   101     CC="%{l_cc}" \
   102     CFLAGS="%{l_cflags -O}" \
   103     CPPFLAGS="%{l_cppflags} -DHAVE_DB_185_H" \
   104     GREP="grep" \
   105     ./configure \
   106         --prefix=%{l_prefix} \
   107         --sysconfdir=%{l_prefix}/etc/%{name} \
   108         --with-geodb=%{l_prefix}/var/%{name} \
   109 %if "%{with_dns}" == "yes"
   110         --enable-dns \
   111 %endif
   112 %if "%{with_geoip}" == "yes"
   113         --enable-geoip \
   114 %endif
   115         --enable-bz2 \
   116         --with-bz2lib=%{l_prefix}/lib \
   117         --with-bz2=%{l_prefix}/include \
   118         --with-etcdir=%{l_prefix}/etc/webalizer \
   119         --with-gdlib=%{l_prefix}/lib \
   120         --with-gd=%{l_prefix}/include \
   121         --with-z-inc=%{l_prefix}/include \
   122         --with-zlib=%{l_prefix}/lib \
   123         --with-png-inc=%{l_prefix}/include \
   124         --with-png=%{l_prefix}/lib \
   125         --with-db=%{l_prefix}/include \
   126         --with-dblib=%{l_prefix}/lib
   127     %{l_make} %{l_mflags -O}
   129 %install
   130     %{l_shtool} mkdir -f -p -m 755 \
   131         $RPM_BUILD_ROOT%{l_prefix}/bin \
   132         $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
   133         $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
   134         $RPM_BUILD_ROOT%{l_prefix}/etc/webalizer \
   135         $RPM_BUILD_ROOT%{l_prefix}/share/webalizer \
   136         $RPM_BUILD_ROOT%{l_prefix}/var/webalizer \
   137         $RPM_BUILD_ROOT%{l_prefix}/web/webalizer
   138     %{l_shtool} install -c -s -m 755 \
   139         webalizer $RPM_BUILD_ROOT%{l_prefix}/bin/
   140     %{l_shtool} install -c -m 644 \
   141         webalizer.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
   142     %{l_shtool} install -c -m 644 \
   143         sample.conf $RPM_BUILD_ROOT%{l_prefix}/etc/webalizer/webalizer.conf
   144     %{l_shtool} install -c -m 644 \
   145         GeoDB.dat $RPM_BUILD_ROOT%{l_prefix}/var/webalizer/
   146     %{l_shtool} install -c -m 644 \
   147         %{SOURCE webgraphicon.png} $RPM_BUILD_ROOT%{l_prefix}/web/webalizer/
   148     mv flags $RPM_BUILD_ROOT%{l_prefix}/share/webalizer/
   149     ln $RPM_BUILD_ROOT%{l_prefix}/bin/webalizer \
   150        $RPM_BUILD_ROOT%{l_prefix}/bin/webazolver
   151     %{l_shtool} install -c -m 755 %{l_value -s -a} \
   152         %{SOURCE rc.webalizer} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   153     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   154         %{l_files_std} \
   155         '%config %{l_prefix}/etc/webalizer/*'
   157 %files -f files
   159 %clean

mercurial