]>
Commit | Line | Data |
---|---|---|
4cdb0b2f ER |
1 | Summary: Flash IRC Chat |
2 | Name: lightirc | |
3 | Version: 0.9.9.3 | |
877d9bcd | 4 | Release: 2 |
4cdb0b2f ER |
5 | License: free (but not open) |
6 | Group: Applications/WWW | |
7 | Source0: http://www.lightirc.com/release/lightIRC_%{version}.zip | |
8 | # Source0-md5: 5d67f5d2aab9076e685af85b63e39ef7 | |
9 | URL: http://www.lightirc.com/ | |
10 | BuildRequires: rpmbuild(macros) >= 1.553 | |
a041dc2b | 11 | BuildRequires: unzip |
4cdb0b2f ER |
12 | Requires: js-swfobject |
13 | Requires: webapps | |
14 | Requires: webserver(alias) | |
877d9bcd | 15 | Conflicts: apache-base < 2.4.0-1 |
4cdb0b2f ER |
16 | BuildArch: noarch |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %define _webapps /etc/webapps | |
20 | %define _webapp %{name} | |
21 | %define _sysconfdir %{_webapps}/%{_webapp} | |
22 | %define _appdir %{_datadir}/%{_webapp} | |
23 | ||
24 | %description | |
25 | lightIRC is a free Flash IRC client that includes all well known IRC | |
26 | features. It supports stylesheets for its own skins, has support for | |
27 | multiple languages, and can be used with every IRCd. | |
28 | ||
29 | %prep | |
30 | %setup -qc | |
31 | ||
32 | mv lightIRC/*.txt . | |
33 | rm lightIRC/swfobject.js | |
34 | %undos lightIRC/*.html | |
35 | ||
36 | cat > apache.conf <<'EOF' | |
37 | Alias /%{name}/swfobject.js %{_datadir}/swfobject/swfobject.js | |
38 | Alias /%{name} %{_appdir} | |
39 | <Directory %{_appdir}> | |
40 | Allow from all | |
41 | </Directory> | |
42 | EOF | |
43 | ||
877d9bcd JR |
44 | cat > httpd.conf <<'EOF' |
45 | Alias /%{name}/swfobject.js %{_datadir}/swfobject/swfobject.js | |
46 | Alias /%{name} %{_appdir} | |
47 | <Directory %{_appdir}> | |
48 | Require all granted | |
49 | </Directory> | |
50 | EOF | |
51 | ||
4cdb0b2f ER |
52 | cat > lighttpd.conf <<'EOF' |
53 | alias.url += ( | |
54 | "/%{name}/swfobject.js" => "%{_datadir}/swfobject/swfobject.js", | |
55 | "/%{name}" => "%{_appdir}", | |
56 | ) | |
57 | EOF | |
58 | ||
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}} | |
62 | cp -a lightIRC/* $RPM_BUILD_ROOT%{_appdir} | |
63 | ||
64 | cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
877d9bcd | 65 | cp -a httpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf |
4cdb0b2f ER |
66 | cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf |
67 | ||
68 | %clean | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
72 | %webapp_register apache %{_webapp} | |
73 | ||
74 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
75 | %webapp_unregister apache %{_webapp} | |
76 | ||
877d9bcd | 77 | %triggerin -- apache-base |
4cdb0b2f ER |
78 | %webapp_register httpd %{_webapp} |
79 | ||
877d9bcd | 80 | %triggerun -- apache-base |
4cdb0b2f ER |
81 | %webapp_unregister httpd %{_webapp} |
82 | ||
83 | %triggerin -- lighttpd | |
84 | %webapp_register lighttpd %{_webapp} | |
85 | ||
86 | %triggerun -- lighttpd | |
87 | %webapp_unregister lighttpd %{_webapp} | |
88 | ||
89 | %files | |
90 | %defattr(644,root,root,755) | |
91 | %doc readme.txt changelog.txt | |
92 | %dir %attr(750,root,http) %{_sysconfdir} | |
93 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
94 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
95 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf | |
96 | %dir %{_appdir} | |
97 | %{_appdir}/*.swf | |
98 | %{_appdir}/styles | |
99 | %config(noreplace) %verify(not md5 mtime size) %{_appdir}/index.html |