Группа :: Сети/Прочее
Пакет: horde
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
%define rel RC2
Name: horde
Version: 2.2.6
Release: alt0.1.%rel
Summary: The common Horde Framework for all Horde modules.
License: LGPL
Group: Networking/Other
URL: http://www.horde.org/
Source: %name-%version-%rel.tar.bz2
Source1: %name.conf
BuildArchitectures: noarch
Requires: php >= 4.2.1
Requires: pear >= 1.3.1
Requires: mod_php
Requires: apache-common >= 1.3.31rusPL30.20-alt10
BuildPreReq: apache-devel
%description
The Horde Framework provides a common structure and interface for Horde
applications (such as IMP, a web-based mail program). This RPM is
required for all other Horde module RPMs.
The Horde Project writes web applications in PHP and releases them under
Open Source licenses. For more information (including help with Horde
and its modules) please visit http://www.horde.org/.
%prep
%setup -q -n %name-%version-%rel
%__subst "/#!\/usr\/bin\/php -q/d" po/translation.php
%build
%install
%__mkdir_p %buildroot%apache_addonconfdir.d
%__cp -p %SOURCE1 %buildroot%apache_addonconfdir.d
%__mkdir_p %buildroot%apache_htdocsdir/addon-modules/%name
%__cp -pR * %buildroot%apache_htdocsdir/addon-modules/%name
%__chmod go-rwx %buildroot%apache_htdocsdir/addon-modules/%name/test.php
cd %buildroot%apache_htdocsdir/addon-modules/%name/config
for d in *.dist; do
d0=`basename $d .dist`
if [ ! -f "$d0" ]; then
%__cp -p $d $d0
fi
done
%post
# post-install instructions:
if egrep -q "^Include conf/addon-modules.?d?/horde.conf" %apache_conf; then
%__subst "/Include conf\/addon-modules\/horde.conf/d" %apache_conf
%__subst "/Include conf\/addon-modules.d\/horde.conf/d" %apache_conf
fi
if ! grep -q "^Include conf/addon-modules.d/\*.conf" %apache_conf; then
echo "Include conf/addon-modules.d/horde.conf" >> %apache_conf
fi
[ -f %apache_addonconfdir.d/horde.conf ] &&
%__subst "s/127.0.0.1/127.0.0.1 `hostname -i`/" \
%apache_addonconfdir.d/horde.conf
/sbin/service httpd condrestart
cat <<_EOF_
You must manually configure Horde!
See "CONFIGURING HORDE" in %apache_htdocsdir/addon-modules/%name/docs/INSTALL
By default, access to horde allowed only from localhost or `hostname`
To configure access to horde you must edit %apache_addonconfdir.d/horde.conf
_EOF_
%postun
if [ $1 -eq 0 ]; then
if [ -f %apache_conf ] ; then
grep -q "^Include conf/addon-modules.d/horde.conf" %apache_conf &&
%__subst "/Include conf\/addon-modules.d\/horde.conf/d" %apache_conf
/sbin/service httpd condrestart
fi
fi
%files
# Apache horde.conf file
%config(noreplace) %apache_addonconfdir.d/horde.conf
%dir %apache_htdocsdir/addon-modules/%name
# Include top-level files by hand
%apache_htdocsdir/addon-modules/%name/*.php
%apache_htdocsdir/addon-modules/%name/graphics
%apache_htdocsdir/addon-modules/%name/lib
%apache_htdocsdir/addon-modules/%name/locale
%apache_htdocsdir/addon-modules/%name/po
%apache_htdocsdir/addon-modules/%name/scripts
%apache_htdocsdir/addon-modules/%name/templates
%apache_htdocsdir/addon-modules/%name/util
# Mark documentation files with %doc and %docdir
%doc %apache_htdocsdir/addon-modules/%name/COPYING
%doc %apache_htdocsdir/addon-modules/%name/README
%docdir %apache_htdocsdir/addon-modules/%name/docs
%apache_htdocsdir/addon-modules/%name/docs
# Mark configuration files with %config and use secure permissions
# (note that .dist files are considered software; don't mark %config)
%attr(750,root,%apache_group) %dir %apache_htdocsdir/addon-modules/%name/config
%defattr(640,root,%apache_group)
%apache_htdocsdir/addon-modules/%name/config/.htaccess
%apache_htdocsdir/addon-modules/%name/config/*.dist
%config %apache_htdocsdir/addon-modules/%name/config/*.php
%changelog
…
Полный changelog можно просмотреть здесь
Name: horde
Version: 2.2.6
Release: alt0.1.%rel
Summary: The common Horde Framework for all Horde modules.
License: LGPL
Group: Networking/Other
URL: http://www.horde.org/
Source: %name-%version-%rel.tar.bz2
Source1: %name.conf
BuildArchitectures: noarch
Requires: php >= 4.2.1
Requires: pear >= 1.3.1
Requires: mod_php
Requires: apache-common >= 1.3.31rusPL30.20-alt10
BuildPreReq: apache-devel
%description
The Horde Framework provides a common structure and interface for Horde
applications (such as IMP, a web-based mail program). This RPM is
required for all other Horde module RPMs.
The Horde Project writes web applications in PHP and releases them under
Open Source licenses. For more information (including help with Horde
and its modules) please visit http://www.horde.org/.
%prep
%setup -q -n %name-%version-%rel
%__subst "/#!\/usr\/bin\/php -q/d" po/translation.php
%build
%install
%__mkdir_p %buildroot%apache_addonconfdir.d
%__cp -p %SOURCE1 %buildroot%apache_addonconfdir.d
%__mkdir_p %buildroot%apache_htdocsdir/addon-modules/%name
%__cp -pR * %buildroot%apache_htdocsdir/addon-modules/%name
%__chmod go-rwx %buildroot%apache_htdocsdir/addon-modules/%name/test.php
cd %buildroot%apache_htdocsdir/addon-modules/%name/config
for d in *.dist; do
d0=`basename $d .dist`
if [ ! -f "$d0" ]; then
%__cp -p $d $d0
fi
done
%post
# post-install instructions:
if egrep -q "^Include conf/addon-modules.?d?/horde.conf" %apache_conf; then
%__subst "/Include conf\/addon-modules\/horde.conf/d" %apache_conf
%__subst "/Include conf\/addon-modules.d\/horde.conf/d" %apache_conf
fi
if ! grep -q "^Include conf/addon-modules.d/\*.conf" %apache_conf; then
echo "Include conf/addon-modules.d/horde.conf" >> %apache_conf
fi
[ -f %apache_addonconfdir.d/horde.conf ] &&
%__subst "s/127.0.0.1/127.0.0.1 `hostname -i`/" \
%apache_addonconfdir.d/horde.conf
/sbin/service httpd condrestart
cat <<_EOF_
You must manually configure Horde!
See "CONFIGURING HORDE" in %apache_htdocsdir/addon-modules/%name/docs/INSTALL
By default, access to horde allowed only from localhost or `hostname`
To configure access to horde you must edit %apache_addonconfdir.d/horde.conf
_EOF_
%postun
if [ $1 -eq 0 ]; then
if [ -f %apache_conf ] ; then
grep -q "^Include conf/addon-modules.d/horde.conf" %apache_conf &&
%__subst "/Include conf\/addon-modules.d\/horde.conf/d" %apache_conf
/sbin/service httpd condrestart
fi
fi
%files
# Apache horde.conf file
%config(noreplace) %apache_addonconfdir.d/horde.conf
%dir %apache_htdocsdir/addon-modules/%name
# Include top-level files by hand
%apache_htdocsdir/addon-modules/%name/*.php
%apache_htdocsdir/addon-modules/%name/graphics
%apache_htdocsdir/addon-modules/%name/lib
%apache_htdocsdir/addon-modules/%name/locale
%apache_htdocsdir/addon-modules/%name/po
%apache_htdocsdir/addon-modules/%name/scripts
%apache_htdocsdir/addon-modules/%name/templates
%apache_htdocsdir/addon-modules/%name/util
# Mark documentation files with %doc and %docdir
%doc %apache_htdocsdir/addon-modules/%name/COPYING
%doc %apache_htdocsdir/addon-modules/%name/README
%docdir %apache_htdocsdir/addon-modules/%name/docs
%apache_htdocsdir/addon-modules/%name/docs
# Mark configuration files with %config and use secure permissions
# (note that .dist files are considered software; don't mark %config)
%attr(750,root,%apache_group) %dir %apache_htdocsdir/addon-modules/%name/config
%defattr(640,root,%apache_group)
%apache_htdocsdir/addon-modules/%name/config/.htaccess
%apache_htdocsdir/addon-modules/%name/config/*.dist
%config %apache_htdocsdir/addon-modules/%name/config/*.php
%changelog
…
Полный changelog можно просмотреть здесь