]> git.pld-linux.org Git - packages/ckeditor.git/blob - ckeditor.spec
- initial based on fckeditor.spec
[packages/ckeditor.git] / ckeditor.spec
1 # TODO
2 # - handle plugin languages
3 Summary:        The text editor for Internet
4 Summary(pl.UTF-8):      Edytor tekstowy dla Internetu
5 Name:           ckeditor
6 Version:        3.1
7 Release:        0.16
8 License:        LGPL v2.1
9 Group:          Applications/WWW
10 Source0:        http://download.cksource.com/CKEditor/CKEditor/CKEditor%20%{version}/%{name}_%{version}.tar.gz
11 # Source0-md5:  9c4a9e54f756e24c6aac24888c4599d0
12 URL:            http://www.ckeditor.com/
13 Source1:        find-lang.sh
14 BuildRequires:  rpmbuild(macros) > 1.268
15 BuildRequires:  sed >= 4.0
16 Requires:       webserver(access)
17 Requires:       webserver(alias)
18 BuildArch:      noarch
19 BuildRoot:      %{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
29 This HTML text editor brings to the web many of the powerful
30 functionalities of desktop editors like MS Word. It's lightweight and
31 doesn't require any kind of installation on the client computer.
32
33 %description -l pl.UTF-8
34 Ten edytor tekstu HTML udostępnia stronom WWW wiele potężnych funkcji
35 edytorów biurowych, takich jak MS Word. Jest lekki i nie wymaga żadnej
36 inicjalizacji na komputerze klienckim.
37
38 %prep
39 %setup -qc
40 mkdir config
41 mv ckeditor/* .
42 mv ckeditor/.htaccess config/htaccess
43 rmdir ckeditor
44 mv _samples samples
45
46 # force php5 only
47 rm ckeditor_php4.php
48 mv ckeditor_php5.php ckeditor.php
49
50 find -name _source | xargs rm -rf
51 rm -f *_source.js
52
53 rm lang/_translationstatus.txt
54
55 # undos the files
56 %{__sed} -i -e 's,\r$,,' ckeditor*
57 find '(' -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
60 cat > config/apache.conf <<'EOF'
61 Alias /%{name} %{_appdir}
62 <Directory %{_appdir}>
63         Allow from all
64 </Directory>
65 EOF
66
67 # lighttpd conf
68 cat > config/lighttpd.conf <<'EOF'
69 alias.url += (
70         "/%{name}" => "%{_appdir}",
71 )
72 EOF
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT%{_appdir}
77
78 cp -a ckeditor.js $RPM_BUILD_ROOT%{_appdir}
79 cp -a plugins skins themes lang $RPM_BUILD_ROOT%{_appdir}
80
81 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
82 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
83
84 install -d $RPM_BUILD_ROOT%{_sysconfdir}
85 cp -a config/apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
86 cp -a config/apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
87 cp -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
110 rm -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.057726 seconds and 4 git commands to generate.