]> git.pld-linux.org Git - SPECS.git/blob - horde-ansel.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / horde-ansel.spec
1 # TODO
2 # - lighttpd: docs/lighttpd-ansel.conf
3 %define         hordeapp        ansel
4 Summary:        Ansel Photo Management and Web Gallery application
5 Name:           horde-%{hordeapp}
6 Version:        1.1.2
7 Release:        0.1
8 License:        GPL v2
9 Group:          Applications/WWW
10 Source0:        ftp://ftp.horde.org/pub/ansel/%{hordeapp}-h3-%{version}.tar.gz
11 # Source0-md5:  9ef6fce234593b1c40dc1ccdc39b5a37
12 Source1:        apache.conf
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
17 Requires:       webapps
18 Requires:       webserver(access)
19 BuildArch:      noarch
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
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}
27
28 %define         _noautoreq      pear(Horde.*)
29
30 %description
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.
35
36 %prep
37 %setup -q -n %{hordeapp}-h3-%{version}
38
39 rm {,*/}.htaccess
40 for i in config/*.dist; do
41         mv $i config/$(basename $i .dist)
42 done
43 # considered harmful (horde/docs/SECURITY)
44 rm test.php
45
46 %install
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/docs}
49
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
57
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
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %post
66 if [ ! -f %{_sysconfdir}/conf.php.bak ]; then
67         install /dev/null -o root -g http -m 0660 %{_sysconfdir}/conf.php.bak
68 fi
69
70 # CHECK FIRST DOES IT HAVE SQL AND FILE THERE.
71 if [ "$1" = 1 ]; then
72         %banner %{name} -e <<-EOF
73         IMPORTANT:
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
77         EOF
78 fi
79
80 %triggerin -- apache1 < 1.3.37-3, apache1-base
81 %webapp_register apache %{_webapp}
82
83 %triggerun -- apache1 < 1.3.37-3, apache1-base
84 %webapp_unregister apache %{_webapp}
85
86 %triggerin -- apache < 2.2.0, apache-base
87 %webapp_register httpd %{_webapp}
88
89 %triggerun -- apache < 2.2.0, apache-base
90 %webapp_unregister httpd %{_webapp}
91
92 %files
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
102
103 %dir %{_appdir}
104 %{_appdir}/*.php
105 %{_appdir}/config
106 %{_appdir}/docs
107 %{_appdir}/faces
108 %{_appdir}/gallery
109 %{_appdir}/img
110 %{_appdir}/lib
111 %{_appdir}/locale
112 %{_appdir}/templates
113 %{_appdir}/themes
This page took 1.640236 seconds and 3 git commands to generate.