Blob Blame History Raw
Name: zikula
Version: 1.2.3
Release: 4%{?dist}
Summary: Zikula is a free open source Web Application Framework
Group:   Applications/Publishing
License: GPLv2+
# There is some content in this package that is LGPL with the bulk
# GPLv2+ thus overall package should be GPLv2+ 
URL: http://www.zikula.org/
Source0: Zikula-%{version}.zip
#URL for source is http://zikula.org/CMS/Download/
Source1: zikula.conf
#this is being discussed upstream - for the moment it is a fedora only file
#see http://groups.google.com/group/zikula-discussions/browse_thread/thread/2f44d45a975d1515/
Patch0: %{name}-%{version}-config.patch
#Patch is recorded in ticket 901 on the zikula trac instance
Patch1: %{name}hash.patch
#Patch changes the sha256 hash function that's called to use php5's implementation.
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Requires: httpd
Requires: php >= 5.1.2
Requires: php-mysql >= 5.1.2
Requires: php-pgsql >= 5.1.2
Requires: php-Smarty
Requires: php-mcrypt
Requires: php-adodb
Requires: php-simplepie
Requires: php-IDNA_Convert
Requires: php-mbstring
Requires: symlinks
BuildRequires: dos2unix
Requires(post): symlinks
Requires(pre): policycoreutils

%description
A free open source Web Application Framework. 
It can be used to develop robust, secure, interactive and 
editable websites and web based applications. Zikula is written 
in PHP, object oriented, and fully modular. It requires a database 
 and may use all leading database platforms like MySQL, 
PostgreSQL and Microsoft SQL Server. 
Zikula is the successor to the PostNuke project.

%pre
semanage fcontext -a -t httpd_var_run_t %{_sysconfdir}/%{name}/config.php > /dev/null 2>&1 || :
semanage fcontext -m -t httpd_var_run_t %{_sysconfdir}/%{name}/config.php > /dev/null 2>&1 || :

%prep
%setup -qn Zikula-%{version}
%patch0 -p0 
%patch1 -p0
find . -type f -perm 755 -exec chmod 0644 '{}' \;
#find .  \( -name "*.php" -o -name "*.txt" -o -name "*htm*" -o -name "*.css" -o -name "*.js" -o -name "*.ini" \)  -exec chmod 0644 '{}' \;
chmod -x docs/COPYING
%build
#nothing really for this section but rpmbuild complains if build is empty

%install
rm -rf %{buildroot}
%{__mkdir} -p %{buildroot}/%{_datadir}/%{name}
%{__mkdir} -p %{buildroot}/%{_localstatedir}/lib/%{name}
%{__mkdir} -p %{buildroot}/%{_sysconfdir}/%{name}
%{__mkdir} -p %{buildroot}/%{_sysconfdir}/httpd/conf.d/

# Following are deleted as Zikula checks the internal system looking for these libs
# before using the 'bundled' versions. 
rm -rf includes/classes/encryption
rm -rf includes/classes/hashes
rm -rf includes/classes/JSON

# Following are deleted and symlinks will be created below to link to the 
# appropriate site packages. 
rm -rf includes/classes/Smarty
rm -rf includes/classes/adodb
rm -rf includes/classes/SimplePie
cp -pr config images includes install javascript locale language modules system themes -t %{buildroot}/%{_datadir}/%{name}
install -m 0644 *php robots.txt  %{buildroot}/%{_datadir}/%{name}


cp -pr pnTemp -t %{buildroot}/%{_localstatedir}/lib/%{name}
install -m 0664 ./config/config.php %{buildroot}/%{_sysconfdir}/%{name}/config.php
ln -sf %{_sysconfdir}/%{name}/config.php %{buildroot}/%{_datadir}/%{name}/config/config.php
install -m 0644 -D -p %{SOURCE1} %{buildroot}/%{_sysconfdir}/httpd/conf.d/zikula.conf
#ln -sf %{_datadir}/php/adodb/ %{buildroot}/%{_datadir}/%{name}/includes/classes/adodb || :
#ln -sf %{_datadir}/php/Smarty/ %{buildroot}/%{_datadir}/%{name}/includes/classes/Smarty || :
#ln -sf %{_datadir}/php/php-simplepie/ %{buildroot}/%{_datadir}/%{name}/includes/classes/SimplePie || :
#ln -sf %{_datadir}/php/IDNA_Convert/ %{buildroot}/%{_datadir}/%{name}/includes/classes/idna || :
#symlinks -crs %{buildroot}/%{_datadir}/%{name}/includes/
rm -f %{buildroot}/%{datadir}/%{name}/includes/.htaccess

#changinng encoding
iconv -f ISO-8859-1 -t UTF-8  --output %{_builddir}/Zikula-%{version}/docs/previouscredits.txt %{_builddir}/Zikula-%{version}/docs/previouscredits.txt

cd %{buildroot}
cd -
#Making script executable to stop rpmlint from complaining
chmod 0755 %{buildroot}/%{_datadir}/%{name}/javascript/phplayersmenu/CHANGE_TEMPLATE_CLASS_NAME.sh
#Getting rid of zerolength files
find ${RPM_BUILD_ROOT} -empty -exec rm -f {} \;

#Purging .htaccess files
find ${RPM_BUILD_ROOT} -name .htaccess -exec rm -f {} \;
%clean
rm -rf %{buildroot}

%files

%defattr(-,root,root,-)
%doc docs/*
%{_datadir}/%{name}
%attr(-,apache,apache) %{_localstatedir}/lib/%{name}
%config(noreplace) %{_sysconfdir}/httpd/conf.d/zikula.conf
%attr(664,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/config.php


%post
ln -sf /usr/share/php/php-gettext /usr/share/zikula/includes/classes/php-gettext 2>&1 || :
ln -sf /usr/share/doc/zikula-1.1.2 /usr/share/zikula/docs > /dev/null 2>&1 || :
ln -sf /usr/share/php/adodb /usr/share/zikula/includes/classes/adodb > /dev/null 2>&1 || :
ln -sf /usr/share/php/Smarty /usr/share/zikula/includes/classes/Smarty > /dev/null 2>&1 || :
ln -sf /usr/share/php/php-simplepie /usr/share/zikula/includes/classes/SimplePie > /dev/null 2>&1 || :
symlinks -crs /usr/share/zikula/includes/ > /dev/null 2>&1 || :
symlinks -crs /usr/share/zikula > /dev/null 2>&1 || :

%changelog
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed May 12 2010 David Nalley <david@gnsa.us> 1.2.3-1
- upgrading to 1.2.3
- removed jsminify patch, and thus requirement for custom tarball
- fixes XSS and CSRF security problems. 
* Sun Dec 06 2009 David Nalley <david@gnsa.us> 1.2.0-1
- upgrading to 1.2.0
- added require for php-gettext and symlinked it to includes/classes
- added patch to strip jsminify support
- build custom tarball because upstream ships non-free libs
* Sun Aug 24 2009 David Nalley <david@gnsa.us> 1.1.2-3
- changed requirement for dos2unix to build requirement 

* Sun Aug 23 2009 David Nalley <david@gnsa.us> 1.1.2-2
- added requirement for dos2unix

* Sun Aug 23 2009 David Nalley <david@gnsa.us> 1.1.2-1
- upgraded to 1.1.2 to match upstream bug 514301
- changed php version requirements to 5.1.2 to remove bundling of sha256 library
- added symlinks silencing per ian wellers bug 511137
- silenced selinux problems 
- Added requires for php-Smarty, php-adodb, php-mcrypt
- Deleted unused JSON, encrypytion, and hashes libraries which were bundled for 493237

* Wed Aug 12 2009 Paul W. Frields <stickster@gmail.com> - 1.1.1-13
- Upstream docs advise that PHP >= 4.3 is correct requirement
 
* Sat Mar 14 2009 David Nalley <david@gnsa.us> 1.1.1-12
- appended zero exit snippet to all pre and post lines

* Fri Mar 13 2009 Clint Savage <herlo@fedoraproject.org> 1.1.1-11
- added an additional selinux call to modify the context when the 
- selinux context already exists

* Sun Mar 8 2009 David Nalley <david@gnsa.us> 1.1.1-10
- moved selinux stuff to pre rather than post

* Sun Mar 1 2009 David Nalley <david@gnsa.us> 1.1.1-9
- reverted earlier SElinux issues and used semanage to make it persistent
- added symlink to /usr/share/docs for license and contributors to show up
- changed symlinks command to recurse over enter _datadir 

* Sun Mar 1 2009 David Nalley <david@gnsa.us> 1.1.1-8
- fixed another SELinux issues pointed out by herlo

* Sun Mar 1 2009 David Nalley <david@gnsa.us> 1.1.1-7
- fixed SElinux context problem pointed out by herlo

* Sat Feb 28 2009 David Nalley <david@gnsa.us> 1.1.1-6
- removed most install lines, replaced with cp -r 
- fixed permissions on config file
- fixed permissions on pntemp dir

* Sat Feb 21 2009 David Nalley <david@gnsa.us> 1.1.1-5
- fixed install issues. 

* Sat Feb 21 2009 David Nalley <david@gnsa.us> 1.1.1-4
- changed perms

* Sat Feb 21 2009 David Nalley <david@gnsa.us> 1.1.1-3
- Fixing dangling symlink

* Tue Feb 17 2009 David Nalley <david@gnsa.us> 1.1.1-2
- Fixed iconv issues and symlinks

* Sun Feb 09 2009 Clint Savage <herlo@fedoraproject.org> 1.1.1-1
- Fixed some minor packaging issues.

* Wed Jan 28 2009 David Nalley <david@gnsa.us> 1.1.0-4
- Changed license to GPLv2+

* Mon Jan 26 2009 Lukas Hetzenecker <LuHe@gmx.at> 1.1.0-3
- Move the pnTemp directory to /var/lib/zikula/pnTemp

* Mon Jan 26 2009 Lukas Hetzenecker <LuHe@gmx.at> 1.1.0-1
- Initial Spec file creation for Fedora