LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

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

Name:               goaccess
Version:            0.5
%define pkg_version %{version}
Release:            0
Summary:            Apache Web Log Analyzer 
Source:             http://prdownloads.sourceforge.net/goaccess/goaccess-%{pkg_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 -n "%{name}-%{pkg_version}"
# 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 %{?jobs:-j%{jobs}}

%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%{ext_man}