Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Herbster0815:pihole
pi-hole-web
pi-hole-web.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pi-hole-web.spec of Package pi-hole-web
# # spec file for package pi-hole-web # # Copyright (c) 2020 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 http://bugs.opensuse.org/ # %define web_files_location /var/www/html/pihole %define php_ver 8 Name: pi-hole-web Version: 5.21 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 Source0: web-%{version}.tar.gz Source5: php-fpm-www.conf Source6: lighttpd.pi-hole.conf Source7: nginx.pi-hole.conf Source8: index.php Source9: blockingpage.css Source10: php-fpm_override.conf Source11: pi-hole-lighttpd.service # https://raw.githubusercontent.com/max72bra/pi-hole-server-archlinux-customization/master/arch-server-admin-5.13.patch Patch1: 001_%{name}_fix_php_sudo.patch Patch2: 002_%{name}_show_versions.patch Patch3: 003_%{name}_ftl_logpath.patch BuildRequires: lighttpd BuildRequires: user(wwwrun) BuildRequires: group(www) BuildRequires: user(pihole) BuildRequires: group(pihole) BuildRequires: fdupes BuildRequires: patch BuildRequires: xz Requires: php%{php_ver}-openssl Requires: php%{php_ver}-sqlite Requires: pi-hole %if 0%{?sle_version} == 150600 && 0%{?is_opensuse} Requires: /bin/pidof %else Requires: /usr/bin/pidof %endif Requires: lighttpd Requires: %{name}-config-php-fpm Requires: %{name}-config-lighttpd Requires: user(lighttpd) Requires: group(pihole) Obsoletes: php7-openssl Obsoletes: php7-sqlite Obsoletes: pi-hole-admin-lte BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %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 %package config-nginx Summary: Pi-hole web configuration files for nginx Group: Productivity/Networking/Web/Utilities Supplements: packageand(nginx:pihole-admin-lte) Recommends: %{name}-config-php-fpm Requires: nginx Requires: pi-hole Recommends: apache2-utils %description config-nginx If you want to run Pi-hole web via nginx and PHP-FPM, just install this package to get some easy to understand/adaptable configuration files that make it easy to setup web with Nginx. %package config-lighttpd Summary: Pi-hole web configuration files for lighttpd Group: Productivity/Networking/Web/Utilities Supplements: packageand(lighttpd:pi-hole-web) Requires: lighttpd Requires: php%{php_ver}-fastcgi Requires: php%{php_ver}-phar Requires: pi-hole Obsoletes: php7-fastcgi Obsoletes: php7-phar %description config-lighttpd If you want to run Pi-hole web via lighttpd, just install this package to get some easy to understand/adaptable configuration files that make it easy to setup web with Lighttpd. %package config-php-fpm Summary: Pi-hole web configuration files for PHP-FPM Group: Productivity/Networking/Web/Utilities Requires: php%{php_ver}-fpm Obsoletes: php7-fpm Supplements: packageand(php-fpm:pi-hole-web) %description config-php-fpm If you want to run Pi-hole web via PHP-FPM, just install this package to get some easy to understand/adaptable configuration files that make it easy to run web via PHP-FPM. %prep %setup -q -n web-%{version} %patch1 -p1 %patch2 -p1 %patch3 -p1 %build # Nothing to do. %install install -dm775 %{buildroot}%{web_files_location} install -dm775 %{buildroot}%{web_files_location}/admin cp -dpr --no-preserve=ownership %{_builddir}/web-%{version}/* %{buildroot}%{web_files_location}/admin/ install -dm775 %{buildroot}%{web_files_location}/pihole install -Dm664 %{S:8} %{buildroot}%{web_files_location}/pihole/index.php install -Dm664 %{S:9} %{buildroot}%{web_files_location}/pihole/blockingpage.css install -dm755 %{buildroot}%{_datadir}/%{name}/configs/ 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 # Nginx configuration install -D -m 0644 %{S:7} %{buildroot}%{_sysconfdir}/nginx/conf.d/pihole_nginx.conf # Lighttpd configuration install -D -m 0644 %{S:6} %{buildroot}%{_sysconfdir}/lighttpd/pihole_lighttpd.conf install -d -m 0755 %{buildroot}%{_unitdir} install -D -m 0644 %{S:11} %{buildroot}%{_unitdir}/ install -d -m 0755 %{buildroot}%{_sbindir} ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcpi-hole-lighttpd # PHP-FPM configuration install -D -m 0664 %{S:5} %{buildroot}%{_sysconfdir}/php%{php_ver}/fpm/php-fpm.d/pihole_php_fpm.conf install -dm755 %{buildroot}%{_unitdir}/php-fpm.service.d install -Dm644 %{S:10} %{buildroot}%{_unitdir}/php-fpm.service.d/override.conf # These probably are useless for end user. rm %{buildroot}%{web_files_location}/admin/scripts/vendor/daterangepicker.min.js.map rm %{buildroot}%{web_files_location}/admin/scripts/vendor/bootstrap-select.min.js.map rm %{buildroot}%{web_files_location}/admin/scripts/vendor/bootstrap-toggle.min.js.map %fdupes %buildroot %pre config-lighttpd echo "Disabling automatic start of lighttpd if needed..." systemctl list-unit-files | grep enabled | grep lighttpd && systemctl disable lighttpd echo "Stopping running lighttpd if needed..." systemctl list-units --type=service --state=active | grep lighttpd && systemctl stop lighttpd %service_add_pre pi-hole-lighttpd.service %post config-lighttpd %service_add_post pi-hole-lighttpd.service %preun config-lighttpd %service_del_preun pi-hole-lighttpd.service %postun config-lighttpd %service_del_postun pi-hole-lighttpd.service %files %defattr(-,root,root,-) %license LICENSE %doc README.md %doc CONTRIBUTING.md %attr(0775,lighttpd,pihole) %dir /var/www %attr(0775,lighttpd,pihole) %dir /var/www/html %attr(0775,lighttpd,pihole) %dir %{web_files_location} %attr(0775,lighttpd,pihole) %dir %{web_files_location}/pihole %attr(0775,lighttpd,pihole) %{web_files_location}/pihole/* %attr(0775,lighttpd,pihole) %dir %{web_files_location}/admin %attr(0775,lighttpd,pihole) %{web_files_location}/admin/* %files config-php-fpm %defattr(-,root,root) %dir %{_sysconfdir}/php%{php_ver} %dir %{_sysconfdir}/php%{php_ver}/fpm %dir %{_sysconfdir}/php%{php_ver}/fpm/php-fpm.d %attr(0775,pihole,pihole) %dir /var/log/pihole/ %config(noreplace) %{_sysconfdir}/php%{php_ver}/fpm/php-fpm.d/pihole_php_fpm.conf %dir %{_unitdir}/php-fpm.service.d %{_unitdir}/php-fpm.service.d/override.conf %files config-nginx %defattr(-,root,root) %dir %{_sysconfdir}/nginx %dir %{_sysconfdir}/nginx/conf.d %config %{_sysconfdir}/nginx/conf.d/pihole_nginx.conf %files config-lighttpd %defattr(-,root,root) %config %{_sysconfdir}/lighttpd/pihole_lighttpd.conf %{_unitdir}/pi-hole-lighttpd.service %{_sbindir}/rcpi-hole-lighttpd %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor