%global githubname Stikked Name: stikked Version: 0.14.0 Release: 1%{?dist} Summary: Pastebin written in PHP License: CC0 URL: https://github.com/claudehohl/%{githubname} Source0: https://github.com/claudehohl/%{githubname}/archive/%{version}/%{name}-%{version}.tar.gz Source1: stikked.conf Requires: webserver Requires: php php-mysqli php-gd BuildArch: noarch %description Stikked is an Open-Source PHP Pastebin, with the aim of keeping a simple and easy to use user interface. Stikked allows you to easily share code with anyone you wish. Based on the original Stikked with lots of bugfixes and improvements. %prep %setup -qn %{githubname}-%{version} %build cp htdocs/application/config/stikked.php.dist stikked.php cp %{SOURCE1} stikked.conf mv htdocs/application/.htaccess htaccess rm htdocs/application/libraries/phpqrcode/tools/merge.{bat,sh} chmod -x \ htdocs/themes/cleanwhite/js/codemirror/mode/d/d.js \ htdocs/themes/cleanwhite/js/codemirror/mode/d/index.html \ htdocs/themes/default/js/codemirror/mode/dylan/index.html \ htdocs/themes/stikkedizr/fonts/fontawesome-webfont.svg \ htdocs/themes/stikkedizr/js/codemirror/mode/dylan/index.html sed -i -e 's#@datadir@#%{_datadir}#g' stikked.conf sed -i \ -e '/db_hostname/ s#127.0.0.1#localhost#g' \ -e '/site_name/ s#Stikked#stikked#' \ -e '/theme/ s#default#bootstrap#' \ stikked.php # Delete hidden files rm -f htdocs/system/.htaccess \ htdocs/application/cache/.htaccess \ htdocs/static/asset/.keep %install %{__mkdir_p} %{buildroot}%{_datadir}/%{name} %{__mkdir_p} %{buildroot}%{_sysconfdir}/%{name} %{__mkdir_p} %{buildroot}%{_sysconfdir}/httpd/conf.d %{__cp} stikked.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/ %{__cp} -r htdocs/* %{buildroot}%{_datadir}/%{name} ln -s %{_sysconfdir}/%{name}/stikked.php %{buildroot}%{_datadir}/%{name}/application/config/ %{__cp} stikked.php %{buildroot}%{_sysconfdir}/%{name} %files %doc AUTHORS.md README.md doc htaccess %license CC0 %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf %config(noreplace) %{_sysconfdir}/%{name}/stikked.php %{_datadir}/%{name} %changelog * Sat Feb 20 2021 Didier Fabert 0.14.0-1 - Update from upstream * Sat Nov 16 2019 Didier Fabert 0.13.0-1 - First Release