blob: 2ec1bdfbf904332053fda89a594679eecca21517 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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
|