File pi-hole-web.spec of Package pi-hole

#
# spec file for package pi-hole-admin-lte
#
# Copyright (c) 2026 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2026 Alessandro de Oliveira Faria (A.K.A CABELO) <cabelo@opensuse.org>
#                    Raphael Bastos (a.k.a coffnix)
#
# 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/
#
%define         web_files_location     /var/www/html/
Name:           pi-hole-web
Version:        6.4.1
Release:        1.1
Summary:        Pi-hole dashboard for stats and more
License:        EUPL-1.2
Group:          Productivity/Networking/Other
Url:            https://pi-hole.net/
# https://github.com/pi-hole/web/tree/development-v6
Source0:        %{name}-%{version}.tar.gz
Requires:       pi-hole
BuildRequires:  sysuser-tools
BuildRequires:  user(pihole)
BuildRequires:  group(pihole)
BuildRequires:  fdupes
BuildRequires:  patch
BuildRequires:  xz
Requires:       procps
Requires:       group(pihole)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Obsoletes:	    pi-hole-admin-lte

%description
Pi-hole®'s Web interface (based off of AdminLTE) provides a central location to manage your Pi-hole and review the statistics generated by FTLDNS™.

* Easy-to-interpret: simple graphs and beautiful colors make Pi-hole's stats easy to understand
* Responsive: looks great on desktop, tablets, and mobile devices
* Useful: control and configure your Pi-hole with our settings
* Insightful: use the query log, audit log, or long-term stats to gain insight into your networks activity

%prep
%setup -q -n %{name}-%{version}

%build
# Nothing to do.

%install
install -dm775 %{buildroot}%{web_files_location}
install -dm775 %{buildroot}%{web_files_location}/admin
cp -dpr --no-preserve=ownership %{_builddir}/%{name}-%{version}/* %{buildroot}%{web_files_location}/admin/
install -dm775 %{buildroot}/var/log/pihole
rm %{buildroot}%{web_files_location}/admin/CONTRIBUTING.md
rm %{buildroot}%{web_files_location}/admin/README.md
rm %{buildroot}%{web_files_location}/admin/LICENSE

%fdupes %buildroot

%files
%defattr(-,root,root,-)
%license LICENSE
%doc README.md
%doc CONTRIBUTING.md
%attr(0775,pihole,pihole) %dir /var/www
%attr(0775,pihole,pihole) %dir /var/www/html
%attr(0775,pihole,pihole) %dir %{web_files_location}
%attr(0775,pihole,pihole) %dir %{web_files_location}/admin
%attr(0775,pihole,pihole) %{web_files_location}/admin/*

%changelog

openSUSE Build Service is sponsored by