%global usname web-socket-js Name: js-%{usname} Version: 1.0.2 Release: 3%{?dist} Summary: HTML5 Web Socket implementation powered by Flash BuildArch: noarch License: BSD URL: https://github.com/gimite/%{usname} Source0: https://github.com/gimite/%{usname}/archive/v%{version}.tar.gz BuildRequires: web-assets-devel BuildRequires: python-slimit # This next one is a missing dependency of python-slimit # https://bugzilla.redhat.com/show_bug.cgi?id=1199506 # Until that bug is fixed we'll add the dependency here, # but this should be removed once the bug is fixed. BuildRequires: python-setuptools Requires: web-assets-filesystem %description %{summary}. Note: this package ships only the java script components. The SWF assets are not shipped as shipping binary components in Fedora without building from source is forbidden, and currently Fedora does not have the Apache Flex SDK packaged. %prep %setup -q -n %{usname}-%{version} %build # Presently the apache-flex-sdk is not included in Fedora, so we can't # build the SWF assets # Re-minify the swfobject.js file from the src directory as required # by the packaging guidelines. It's unclear what minifier upstream # uses for this, but we'll use slimit rm -f swfobject.js slimit -m src/swfobject.js > swfobject.js %install mkdir -p %{buildroot}%{_jsdir}/%{usname} cp -a swfobject.js web_socket.js %{buildroot}%{_jsdir}/%{usname} %files %doc LICENSE.txt NEWS.md README.md sample.html %{_jsdir}/%{usname} %changelog * Fri Mar 6 2015 Jonathan Underwood - 1.0.2-3 - Own {_jsdir}/web-socket-js directory - Introduce macro for web-socket-js string * Fri Mar 6 2015 Jonathan Underwood - 1.0.2-2 - Minify swfobject.js from the source js file during build using slimit - Specify noarch for package * Thu Mar 5 2015 Jonathan Underwood - 1.0.2-1 - Initial package