-%setup -qc -n %{plugin}
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-(
- cat js/prototype.js
- cat js/effects.js
- cat js/builder.js
- cat js/lightbox.js
-) > script.js
-uudecode blank.gif.uue
-chmod a+r images/blank.gif
-chmod a-x css/lightbox.css
-
-rm -f images/bullet.gif
-rm -f images/donate-button.gif
-rm -f images/download-icon.gif
-rm -f images/image-1.jpg
-rm -f images/thumb-1.jpg
-
-cat <<'EOF' > AUTHORS
-ogeidix <diegogiorgini#gmail.com>
- - the original plugin
-
-Laurent Beneytout <laurent.beneytout#gmail.com>
- - made plugin work by remaking the plugin
-
-Elan Ruusamäe <glen#pld-linux.org>
- - made plugin work with konqueror
- - made plugin work with compression enabled
-EOF
-awk -vv=%{version} 'BEGIN{printf("%s-%s-%s\n", substr(v, 1, 4), substr(v, 5, 2), substr(v, 7, 2))}' > VERSION
-
-%build
-js_compress() {
- for a in "$@"; do
- # compress
- shrinksafe -c script.js > $a.tmp && mv $a.tmp script.js
- # trim newlines
- tr -d '\r\n' < script.js > $a.tmp && mv $a.tmp script.js
- # check syntax
- js -C -f script.js
- done
-}
-js_compress script.js
+%setup -q -n %{plugin}v2
+version=$(cat VERSION)
+if [ $(echo "$version" | tr -d -) != %{version} ]; then
+ : %%{version} mismatch, should be: $(echo "$version" | tr -d -)
+ exit 1
+fi