# Some notes on this RPM: # There are two expected rpmlint errors: dangling-symlink and file-not-in-%lang. # The dangling symlinks have been deemed OK by Toshio Kuratomi: # 18:08 < abadger1999> ianweller: Those rpmlint wanrings can be ignored as long as things continue to work when the actual files in /usr/share/locale are gone. # ... which they do. In addition, rpmlint is not smart enough to realize that the files that are not in %lang are not actually the .mo files; they are *symlinks*. %global short_name si-captcha %global plugin_name si-captcha-for-wordpress %global plugin_human_name SI Captcha Name: wordpress-plugin-%{plugin_name} Version: 2.2.8 Release: 1%{?dist} Summary: %{plugin_human_name} plugin for WordPress Group: Applications/Publishing License: GPLv2+ URL: http://wordpress.org/extend/plugins/%{plugin_name}/ Source0: http://downloads.wordpress.org/plugin/%{plugin_name}.zip BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Requires: wordpress Requires: php-phpcaptcha Requires: php-gd BuildArch: noarch %description Adds CAPTCHA anti-spam methods to WordPress on the comment form, registration form, login, or all. In order to post comments or register, users will have to type in the code shown on the image. This prevents spam from automated bots. Adds security. Works great with Akismet. Also is fully WPMU and BuddyPress compatible. This package is built for use with WordPress (wordpress), not WordPress MU. Use wordpress-mu-plugin-%{plugin_name} for WordPress MU. Additional language files are available in the wordpress-plugin-%{plugin_name} package. %package -n wordpress-mu-plugin-%{plugin_name} Summary: %{plugin_human_name} plugin for WordPress MU Group: Applications/Publishing # According to http://plugins.trac.wordpress.org/ all plugins are licensed # under the GPL unless otherwise stated in the plugin source. License: GPLv2+ Requires: wordpress-mu Requires: php-phpcaptcha BuildArch: noarch %description -n wordpress-mu-plugin-%{plugin_name} Adds CAPTCHA anti-spam methods to WordPress on the comment form, registration form, login, or all. In order to post comments or register, users will have to type in the code shown on the image. This prevents spam from automated bots. Adds security. Works great with Akismet. Also is fully WPMU and BuddyPress compatible. This package is built for use with WordPress MU (wordpress-mu), not regular WordPress. Use wordpress-plugin-%{plugin_name} for regular Wordpress. Additional language files are available in the wordpress-mu-plugin-%{plugin_name} package. %package i18n Summary: Language files for %{plugin_human_name} WordPress plugin Group: Applications/Publishing # According to http://plugins.trac.wordpress.org/ all plugins are licensed # under the GPL unless otherwise stated in the plugin source. License: GPLv2+ BuildArch: noarch %description i18n This package contains shared internationalization files for this plugin which are used for the WordPress and WordPress MU packages. %prep %setup -q -c echo 'To enable "%{plugin_human_name}", go to the administrative section of your blog, "Plugins", and enable the plugin there.' > README.fedora echo 'To allow users to enable "%{plugin_human_name}" for their blogs, be sure to enable this plugin in the administrative control panel for your website.' > README.fedora.mu echo 'This package contains documentation for "%{plugin_human_name}".' > README.fedora.i18n rm -rf captcha-securimage %build %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_datadir}/wordpress/wp-content/plugins/ cp -a %{plugin_name} %{buildroot}%{_datadir}/wordpress/wp-content/plugins/ mkdir -p %{buildroot}%{_datadir}/wordpress-mu/wp-content/plugins/ cp -a %{plugin_name} %{buildroot}%{_datadir}/wordpress-mu/wp-content/plugins/ ln -s %{_datadir}/php/phpcaptcha %{buildroot}%{_datadir}/wordpress/wp-content/plugins/%{plugin_name}/ ln -s %{_datadir}/php/phpcaptcha %{buildroot}%{_datadir}/wordpress-mu/wp-content/plugins/%{plugin_name}/ rm -rf %{buildroot}%{_datadir}/wordpress/wp-content/plugins/%{plugin_name}/languages/* rm -rf %{buildroot}%{_datadir}/wordpress-mu/wp-content/plugins/%{plugin_name}/languages/* mkdir -p %{buildroot}%{_datadir}/locale/en/LC_MESSAGES/ for mo in %{plugin_name}/languages/*.mo; do \ LANGCODE=$(echo $mo | sed -e "s@%{plugin_name}/languages/%{short_name}-\([^ ]*\).mo@\1@"); \ mkdir -p %{buildroot}%{_datadir}/locale/$LANGCODE/LC_MESSAGES/; \ mv %{plugin_name}/languages/%{short_name}-$LANGCODE.mo %{buildroot}%{_datadir}/locale/$LANGCODE/LC_MESSAGES/%{name}.mo; \ ln -s %{_datadir}/locale/$LANGCODE/LC_MESSAGES/%{name}.mo %{buildroot}%{_datadir}/wordpress/wp-content/plugins/%{plugin_name}/languages/%{short_name}-$LANGCODE.mo; \ ln -s %{_datadir}/locale/$LANGCODE/LC_MESSAGES/%{name}.mo %{buildroot}%{_datadir}/wordpress-mu/wp-content/plugins/%{plugin_name}/languages/%{short_name}-$LANGCODE.mo; \ done %find_lang %{name} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc README.fedora %{_datadir}/wordpress/wp-content/plugins/%{plugin_name} %files -n wordpress-mu-plugin-%{plugin_name} %defattr(-,root,root,-) %doc README.fedora.mu %{_datadir}/wordpress-mu/wp-content/plugins/%{plugin_name} %files i18n -f %{name}.lang %defattr(-,root,root,-) %doc README.fedora.i18n %changelog * Sat Feb 06 2010 David Nalley - 2.2.8 - Initial package build