michael@123: ## michael@123: ## webalizer.spec -- OpenPKG RPM Package Specification michael@123: ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. michael@123: ## michael@123: ## Permission to use, copy, modify, and distribute this software for michael@123: ## any purpose with or without fee is hereby granted, provided that michael@123: ## the above copyright notice and this permission notice appear in all michael@123: ## copies. michael@123: ## michael@123: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@123: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@123: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@123: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@123: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@123: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@123: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@123: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@123: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@123: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@123: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@123: ## SUCH DAMAGE. michael@123: ## michael@123: michael@123: # package version michael@554: %define V_real 2.23-05 michael@554: %define V_here 2.23.05 michael@554: %define V_geodb 20120801 michael@123: michael@123: # package information michael@123: Name: webalizer michael@123: Summary: Graphical Web Statistics Program michael@123: URL: http://www.mrunix.net/webalizer/ michael@123: Vendor: Bradford L. Barrett michael@123: Packager: OpenPKG Foundation e.V. michael@123: Distribution: OpenPKG Community michael@123: Class: PLUS michael@123: Group: Logfile michael@123: License: GPL michael@123: Version: %{V_here} michael@554: Release: 20120800 michael@123: michael@123: # package options michael@154: %option with_dns no michael@154: %option with_geoip no michael@156: %option with_gwidth 512 michael@123: michael@123: # list of sources michael@151: Source0: ftp://ftp.mrunix.net/pub/webalizer/webalizer-%{V_real}-src.tgz michael@151: Source1: ftp://ftp.mrunix.net/pub/webalizer/geodb/webalizer-geodb-%{V_geodb}.tgz michael@151: Source2: ftp://ftp.mrunix.net/pub/webalizer/webalizer-flags.tgz michael@177: Source3: webgraphicon.png michael@177: Source4: rc.webalizer michael@156: Patch0: webalizer.patch michael@123: michael@123: # build information michael@554: BuildPreReq: OpenPKG, openpkg >= 20100101 michael@554: PreReq: OpenPKG, openpkg >= 20100101 michael@554: BuildPreReq: gd, png, zlib, bzip2, db >= 4.1.24, pkgconfig michael@123: PreReq: gd, png, zlib, bzip2, db >= 4.1.24 michael@123: %if "%{with_dns}" == "yes" michael@123: BuildPreReq: db::with_compat = yes michael@123: PreReq: db::with_compat = yes michael@123: %endif michael@154: %if "%{with_geoip}" == "yes" michael@154: BuildPreReq: geoip michael@154: PreReq: geoip michael@154: %endif michael@123: michael@123: %description michael@123: The Webalizer is a fast, free web server log file analysis program. michael@123: It produces highly detailed, easily configurable usage reports in michael@123: HTML format, for viewing with a standard web browser. michael@123: michael@123: %track michael@123: prog webalizer = { michael@123: version = %{V_real} michael@123: url = ftp://ftp.mrunix.net/pub/webalizer/ michael@123: regex = webalizer-(__VER__)-src\.tgz michael@123: } michael@123: michael@123: %prep michael@123: %setup -q -n webalizer-%{V_real} michael@139: ( cd webalizer-%{V_real} michael@139: %{l_gzip} -d -c %{SOURCE1} | %{l_tar} xf - michael@151: %{l_gzip} -d -c %{SOURCE2} | %{l_tar} xf - michael@139: ) || exit $? michael@156: %patch -p0 michael@156: %{l_shtool} subst \ michael@156: -e "s;@l_gwidth@;%{with_gwidth};g" \ michael@156: graphs.c \ michael@156: output.c michael@554: %{l_shtool} subst \ michael@554: -e 's;u_int64_t;uint64_t;g' \ michael@554: *.c *.h configure michael@554: %{l_shtool} subst \ michael@554: -e "s;\(\${LIBS}\);\1 `%{l_prefix}/bin/pkg-config --libs-only-l db`;g" \ michael@554: -e "s;\(\${WCMGR_LIBS}\);\1 `%{l_prefix}/bin/pkg-config --libs-only-l db`;g" \ michael@554: Makefile.in michael@123: michael@123: %build michael@123: CC="%{l_cc}" \ michael@123: CFLAGS="%{l_cflags -O}" \ michael@123: CPPFLAGS="%{l_cppflags} -DHAVE_DB_185_H" \ michael@124: GREP="grep" \ michael@123: ./configure \ michael@123: --prefix=%{l_prefix} \ michael@126: --sysconfdir=%{l_prefix}/etc/%{name} \ michael@132: --with-geodb=%{l_prefix}/var/%{name} \ michael@123: %if "%{with_dns}" == "yes" michael@123: --enable-dns \ michael@123: %endif michael@154: %if "%{with_geoip}" == "yes" michael@154: --enable-geoip \ michael@154: %endif michael@123: --enable-bz2 \ michael@123: --with-bz2lib=%{l_prefix}/lib \ michael@123: --with-bz2=%{l_prefix}/include \ michael@123: --with-etcdir=%{l_prefix}/etc/webalizer \ michael@123: --with-gdlib=%{l_prefix}/lib \ michael@123: --with-gd=%{l_prefix}/include \ michael@123: --with-z-inc=%{l_prefix}/include \ michael@123: --with-zlib=%{l_prefix}/lib \ michael@123: --with-png-inc=%{l_prefix}/include \ michael@123: --with-png=%{l_prefix}/lib \ michael@123: --with-db=%{l_prefix}/include \ michael@123: --with-dblib=%{l_prefix}/lib michael@123: %{l_make} %{l_mflags -O} michael@123: michael@123: %install michael@123: %{l_shtool} mkdir -f -p -m 755 \ michael@123: $RPM_BUILD_ROOT%{l_prefix}/bin \ michael@123: $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ michael@132: $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \ michael@132: $RPM_BUILD_ROOT%{l_prefix}/etc/webalizer \ michael@151: $RPM_BUILD_ROOT%{l_prefix}/share/webalizer \ michael@132: $RPM_BUILD_ROOT%{l_prefix}/var/webalizer \ michael@132: $RPM_BUILD_ROOT%{l_prefix}/web/webalizer michael@123: %{l_shtool} install -c -s -m 755 \ michael@123: webalizer $RPM_BUILD_ROOT%{l_prefix}/bin/ michael@123: %{l_shtool} install -c -m 644 \ michael@123: webalizer.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ michael@123: %{l_shtool} install -c -m 644 \ michael@123: sample.conf $RPM_BUILD_ROOT%{l_prefix}/etc/webalizer/webalizer.conf michael@139: %{l_shtool} install -c -m 644 \ michael@139: GeoDB.dat $RPM_BUILD_ROOT%{l_prefix}/var/webalizer/ michael@175: %{l_shtool} install -c -m 644 \ michael@177: %{SOURCE webgraphicon.png} $RPM_BUILD_ROOT%{l_prefix}/web/webalizer/ michael@151: mv flags $RPM_BUILD_ROOT%{l_prefix}/share/webalizer/ michael@123: ln $RPM_BUILD_ROOT%{l_prefix}/bin/webalizer \ michael@123: $RPM_BUILD_ROOT%{l_prefix}/bin/webazolver michael@132: %{l_shtool} install -c -m 755 %{l_value -s -a} \ michael@132: %{SOURCE rc.webalizer} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ michael@132: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ michael@132: %{l_files_std} \ michael@132: '%config %{l_prefix}/etc/webalizer/*' michael@123: michael@123: %files -f files michael@123: michael@123: %clean michael@123: