LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File htmlcompressor.spec of Package htmlcompressor (Project home:PerryWerneck)

#
# spec file for package htmlcompressor
#
# References:
#
# http://en.opensuse.org/openSUSE:Packaging_Java
#

Name:           htmlcompressor
Summary:        HTML Compressor and Minifier
License:        Apache
Group:          Development/Tools
Version:        1.5.3
Release:        0
Url:            https://code.google.com/p/htmlcompressor

Source:		%name-%version.tar.bz2

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  java-devel
BuildRequires:  jpackage-utils
BuildRequires:	dos2unix
BuildRequires:	java >= 1.7.0

Requires:	java >= 1.7.0

BuildArchitectures: noarch

%description
HtmlCompressor is a small, fast and very easy to use Java library that minifies 
given HTML or XML source by removing extra whitespaces, comments and other 
unneeded characters without breaking the content structure. As a result pages 
become smaller in size and load faster. A command-line version of the 
compressor is also available.

More info at https://code.google.com/p/htmlcompressor/

%prep
%setup -q

%build

dos2unix *.txt

# startscript
cat > hc.sh << 'EOF'
#!/bin/sh
#
# Starting HTML compressor
#
java -jar %{_javadir}/%{name}-%{version}.jar $@
EOF

%install

export NO_BRP_CHECK_BYTECODE_VERSION=true

install -dm 0755 %{buildroot}/%{_javadir}
install -dm 0755 %{buildroot}/%{_bindir}

install -m755 bin/%{name}-%{version}.jar		%{buildroot}/%{_javadir}
install -m755 lib/*.jar					%{buildroot}/%{_javadir}
install -m755 hc.sh					%{buildroot}%{_bindir}/hc

%files
%defattr(-,root,root)
%doc LICENSE.txt README.txt
%{_javadir}/*.jar
%{_bindir}/hc

%changelog