4 # REPLACE words 'SKELETON', 'Skeleton', 'skeleton' with your application
5 # GET THE Summary from here: http://www.horde.org/source/modules.php
6 # FIND .htaccess FILES AND MAKE SURE APACHE CONF DISABLES ACCESS TO
7 # THOSE DIRS: find -name '.??*' IS EASY TO LOCATE.
9 %define hordeapp skeleton
10 %include /usr/lib/rpm/macros.php
11 Summary: Template for horde projects
12 Name: horde-%{hordeapp}
15 License: GPL v2 (CHECK IT FIRST, could be ASL)
16 Group: Applications/WWW
17 Source0: ftp://ftp.horde.org/pub/skeleton/%{hordeapp}-h3-%{version}.tar.gz
21 URL: http://www.horde.org/skeleton/
22 BuildRequires: rpm-php-pearprov >= 4.0.2-98
23 BuildRequires: rpmbuild(macros) >= 1.264
24 Requires: horde >= 3.0
26 Requires: webserver(access)
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define hordedir /usr/share/horde
31 %define _appdir %{hordedir}/%{hordeapp}
32 %define _webapps /etc/webapps
33 %define _webapp horde-%{hordeapp}
34 %define _sysconfdir %{_webapps}/%{_webapp}
36 %define _noautoreq pear(Horde.*)
38 # GET DESCRIPTION FROM PROJECT URL
42 The Horde Project writes web applications in PHP and releases them
43 under the GNU Public License. For more information (including help
44 with Skeleton) please visit <http://www.horde.org/>.
46 %description -l pl.UTF-8
49 Projekt Horde tworzy aplikacje WWW w PHP i wydaje je na licencji GNU
50 General Public License. Więcej informacji (włącznie z pomocą dla
51 Skeleton) można znaleźć na stronie <http://www.horde.org/>.
54 %setup -q -n %{hordeapp}-h3-%{version}
58 for i in config/*.dist; do
59 mv $i config/$(basename $i .dist)
61 # considered harmful (horde/docs/SECURITY)
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/docs}
68 cp -a *.php $RPM_BUILD_ROOT%{_appdir}
69 cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
70 echo '<?php ?>' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.php
71 touch $RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
72 cp -a lib locale templates themes $RPM_BUILD_ROOT%{_appdir}
73 cp -a docs/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
75 ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
76 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
77 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
80 rm -rf $RPM_BUILD_ROOT
83 if [ ! -f %{_sysconfdir}/conf.php.bak ]; then
84 install /dev/null -o root -g http -m 0660 %{_sysconfdir}/conf.php.bak
87 # CHECK FIRST DOES IT HAVE SQL AND FILE THERE.
89 %banner %{name} -e <<-EOF
91 If you are installing Skeleton for the first time, You may need to
92 create the Skeleton database tables. To do so run:
93 zcat %{_docdir}/%{name}-%{version}/scripts/sql/%{hordeapp}.sql.gz | mysql horde
97 %triggerin -- apache1 < 1.3.37-3, apache1-base
98 %webapp_register apache %{_webapp}
100 %triggerun -- apache1 < 1.3.37-3, apache1-base
101 %webapp_unregister apache %{_webapp}
103 %triggerin -- apache < 2.2.0, apache-base
104 %webapp_register httpd %{_webapp}
106 %triggerun -- apache < 2.2.0, apache-base
107 %webapp_unregister httpd %{_webapp}
110 %defattr(644,root,root,755)
111 %doc README docs/* scripts
112 %dir %attr(750,root,http) %{_sysconfdir}
113 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
114 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
115 %attr(660,root,http) %config(noreplace) %{_sysconfdir}/conf.php
116 %attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/conf.php.bak
117 %attr(640,root,http) %config(noreplace) %{_sysconfdir}/[!c]*.php
118 %attr(640,root,http) %{_sysconfdir}/conf.xml