]> git.pld-linux.org Git - packages/js-swfobject.git/blame - js-swfobject.spec
really compile with closure-compiler
[packages/js-swfobject.git] / js-swfobject.spec
CommitLineData
42fa1e8f 1%define ver %(echo %{version} | tr . _)
e2425b4e 2%define plugin swfobject
5b8b2d12
JB
3Summary: JavaScript Flash Player detection and embed script
4Summary(pl.UTF-8): Skrypt w JavaScripcie do wykrywania i osadzania Flash Playera
e2425b4e 5Name: js-%{plugin}
6d3a9c1f 6Version: 2.2
834de8a0 7Release: 2
dfca1f2c
ER
8License: MIT
9Group: Applications/WWW
42fa1e8f 10Source0: http://swfobject.googlecode.com/files/swfobject_%{ver}.zip
6d3a9c1f 11# Source0-md5: dec4b83b3e73f3f0011a075cd5385b9c
2b88ade0
ER
12Source1: apache.conf
13Source2: lighttpd.conf
42fa1e8f 14URL: http://code.google.com/p/swfobject/
e10a39b4 15BuildRequires: closure-compiler
1b684107 16BuildRequires: js
ceed2416 17BuildRequires: unzip
94b9fb25
ER
18Requires: webapps
19Requires: webserver(alias)
42fa1e8f
ER
20Provides: swfobject = %{version}-%{release}
21Obsoletes: swfobject
dfca1f2c
ER
22BuildArch: noarch
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
94b9fb25
ER
25%define _webapps /etc/webapps
26%define _webapp swfobject
27%define _sysconfdir %{_webapps}/%{_webapp}
28%define _appdir %{_datadir}/%{_webapp}
dfca1f2c
ER
29
30%description
5b8b2d12
JB
31SWFObject is a small JavaScript file used for embedding Adobe Flash
32content. The script can detect the Flash plug-in in all major web
33browsers (on Mac and PC) and is designed to make embedding Flash
34movies as easy as possible. It is also very search engine friendly,
35degrades gracefully, can be used in valid HTML and XHTML 1.0
36documents, and is forward compatible, so it should work for years to
37come.
38
39%description -l pl.UTF-8
40SWFObject to mały plik w JavaScripcie służący do osadzania treści
41Adobe Flash. Skrypt potrafi wykryć wtyczkę Flash we wszystkich
42fa1e8f
ER
42popularnych przeglądarkach (na Macu i PC) i jest zaprojektowany do jak
43najłatwiejszego osadzania filmów we Flashu. Jest także przyjazny dla
44silników wyszukiwarek, dobrze się degraduje, może być używany w
45poprawnych dokumentach HTML oraz XHTML 1.0 i jest zgodny w przód, więc
46powinien działać jeszcze przez wiele lat.
dfca1f2c
ER
47
48%prep
2b88ade0
ER
49%setup -qc
50mv %{_webapp}/* .
dfca1f2c 51
e10a39b4
ER
52%build
53install -d build
54
55# compress .js
56for js in src/*.js; do
57 out=build/${js#*/}
58%if 0%{!?debug:1}
1b684107 59 closure-compiler --js $js --charset UTF-8 --js_output_file $out
e10a39b4
ER
60 js -C -f $out
61%else
62 cp -p $js $out
63%endif
64done
65
dfca1f2c
ER
66%install
67rm -rf $RPM_BUILD_ROOT
68install -d $RPM_BUILD_ROOT%{_appdir}
e2425b4e 69
e10a39b4 70cp -p build/%{plugin}.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.min.js
e2425b4e
ER
71cp -p src/%{plugin}.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}-%{version}.js
72ln -s %{plugin}-%{version}.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}.src.js
73ln -s %{plugin}-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/%{plugin}.js
dfca1f2c 74
94b9fb25 75install -d $RPM_BUILD_ROOT%{_sysconfdir}
2b88ade0
ER
76cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
77cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
78cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
94b9fb25 79
dfca1f2c
ER
80%clean
81rm -rf $RPM_BUILD_ROOT
82
94b9fb25
ER
83%triggerin -- apache1 < 1.3.37-3, apache1-base
84%webapp_register apache %{_webapp}
85
86%triggerun -- apache1 < 1.3.37-3, apache1-base
87%webapp_unregister apache %{_webapp}
88
89%triggerin -- apache < 2.2.0, apache-base
90%webapp_register httpd %{_webapp}
91
92%triggerun -- apache < 2.2.0, apache-base
93%webapp_unregister httpd %{_webapp}
94
95%triggerin -- lighttpd
96%webapp_register lighttpd %{_webapp}
97
98%triggerun -- lighttpd
99%webapp_unregister lighttpd %{_webapp}
100
dfca1f2c
ER
101%files
102%defattr(644,root,root,755)
94b9fb25
ER
103%dir %attr(750,root,http) %{_sysconfdir}
104%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
105%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
106%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
dfca1f2c 107%{_appdir}
This page took 0.142754 seconds and 4 git commands to generate.