From 57cf535a2476c3d1cf76331c6052fdf9ebbb5a0e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 15 Jan 2013 16:33:01 +0100 Subject: syntaxhighlighter: new package --- Makefile | 4 +++ syntaxhighlighter.conf | 14 +++++++++ syntaxhighlighter.spec | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 Makefile create mode 100644 syntaxhighlighter.conf create mode 100644 syntaxhighlighter.spec diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1e65467 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../common/Makefile + diff --git a/syntaxhighlighter.conf b/syntaxhighlighter.conf new file mode 100644 index 0000000..ccfce54 --- /dev/null +++ b/syntaxhighlighter.conf @@ -0,0 +1,14 @@ +Alias /syntaxhighlighter /usr/share/syntaxhighlighter + + + + # Apache 2.4 + Require all granted + + + # Apache 2.2 + Order deny,allow + Allow from all + + + diff --git a/syntaxhighlighter.spec b/syntaxhighlighter.spec new file mode 100644 index 0000000..2ec1bdf --- /dev/null +++ b/syntaxhighlighter.spec @@ -0,0 +1,79 @@ +Name: syntaxhighlighter +Version: 3.0.83 +Release: 1%{?dist} +Summary: JavaScript syntax highlighter +Group: Applications/Internet +# Dual licensed under the MIT and GPL licenses. +License: MIT or GPLv2 +URL: http://alexgorbatchev.com/SyntaxHighlighter/ + +# http://alexgorbatchev.com/SyntaxHighlighter/download/download.php?sh_current +Source0: syntaxhighlighter_%{version}.zip +Source1: %{name}.conf + +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +BuildArch: noarch + + +%description +SyntaxHighlighter is a fully functional self-contained code +syntax highlighter developed in JavaScript. + + +%package httpd +Summary: Apache configuration for %{name} +Group: Applications/Internet +Requires: %{name} = %{version}-%{release} +Requires: httpd + +%description httpd +This package provides the Apache configuration for +applications using an Alias to SyntaxHighlighter library. + + +%prep +%setup -q -n %{name}_%{version} + +# Create a suitable example, easy to run +sed -e 's:src="scripts:src="/%{name}/scripts:' \ + -e 's:href="styles:href="/%{name}/styles:' \ + index.html >example.html + +chmod -x {scripts,styles}/* + + +%build +# Nothing to build + + +%install +rm -rf %{buildroot} + +# JavaScript +mkdir -p %{buildroot}%{_datadir}/%{name} +cp -pr scripts %{buildroot}%{_datadir}/%{name}/scripts +cp -pr styles %{buildroot}%{_datadir}/%{name}/styles + +# Apache +mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d +install -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d + + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%doc LGPL-LICENSE MIT-LICENSE example.html +%{_datadir}/%{name} + + +%files httpd +%defattr(-,root,root,-) +%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf + + +%changelog +* Tue Jan 15 2013 Remi Collet - 3.0.83-1 +- initial package -- cgit