+# NOTE
+# - the md5 is different in various wp backends, so invoke this to find the most used one and fetchsrc_request several times until distfiles catches the same one:
+# while sleep 1; do rm *.zip; ./md5 bad-behavior.spec; done
Summary: PHP-based software which blocks automated link spam
-Summary(pl.UTF-8): Oparte na PHP oprogramowanie blokujące spam z automatycznych odnośników
+Summary(pl.UTF-8): Oparte na PHP oprogramowanie blokujące spam z automatycznych odnośników
Name: bad-behavior
-Version: 2.0.10
+Version: 2.0.28
Release: 1
License: GPL v2
Group: Applications/WWW
-Source0: http://www.bad-behavior.ioerror.us/download/%{name}-%{version}.zip
-# Source0-md5: eb84f29c7f18409c52345560d9944937
+Source0: http://downloads.wordpress.org/plugin/%{name}.%{version}.zip
+# Source0-md5: c6bcb80b3fd075899a7bf69054f64648
URL: http://www.bad-behavior.ioerror.us/
BuildRequires: unzip
+Requires: php-common
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%prep
%setup -qcT
%{__unzip} -qq -a %{SOURCE0}
-cd Bad-Behavior
+cd bad-behavior
rm index.html bad-behavior/index.html
%install
rm -rf $RPM_BUILD_ROOT
-cd Bad-Behavior
+cd bad-behavior
install -d $RPM_BUILD_ROOT%{_appdir}
cp -a bad-behavior* $RPM_BUILD_ROOT%{_appdir}
%files
%defattr(644,root,root,755)
-%doc Bad-Behavior/README.txt
-%{_appdir}
+%doc bad-behavior/README.txt
+%dir %{_appdir}
+%{_appdir}/bad-behavior
+%{_appdir}/bad-behavior-generic.php
+%{_appdir}/bad-behavior-lifetype.php
+%{_appdir}/bad-behavior-mediawiki.php
+%{_appdir}/bad-behavior-wordpress-admin.php
+%{_appdir}/bad-behavior-wordpress.php