LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File goaccess.spec of Package goaccess (Project server:http)

# Copyright (c) 2013 Pascal Bleser <pascal.bleser@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

# vim: set sw=4 ts=4 et nu:

Name:           goaccess
Version:        0.7
Release:        0
Summary:        Apache Web Log Analyzer 
Source:         http://prdownloads.sourceforge.net/goaccess/goaccess-%{version}.tar.gz
URL:            http://goaccess.prosoftcorp.com/
Group:          Productivity/Networking/Web/Utilities
License:        GPL-2.0+
BuildRoot:      %{_tmppath}/build-%{name}-%{version}
BuildRequires:  libGeoIP-devel
BuildRequires:  ncurses-devel
BuildRequires:  glib2-devel
BuildRequires:  gcc make glibc-devel pkgconfig
BuildRequires:  autoconf automake libtool

%description
GoAccess is a free and open source Apache web log analyzer that provides fast
and valuable HTTP statistics for system administrators that require a visual
report on the fly.

%prep
%setup -q
# Remove build time references so build-compare can do its work
sed -i "s/__DATE__/\"openSUSE\"/" error.c
sed -i "s/__TIME__/\"BuildService\"/" error.c

%build
export SUSE_ASNEEDED=0
export CPPFLAGS="%{optflags} -I/usr/include/ncurses"
%if 0%{?suse_version} > 0 && 0%{?suse_version} < 1030
export PKG_CONFIG_PATH="/opt/gnome/%{_lib}/pkgconfig:$PKG_CONFIG_PATH"
export GLIB2_CFLAGS=`pkg-config glib-2.0 --cflags`
export GLIB2_LIBS=`pkg-config glib-2.0 --libs`
export CPPFLAGS="$CPPFLAGS${CPPFLAGS+ }$GLIB2_CFLAGS"
export LDFLAGS="$LDFLAGS${LDFLAGS+ }$GLIB2_LIBS"
%endif
%configure \
    --enable-geoip \
    --enable-utf8

%__make %{?_smp_flags}

%install
%makeinstall

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_bindir}/goaccess
%doc %{_mandir}/man1/goaccess.1*