summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--syntaxhighlighter.conf14
-rw-r--r--syntaxhighlighter.spec79
3 files changed, 97 insertions, 0 deletions
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
+
+<Directory /usr/share/syntaxhighlighter>
+ <IfModule mod_authz_core.c>
+ # Apache 2.4
+ Require all granted
+ </IfModule>
+ <IfModule !mod_authz_core.c>
+ # Apache 2.2
+ Order deny,allow
+ Allow from all
+ </IfModule>
+</Directory>
+
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 <remi@fedoraproject.org> - 3.0.83-1
+- initial package