File PimpMyLog.spec of Package PimpMyLog

# spec file for package PimpMylog
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# 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

%define apxs %{_sbindir}/apxs2
%define ap_sysconfdir %(%{apxs} -q SYSCONFDIR)
%define ap_serverroot %(%{apxs} -q PREFIX)

Name:           PimpMyLog
Version:        1.7.14
Release:        0
Summary:        Log viewer for your web Server
License:        GPL-3.0
Group:          System/Monitoring
Source1:        %{name}-http.conf
BuildRequires:  dos2unix
BuildRequires:  apache2-devel
Requires:       apache2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

Pimp my Log is a web app written in PHP. It displays server logs friendly.

Formerly named PHP Apache Log Viewer, it has been renamed because any kind of logs can be displayed now.
Basically, you will surely display your Apache, NGINX, IIS or PHP logs, but Ruby on Rails, Tomcat, sshd, syslog, CakePHP, ... too !

By default, Pimp My Log supports :

    Apache web server
    NGINX web server
    IIS web server
    PHP log files

%setup -q
# rpmlintrc
dos2unix ./inc/classes/Feedcreator.php

# no build needed

# install PimpMylog.conf to apache conf.d
%{__install} -D -m0640 %{SOURCE1} %{buildroot}%{ap_sysconfdir}/conf.d/%{name}.conf
# install PimpMylog
%{__install} -d -m0755 %{buildroot}%{ap_serverroot}/%{name}
cp -dR * %{buildroot}%{ap_serverroot}/%{name}/
# install config.user.d
%{__install} -d -m0755 %{buildroot}%{ap_serverroot}/%{name}/config.user.d
# remove files for docdir
rm %{buildroot}%{ap_serverroot}/%{name}/ 
rm %{buildroot}%{ap_serverroot}/%{name}/licence.txt
# not need
rm %{buildroot}%{ap_serverroot}/%{name}/humans.txt
# must delete, otherwise build error in Tumbleweed, Factory and 13.2
%if 0%{?suse_version} >= 1320 
rm %{buildroot}%{ap_serverroot}/%{name}/img/apple-touch-icon.png

%doc licence.txt
%config(noreplace) %{ap_sysconfdir}/conf.d/%{name}.conf
%dir %{ap_serverroot}/%{name}