2 Summary: A javascript library for multi-touch gestures
7 Group: Applications/WWW
8 Source0: https://github.com/hammerjs/hammer.js/archive/%{version}/%{pkgname}-%{version}.tar.gz
9 # Source0-md5: 54b592fde78983cee95983bec1673a39
11 Source2: lighttpd.conf
12 URL: http://hammerjs.github.io/
13 BuildRequires: rpmbuild(macros) >= 1.553
14 BuildRequires: sed >= 4.0
15 Requires: webserver(access)
16 Requires: webserver(alias)
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _webapps /etc/webapps
21 %define _webapp %{name}
22 %define _sysconfdir %{_webapps}/%{_webapp}
23 %define _appdir %{_datadir}/%{_webapp}
26 Add touch gestures to your page.
29 %setup -qn hammer.js-%{version}
32 rm -rf $RPM_BUILD_ROOT
33 install -d $RPM_BUILD_ROOT%{_appdir}
34 cp -a %{pkgname}.js $RPM_BUILD_ROOT%{_appdir}/%{pkgname}.src.js
35 cp -a %{pkgname}.min.js $RPM_BUILD_ROOT%{_appdir}/%{pkgname}.min.js
36 ln -s %{pkgname}.min.js $RPM_BUILD_ROOT%{_appdir}/%{pkgname}.js
38 install -d $RPM_BUILD_ROOT%{_sysconfdir}
39 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
40 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
41 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
44 rm -rf $RPM_BUILD_ROOT
46 %triggerin -- apache1 < 1.3.37-3, apache1-base
47 %webapp_register apache %{_webapp}
49 %triggerun -- apache1 < 1.3.37-3, apache1-base
50 %webapp_unregister apache %{_webapp}
52 %triggerin -- apache < 2.2.0, apache-base
53 %webapp_register httpd %{_webapp}
55 %triggerun -- apache < 2.2.0, apache-base
56 %webapp_unregister httpd %{_webapp}
58 %triggerin -- lighttpd
59 %webapp_register lighttpd %{_webapp}
61 %triggerun -- lighttpd
62 %webapp_unregister lighttpd %{_webapp}
65 %defattr(644,root,root,755)
66 %doc README.md CHANGELOG.md CONTRIBUTING.md LICENSE.md
67 %dir %attr(750,root,http) %{_sysconfdir}
68 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
69 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
70 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf