File jsbeautify.spec of Package jsbeautify

# spec file for package jsbeautify
# Copyright (c) 2010 Bastian Friedrich
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

# norootforbuild

Name:		jsbeautify
Requires:	rhino
License:	Other uncritical OpenSource License
Group:		Productivity/File utilities
Version:	2010721git
Release:	1
Summary:	A JavaScript code beautifier/re-indenter
#Patch:		jsbeautify-%{version}.diff
Patch1:		einars-js-beautify-3c45cd9-fix-relative-symlinks.diff
Patch2:		einars-js-beautify-3c45cd9-fix-argument-quoting.diff
BuildRoot:	%{_tmppath}/%{name}-%{version}-build
BuildArch:	noarch

This little beautifier will reformat and reindent bookmarklets, ugly
javascript, unpack scripts packed by the popular Dean Edward's packer,
as well as deobfuscate scripts processed by

%setup -q -n einars-js-beautify-3c45cd9
%patch1 -p1
%patch2 -p1

echo "No building required"
echo 'command! -range=% -nargs=0 BeautifyJavascript <line1>,<line2>!JSBEAUTY=<q-args> /usr/bin/beautify_js' > beautify_js.vim

mkdir  -p %{buildroot}%{_datadir}/jsbeautify/
mkdir  -p %{buildroot}%{_bindir}
cp -a * %{buildroot}%{_datadir}/jsbeautify/
ln -s %{_datadir}/jsbeautify/bin/beautify_js %{buildroot}%{_bindir}/

%defattr (644,root,root,755)
%dir %{_datadir}/jsbeautify
%attr (755, root, root) %{_bindir}/beautify_js
%attr (755, root, root) %{_datadir}/jsbeautify/bin/beautify_js
%attr (755, root, root) %{_datadir}/jsbeautify/opera-userscript/

* Wed Jul 21 2010
- Initial package