Name: tikiwiki Version: 4.1 Release: 1%{?dist} Summary: Website/Wiki/Groupware/CMS/Forum/Blog/Bug Tracker written in PHP Group: Applications/Internet #Entire code is under LGPLv2, package contains libraries under different licenses License: LGPLv2 and Zend and BSD and MIT and PHP and AGPLv3 and ASL 2.0 and Copyright only URL: http://tikiwiki.org/ Source0: http://downloads.sourceforge.net/project/tikiwiki/Tiki%204.x%20-Aldebaran-/Tiki%204.1/tiki-4.1.tar.bz2 Source1: tikiwiki.conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: webserver Requires: php Requires: php-ZendFramework Requires: php-ZendFramework-Captcha Requires: php-Smarty Requires: php-feedcreator Requires: php-layers-menu Requires: php-adodb #Fix wrong smarty plugins path in installer Patch0: tikiwiki-smartypath.patch %description TikiWiki is a powerful web-based application created by large team of developers from the TikiWiki CMS/Groupware project. TikiWiki is the perfect tool for you to build and maintain your Website/Wiki/Groupware/CMS/Forum/Blog/Bug Tracker or any other project you can imagine running in your browser window %prep %setup -qn tikiwiki-4.1 %patch0 -p2 -b .smartypath %build %install %{__rm} -rf %{buildroot} %{__mkdir} -p %{buildroot}%{_datadir}/%{name} %{__mkdir} -p %{buildroot}%{_sysconfdir}/httpd/conf.d/ %{__cp} -ad ./* %{buildroot}%{_datadir}/%{name} %{__cp} %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/tikiwiki.conf #Move changeable files into /var %{__mkdir} -p %{buildroot}%{_localstatedir}/lib/%{name} %{__mkdir} -p %{buildroot}%{_localstatedir}/lib/%{name}/img %{__mkdir} -p %{buildroot}%{_localstatedir}/lib/%{name}/modules %{__mkdir} -p %{buildroot}%{_localstatedir}/lib/%{name}/tiki_tests DIRS="backups db dump img/wiki img/wiki_up img/trackers modules/cache temp templates_c templates styles maps whelp mods files tiki_tests/tests" for dir in $DIRS; do if [ -d %{buildroot}%{_datadir}/%{name}/$dir ]; then %{__mv} %{buildroot}%{_datadir}/%{name}/$dir %{buildroot}%{_localstatedir}/lib/%{name}/$dir else %{__mkdir} %{buildroot}%{_localstatedir}/lib/%{name}/$dir fi ln -s %{_localstatedir}/lib/%{name}/$dir %{buildroot}%{_datadir}/%{name}/$dir done #Remove .htaccess files find %{buildroot}%{_datadir}/%{name} -type f -name "*.htaccess" -exec rm -f {} \; find %{buildroot}%{_localstatedir}/lib/%{name} -type f -name "*.htaccess" -exec rm -f {} \; #Replace Smarty library with system one %{__rm} -rf %{buildroot}%{_datadir}/%{name}/lib/smarty/* ln -s /usr/share/php/Smarty %{buildroot}%{_datadir}/%{name}/lib/smarty/libs #Replace FeedCreator class with system one %{__rm} -f %{buildroot}%{_datadir}/%{name}/lib/feedcreator/feedcreator.class.php ln -s /usr/share/php/feedcreator.class.php %{buildroot}%{_datadir}/%{name}/lib/feedcreator/feedcreator.class.php #Replace PHPLayers library with system one %{__rm} -rf %{buildroot}%{_datadir}/%{name}/lib/phplayers ln -s /usr/share/php/php-layers-menu %{buildroot}%{_datadir}/%{name}/lib/phplayers #Replace adodb library with system one %{__rm} -rf %{buildroot}%{_datadir}/%{name}/lib/adodb ln -s /usr/share/php/adodb %{buildroot}%{_datadir}/%{name}/lib/adodb %clean %{__rm} -rf %{buildroot} %files %defattr(-,root,root,-) %doc copyright.txt changelog.txt INSTALL license.txt README %{_datadir}/%{name} %exclude %{_datadir}/%{name}/copyright.txt %exclude %{_datadir}/%{name}/changelog.txt %exclude %{_datadir}/%{name}/INSTALL %exclude %{_datadir}/%{name}/README %config(noreplace) %{_sysconfdir}/httpd/conf.d/tikiwiki.conf %config(noreplace) %attr(-,apache,apache) %{_localstatedir}/lib/%{name} #Remove Zend from package %exclude %{_datadir}/%{name}/lib/core/lib/Zend %changelog * Mon Feb 15 2010 Jan Gorig 4.1-1 - Initial version for Fedora - Slightly inspirated by tikiwiki-3.1-2mdv2010.0.src.rpm