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