Summary: Web-based news feed reader and aggregator Name: Tiny-Tiny-RSS Version: 1.7.4 Release: 2%{?dist} License: GPLv2 Group: Applications/Internet URL: http://tt-rss.org/ Source0: https://github.com/gothfox/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: %{name}-httpd-conf Source2: %{name}-README.fedora Requires: httpd, php, php-mbstring, php-xml # Database support Requires: php-pgsql, php-mysql # Bundled libraries removed in the prep section Requires: php-php-gettext Requires: php-simplepie Requires: php-PHPMailer Requires: php-htmLawed Requires: sphinx-php Requires: php-posix Requires: php-pcntl Requires: php-date Requires(post): policycoreutils-python Requires(postun): policycoreutils-python BuildArch: noarch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %description Tiny Tiny RSS is an open source web-based news feed (RSS/Atom) reader and aggregator, designed to allow you to read news from any location, while feeling as close to a real desktop application as possible. %prep %setup -q # Not for us rm -rf debian # Remove development utils rm -rf utils # Remove bundled libraries (see Requires) rm -rf lib/{gettext,phpmailer,simplepie,htmLawed,sphinxapi} # Change path to libraries grep 'require_once \"lib/simplepie' include/rssfuncs.php sed -i 's|require_once \"lib/simplepie|require_once \"php-simplepie|' include/rssfuncs.php grep 'require_once \"lib/gettext' include/functions.php sed -i 's|require_once \"lib/gettext|require_once \"gettext|' include/functions.php grep "require_once 'lib/htmLawed" include/functions.php sed -i "s|require_once 'lib/htmLawed|require_once 'htmLawed/htmLawed|" include/functions.php grep "require_once 'lib/sphinxapi.php" include/functions.php sed -i "s|require_once 'lib/sphinxapi.php|require_once 'sphinxapi.php|" include/functions.php # Remove hidden files find . -name .htaccess -exec rm {} \; find . -name .empty -exec rm {} \; find . -name .gitignore -exec rm {} \; rm .project .buildpath rm -rf .settings # German message catalogs are executable. Warum? chmod -x locale/de_DE/LC_MESSAGES/messages.{mo,po} # rpm-specific README cp -a %{SOURCE2} README.fedora %build #No build %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_sysconfdir}/{httpd/conf.d,%{name}}} cp -ad * $RPM_BUILD_ROOT%{_datadir}/%{name} install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf # Install the configuration file install -p -m 600 $RPM_BUILD_ROOT%{_datadir}/%{name}/config.php-dist $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.php ln -s %{_sysconfdir}/%{name}/config.php $RPM_BUILD_ROOT%{_datadir}/%{name}/config.php rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/contrib %clean rm -rf $RPM_BUILD_ROOT %post ( semanage fcontext -a -t httpd_sys_rw_content_t "%{_datadir}/%{name}/cache/images(/.*)?" semanage fcontext -a -t httpd_sys_rw_content_t "%{_datadir}/%{name}/cache/export(/.*)?" semanage fcontext -a -t httpd_sys_rw_content_t "%{_datadir}/%{name}/feed-icons(/.*)?" semanage fcontext -a -t httpd_sys_rw_content_t "%{_datadir}/%{name}/lock(/.*)?" restorecon -R %{_datadir}/%{name}/cache/images restorecon -R %{_datadir}/%{name}/cache/export restorecon -R %{_datadir}/%{name}/feed-icons restorecon -R %{_datadir}/%{name}/lock ) &> /dev/null systemctl try-restart httpd.service %postun if [ "$1" -eq "0" ]; then # Remove the File Context ( semanage fcontext -d "%{_datadir}/%{name}/cache/images(/.*)?" semanage fcontext -d "%{_datadir}/%{name}/cache/export(/.*)?" semanage fcontext -d "%{_datadir}/%{name}/feed-icons(/.*)?" semanage fcontext -d "%{_datadir}/%{name}/lock(/.*)?" ) &>/dev/null fi %files %defattr(-,root,root,-) %doc README.md LICENSE README.fedora %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf %{_sysconfdir}/%{name} %attr(-, apache, apache) %config(noreplace) %{_sysconfdir}/%{name}/config.php %{_datadir}/%{name}/ %attr(-, apache, apache) %{_datadir}/%{name}/cache/images %attr(-, apache, apache) %{_datadir}/%{name}/cache/export %attr(-, apache, apache) %{_datadir}/%{name}/feed-icons %attr(-, apache, apache) %{_datadir}/%{name}/lock %changelog * Sun Mar 24 2013 Sébastien Willmann - 1.7.4-2 - Fixed sphinx unbundling - Fixed config.php permissions - Requiring policycoreutils-python - Added instructions to README.fedora about SELinux - Changed default url path to tt-rss - Requiring php-htmLawed * Sat Mar 16 2013 Sébastien Willmann - 1.7.4-1 - Update to version 1.7.4 * Sun Jul 01 2012 Sébastien Willmann - 1.5.11-2 - Moved configuration file to /etc - Added README.rpm * Sat Jun 09 2012 Sébastien Willmann - 1.5.11-1 - Initial spec file