Blob Blame History Raw
%global wp_content %{_datadir}/wordpress/wp-content
%global betatag RC2

Summary: Blog tool and publishing platform
URL: http://www.wordpress.org
Name: wordpress
Version: 3.3
Group: Applications/Publishing
Release: 1%{?dist}
License: GPLv2
Source0: http://wordpress.org/%{name}-%{version}.tar.gz
Source1: wordpress-httpd-conf
Source2: README.fedora.wordpress
Source3: README.fedora.wordpress-mu
# Patch out copyrighted text of Hello, Dolly
# (and replace it with Free Software Song)
Patch0: wordpress-debian_patches_hello.patch
# Move wp-content to /var/www/wordpress/
Patch1: wordpress-move-wp-content.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: php >= 5.2.4, webserver, php-mysql, php-gettext, php-simplepie
Provides: wordpress-mu = %{version}-%{release}
Obsoletes: wordpress-mu < 2.9.3
BuildArch: noarch

%description
Wordpress is an online publishing / weblog package that makes it very easy,
almost trivial, to get information out to people on the web.

%prep
%setup -q -n wordpress

%patch0 -p1 -b .dolly
#%patch1 -p1 -b .rhbz522897

# disable wp_version_check, updates are always installed via rpm
sed -i -e "s,\(.*\)'wp_version_check'\(.*\),#\1'wp_version_check'\2,g" \
	wp-includes/update.php
# disable update_nag() function
sed -i -e "s,\(.*\)'update_nag'\(.*\),#\1'update_nag'\2,g; \
	s,\(.*\)\$msg .=\(.*\),\1\$msg .= '';,g;" \
	wp-admin/includes/update.php
# fix file encoding
sed -i -e 's/\r//' license.txt

%build

%install
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/wordpress
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/wordpress
install -m 0644 -D -p %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/wordpress.conf
cp -pr * ${RPM_BUILD_ROOT}%{_datadir}/wordpress
cat wp-config-sample.php | sed -e "s|dirname(__FILE__).'/'|'/usr/share/wordpress/'|g" > \
	${RPM_BUILD_ROOT}%{_sysconfdir}/wordpress/wp-config.php
/bin/ln -sf ../../../etc/wordpress/wp-config.php ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-config.php
/bin/cp %{SOURCE2} ./README.fedora
/bin/cp %{SOURCE3} ./README.fedora-multiuser

# Create additional wp-content directories so we can own them
install -d ${RPM_BUILD_ROOT}%{wp_content}/{plugins,themes,upgrade,uploads}

# Remove empty files to make rpmlint happy
find ${RPM_BUILD_ROOT} -type f -empty -exec rm -vf {} \;
# These are docs, remove them from here, docify them later
rm -f ${RPM_BUILD_ROOT}%{_datadir}/wordpress/{license.txt,readme.html}

# Remove bundled php-gettext and link to system copy
rm -f ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/gettext.php

# Remove bundled php-simplepie and link to system copy
rm -f ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-simplepie.php
ln -sf /usr/share/php/php-simplepie/simplepie.inc ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-simplepie.php

# Remove backup copies of patches
find ${RPM_BUILD_ROOT} \( -name \*.dolly -o -name \*.rhbz522897 -o -name \*.FSFaddr \) \
    -print -delete

## Move wp-content directory to /var/www location
#mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/www/wordpress
#mv -v ${RPM_BUILD_ROOT}%{wp_content}/ \
#  ${RPM_BUILD_ROOT}%{_localstatedir}/www/wordpress

#%post
#if [ $1 -eq 2 ] ; then
## In case user has old wp-content from previous version, move it to
## the new location.
#mv -uf %{wp_content}/* %{_localstatedir}/www/wordpress/
#/sbin/restorecon -R %{_localstatedir}/www/wordpress/
#fi

%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/httpd/conf.d/wordpress.conf
%dir %{_datadir}/wordpress
%{_datadir}/wordpress/wp-admin
%{_datadir}/wordpress/wp-includes
%{_datadir}/wordpress/index.php
%dir %{wp_content}/
%{wp_content}/index.php
%dir %attr(0775,apache,ftp) %{wp_content}/plugins
%dir %attr(0775,apache,ftp) %{wp_content}/themes
%dir %attr(0775,apache,ftp) %{wp_content}/upgrade
%dir %attr(0775,apache,ftp) %{wp_content}/uploads
%{wp_content}/plugins/*
%{wp_content}/themes/*
%doc license.txt
%doc readme.html
%doc README.fedora
%doc README.fedora-multiuser
%{_datadir}/wordpress/wp-*.php
%config(noreplace) %{_sysconfdir}/wordpress/wp-config.php
%{_datadir}/wordpress/xmlrpc.php
%dir %{_sysconfdir}/wordpress

%changelog
* Tue Dec 13 2011 'Matěj Cepl <mcepl@redhat.com>' - 3.3-1
- New upstream release.

* Wed Dec 07 2011 'Matěj Cepl <mcepl@redhat.com>' - 3.3-0.5.RC2
- ... and one day after I upgraded to RC1, we have new RC2 ;)

* Tue Dec 06 2011 'Matěj Cepl <mcepl@redhat.com>' - 3.3-0.4.RC1
- Cool we are on RC1!

* Thu Nov 24 2011 'Matěj Cepl <mcepl@redhat.com>' - 3.3-0.3.beta4
- Another upstream beta release (now hopefully, really close to RC)

* Fri Nov 11 2011 'Matěj Cepl <mcepl@redhat.com>' - 3.3-0.3.beta3
- Fix version requirement for php (Closes #753192)

* Wed Nov 09 2011 'Matěj Cepl <mcepl@redhat.com>' - 3.3-0.2.beta3
- Another upstream beta release.

* Thu Oct 20 2011 'Matěj Cepl <mcepl@redhat.com>' - 3.3-0.1.beta2
- New upstream beta release (just for Rawhide, to be sure we build)

* Sat Jul 30 2011 Matěj Cepl <mcepl@redhat.com> - 3.2.1-2
- Rebuilt against new libraries.

* Wed Jul 13 2011 Matěj Cepl <mcepl@redhat.com> - 3.2.1-1
- New upstream release. Small fixes missed in 3.2.

* Tue Jul 05 2011 Matěj Cepl <mcepl@redhat.com> - 3.2-1
- New upstream release.

* Wed Jun 29 2011 Matěj Cepl <mcepl@redhat.com> - 3.1.4-1
- New upstream security release.

* Thu Jun 02 2011 Matěj Cepl <mcepl@redhat.com> - 3.1.3-3
- Actually, we just don't need gettext.php at all, it is provided by
  php itself. Just remove the file, don't make a symlink.
- revert back to wp-content in /usr/share/wordpress, I am not able to make it
  work. Not fixing BZ 522897.

* Wed Jun 01 2011 Matěj Cepl <mcepl@redhat.com> - 3.1.3-2
- Fix old FSF address and Summary to make rpmlint happy.
- Make wp-content directory owned by apache:apache
- Correctly Provides/Obsoletes (with versions)

* Wed May 25 2011 Matěj Cepl <mcepl@redhat.com> - 3.1.3-1
- Upgrade to the latest upstream version (security fixes and enhancements, BZ 707772)
- Move wp-content directory to /var/www/wordpress/ (BZ 522897)
- Simplify overly detailed %%files

* Sun May 01 2011 Matěj Cepl <mcepl@redhat.com> - 3.1.2-1
- New upstream release.

* Tue Apr 12 2011 Matěj Cepl <mcepl@redhat.com> - 3.1.1-1
- 3.1.1

* Wed Feb 23 2011 Jon Ciesla <limb@jcomserv.net> - 3.1-1
- 3.1.

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Jan 03 2011 Jon Ciesla <limb@jcomserv.net> - 3.0.4-2
- Obsoletes wordpress-mu, deprecated by upstream as of 3.0.x.

* Mon Jan 03 2011 Jon Ciesla <limb@jcomserv.net> - 3.0.4-1
- 3.0.4. Security fixes, BZ 666782.

* Thu Dec 23 2010 Jon Ciesla <limb@jcomserv.net> - 3.0.3-2
- Change Requires from httpd to webserver, BZ 523480.
- Patch for Hello Dolly lyrics, BZ 663966.

* Fri Dec 10 2010 Jon Ciesla <limb@jcomserv.net> - 3.0.3-1
- 3.0.3. Security fixes, BZ 659319.

* Fri Dec 10 2010 Jon Ciesla <limb@jcomserv.net> - 3.0.2-1
- 3.0.2. Security fixes, BZ 659319.

* Mon Aug 09 2010 Jon Ciesla <limb@jcomserv.net> - 3.0.1-1
- 3.0.1.

* Mon Jul 12 2010 Jon Ciesla <limb@jcomserv.net> - 2.8.6-3
- Remove bundled php-gettext and php-simplepie,
- require and link to system versions, BZ 544720.

* Mon Nov 16 2009 Adrian Reber <adrian@lisas.de> - 2.8.6-2
- updated to 2.8.6 (Security Release)

* Wed Oct 21 2009 Adrian Reber <adrian@lisas.de> - 2.8.5-1
- updated to 2.8.5 (Hardening Release)

* Sun Aug 30 2009 Adrian Reber <adrian@lisas.de> - 2.8.4-1
- updated to 2.8.4 (security fixes were already available with 2.8.3-2)

* Tue Aug 11 2009 Adrian Reber <adrian@lisas.de> - 2.8.3-2
- another security update to fix "Remote admin reset password":
  http://lists.grok.org.uk/pipermail/full-disclosure/2009-August/070137.html

* Mon Aug 03 2009 Adrian Reber <adrian@lisas.de> - 2.8.3-1
- updated to 2.8.3 for security fixes

* Tue Jul 28 2009 Adrian Reber <adrian@lisas.de> - 2.8.2-1
- updated to 2.8.2 for security fixes - BZ 512900
- fixed "wrong-script-end-of-line-encoding" of license.txt
- correctly disable auto update check
- fixed an error message from 'find' during the build

* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Jul 10 2009 Adrian Reber <adrian@lisas.de> - 2.8.1-1
- updated to 2.8.1 for security fixes - BZ 510745

* Mon Jun 22 2009 Adrian Reber <adrian@lisas.de> - 2.8-1
- updated to 2.8

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Feb 11 2009 Adrian Reber <adrian@lisas.de> - 2.7.1-1
- updated to 2.7.1

* Wed Nov 26 2008 Adrian Reber <adrian@lisas.de> - 2.6.5-2
- updated to 2.6.5

* Fri Oct 24 2008 Adrian Reber <adrian@lisas.de> - 2.6.3-1
- updated to 2.6.3

* Tue Sep 09 2008 Adrian Reber <adrian@lisas.de> - 2.6.2-1
- updated to 2.6.2

* Sun Aug 24 2008 Adrian Reber <adrian@lisas.de> - 2.6.1-1
- updated to 2.6.1

* Mon Jul 21 2008 Adrian Reber <adrian@lisas.de> - 2.6-1
- updated to 2.6

* Sat Apr 26 2008 Adrian Reber <adrian@lisas.de> - 2.5.1-1
- updated to 2.5.1 for security fixes - BZ 444396

* Fri Feb  8 2008 John Berninger <john at ncphotography dot com> - 2.3.3-0
- update to 2.3.3 for security fixes - BZ 431547

* Sun Dec 30 2007 Adrian Reber <adrian@lisas.de> - 2.3.2-1
- updated to 2.3.2 (bz 426431, Draft Information Disclosure)

* Tue Oct 30 2007 Adrian Reber <adrian@lisas.de> - 2.3.1-1
- updated to 2.3.1 (bz 357731, wordpress XSS issue)

* Mon Oct 15 2007 Adrian Reber <adrian@lisas.de> - 2.3-1
- updated to 2.3
- disabled wordpress-core-update

* Tue Sep 11 2007 Adrian Reber <adrian@lisas.de> - 2.2.3-0
- updated to 2.2.3 (security release)

* Wed Aug 29 2007 John Berninger <john at ncphotography dot com> - 2.2.2-0
- update to upstream 2.2.2
- license tag update

* Mon Apr 16 2007 john Berninger <jwb at redhat dot com> - 2.1.3-1
- update to 2.1.3 final - bz235912

* Mon Mar 26 2007 John Berninger <jwb at redhat dot com> - 2.1.3-rc2
- update to 2.1.3rc2 for bz 233703

* Sat Mar  3 2007 John Berninger <jwb at redhat dot com> - 2.1.2-0
- update to 2.1.2 - backdoor exploit introduced upstream in 2.1.1 - bz 230825

* Tue Feb 27 2007 John Berninger <jwb at redhat dot com> - 2.1.1-0
- update to 2.1.1 to fix vuln in bz 229991

* Wed Jan 31 2007 John Berninger <jwb at redhat dot com> - 2.1-0
- update to v2.1 to fix multiple bz/vuln's

* Sun Dec  3 2006 John Berninger <jwb at redhat dot com> - 2.0.5-2
- Remove mysql-server dependency

* Sun Dec  3 2006 John Berninger <jwb at redhat dot com> - 2.0.5-1
- Update to upstream 2.0.5 to fix vuln in bz 213985

* Thu Oct 26 2006 John Berninger <jwb at redhat dot com> - 2.0.4-1
- Doc fix for BZ 207822

* Sat Aug 12 2006 John Berninger <jwb at redhat dot com> - 2.0.4-0
- Upstream security vulns - bz 201989

* Sun Jul 23 2006 John Berninger <jwb at redhat dot com> - 2.0.3-4
- Fix broken upgrade path from FE4

* Tue Jul  4 2006 John Berninger <jwb at redhat dot com> - 2.0.3-3
- Add a README.fedora file
- Add php-mysql requires

* Tue Jun 20 2006 John Berninger <jwb at redhat dot com> - 2.0.3-2
- Remove use of installprefix macro
- %%{_datadir}/wordpress/wp-config.php is not a config file
- Symlink is relative

* Mon Jun 19 2006 John Berninger <jwb at redhat dot com> - 2.0.3-1
- Changes from Jarod Wilson as below
- Update to 2.0.3
- Rearrange to use /usr/share/wordpress and /etc/wordpress
- Remove patch (included upstream)
- Remove empty files to make rpmlint happy

* Tue May 30 2006 John Berninger <jwb at redhat dot com> - 2.0.2-1
- Added patch for \n cache injection - upstream changeset #3797

* Sat May 27 2006 John Berninger <jwb at redhat dot com> - 2.0.2-0
- Initial build