2 # - lighttpd: docs/lighttpd-ansel.conf
4 Summary: Ansel Photo Management and Web Gallery application
5 Name: horde-%{hordeapp}
9 Group: Applications/WWW
10 Source0: ftp://ftp.horde.org/pub/ansel/%{hordeapp}-h3-%{version}.tar.gz
11 # Source0-md5: 9ef6fce234593b1c40dc1ccdc39b5a37
13 URL: http://www.horde.org/ansel/
14 BuildRequires: rpm-php-pearprov >= 4.0.2-98
15 BuildRequires: rpmbuild(macros) >= 1.264
16 Requires: horde >= 3.0
18 Requires: webserver(access)
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define hordedir /usr/share/horde
23 %define _appdir %{hordedir}/%{hordeapp}
24 %define _webapps /etc/webapps
25 %define _webapp horde-%{hordeapp}
26 %define _sysconfdir %{_webapps}/%{_webapp}
28 %define _noautoreq pear(Horde.*)
31 Ansel is a full featured photo management application. With it, you
32 can organize your photos in any number of galleries and subgalleries,
33 share galleries among other Horde users or even make them public.
34 Ansel supports a wide range of features.
37 %setup -q -n %{hordeapp}-h3-%{version}
40 for i in config/*.dist; do
41 mv $i config/$(basename $i .dist)
43 # considered harmful (horde/docs/SECURITY)
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/docs}
50 cp -a *.php $RPM_BUILD_ROOT%{_appdir}
51 cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
52 echo '<?php ?>' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.php
53 touch $RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
54 cp -a lib locale templates themes $RPM_BUILD_ROOT%{_appdir}
55 cp -a faces gallery img $RPM_BUILD_ROOT%{_appdir}
56 cp -a docs/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
58 ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
59 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
60 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
63 rm -rf $RPM_BUILD_ROOT
66 if [ ! -f %{_sysconfdir}/conf.php.bak ]; then
67 install /dev/null -o root -g http -m 0660 %{_sysconfdir}/conf.php.bak
70 # CHECK FIRST DOES IT HAVE SQL AND FILE THERE.
72 %banner %{name} -e <<-EOF
74 If you are installing Ansel for the first time, You may need to
75 create the Ansel database tables. To do so run:
76 zcat %{_docdir}/%{name}-%{version}/scripts/sql/%{hordeapp}.sql.gz | mysql horde
80 %triggerin -- apache1 < 1.3.37-3, apache1-base
81 %webapp_register apache %{_webapp}
83 %triggerun -- apache1 < 1.3.37-3, apache1-base
84 %webapp_unregister apache %{_webapp}
86 %triggerin -- apache < 2.2.0, apache-base
87 %webapp_register httpd %{_webapp}
89 %triggerun -- apache < 2.2.0, apache-base
90 %webapp_unregister httpd %{_webapp}
93 %defattr(644,root,root,755)
94 %doc README docs/* scripts
95 %dir %attr(750,root,http) %{_sysconfdir}
96 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
97 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
98 %attr(660,root,http) %config(noreplace) %{_sysconfdir}/conf.php
99 %attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/conf.php.bak
100 %attr(640,root,http) %config(noreplace) %{_sysconfdir}/[!c]*.php
101 %attr(640,root,http) %{_sysconfdir}/conf.xml