]> git.pld-linux.org Git - packages/ckeditor.git/blame - ckeditor.spec
- initial based on fckeditor.spec
[packages/ckeditor.git] / ckeditor.spec
CommitLineData
d19573b0
ER
1# TODO
2# - handle plugin languages
3Summary: The text editor for Internet
4Summary(pl.UTF-8): Edytor tekstowy dla Internetu
5Name: ckeditor
6Version: 3.1
7Release: 0.16
8License: LGPL v2.1
9Group: Applications/WWW
10Source0: http://download.cksource.com/CKEditor/CKEditor/CKEditor%20%{version}/%{name}_%{version}.tar.gz
11# Source0-md5: 9c4a9e54f756e24c6aac24888c4599d0
12URL: http://www.ckeditor.com/
13Source1: find-lang.sh
14BuildRequires: rpmbuild(macros) > 1.268
15BuildRequires: sed >= 4.0
16Requires: webserver(access)
17Requires: webserver(alias)
18BuildArch: noarch
19BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21%define _webapps /etc/webapps
22%define _webapp %{name}
23%define _sysconfdir %{_webapps}/%{_webapp}
24%define _appdir %{_datadir}/%{name}
25
26%define find_lang sh %{SOURCE1}
27
28%description
29This HTML text editor brings to the web many of the powerful
30functionalities of desktop editors like MS Word. It's lightweight and
31doesn't require any kind of installation on the client computer.
32
33%description -l pl.UTF-8
34Ten edytor tekstu HTML udostępnia stronom WWW wiele potężnych funkcji
35edytorów biurowych, takich jak MS Word. Jest lekki i nie wymaga żadnej
36inicjalizacji na komputerze klienckim.
37
38%prep
39%setup -qc
40mkdir config
41mv ckeditor/* .
42mv ckeditor/.htaccess config/htaccess
43rmdir ckeditor
44mv _samples samples
45
46# force php5 only
47rm ckeditor_php4.php
48mv ckeditor_php5.php ckeditor.php
49
50find -name _source | xargs rm -rf
51rm -f *_source.js
52
53rm lang/_translationstatus.txt
54
55# undos the files
56%{__sed} -i -e 's,\r$,,' ckeditor*
57find '(' -name '*.js' -o -name '*.css' -o -name '*.txt' -o -name '*.html' -o -name '*.php' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
58
59# apache1/apache2 conf
60cat > config/apache.conf <<'EOF'
61Alias /%{name} %{_appdir}
62<Directory %{_appdir}>
63 Allow from all
64</Directory>
65EOF
66
67# lighttpd conf
68cat > config/lighttpd.conf <<'EOF'
69alias.url += (
70 "/%{name}" => "%{_appdir}",
71)
72EOF
73
74%install
75rm -rf $RPM_BUILD_ROOT
76install -d $RPM_BUILD_ROOT%{_appdir}
77
78cp -a ckeditor.js $RPM_BUILD_ROOT%{_appdir}
79cp -a plugins skins themes lang $RPM_BUILD_ROOT%{_appdir}
80
81install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
82cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
83
84install -d $RPM_BUILD_ROOT%{_sysconfdir}
85cp -a config/apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
86cp -a config/apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
87cp -a config/lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
88
89%find_lang %{name}.lang
90
91%triggerin -- apache1 < 1.3.37-3, apache1-base
92%webapp_register apache %{_webapp}
93
94%triggerun -- apache1 < 1.3.37-3, apache1-base
95%webapp_unregister apache %{_webapp}
96
97%triggerin -- apache < 2.2.0, apache-base
98%webapp_register httpd %{_webapp}
99
100%triggerun -- apache < 2.2.0, apache-base
101%webapp_unregister httpd %{_webapp}
102
103%triggerin -- lighttpd
104%webapp_register lighttpd %{_webapp}
105
106%triggerun -- lighttpd
107%webapp_unregister lighttpd %{_webapp}
108
109%clean
110rm -rf $RPM_BUILD_ROOT
111
112%files -f %{name}.lang
113%defattr(644,root,root,755)
114%dir %attr(750,root,http) %{_sysconfdir}
115%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
116%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
117%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
118%dir %{_appdir}
119%{_appdir}/*.js
120%{_appdir}/skins
121%{_appdir}/themes
122%{_appdir}/plugins
123%{_appdir}/lang/_languages.js
124
125%{_examplesdir}/%{name}-%{version}
This page took 0.06399 seconds and 4 git commands to generate.