]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - horde.spec
- unify
[projects/template-specs.git] / horde.spec
index ece3ac304074b087843b7049a7d6711d92ca2ee0..aec35c59cac8349801d7f15a24426db0d6cb0184 100644 (file)
@@ -1,3 +1,5 @@
+# TODO
+# - lighttpd support
 %define        _hordeapp skeleton
 #define        _snap   2005-08-01
 #define        _rc             rc1
@@ -27,11 +29,12 @@ Source1:    %{_hordeapp}.conf
 Patch0:                %{_hordeapp}-prefs.patch
 URL:           http://www.horde.org/skeleton/
 BuildRequires: rpm-php-pearprov >= 4.0.2-98
-BuildRequires: rpmbuild(macros) >= 1.226
+BuildRequires: rpmbuild(macros) >= 1.264
 BuildRequires: tar >= 1:1.15.1
-Requires:      apache >= 1.3.33-2
 Requires:      apache(mod_access)
 Requires:      horde >= 3.0
+Requires:      webapps
+#Obsoletes:    %{_hordeapp}
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -40,8 +43,10 @@ BuildRoot:   %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _noautoreq      'pear(Horde.*)'
 
 %define                hordedir        /usr/share/horde
-%define                _sysconfdir     /etc/horde.org
 %define                _appdir         %{hordedir}/%{_hordeapp}
+%define                _webapps        /etc/webapps
+%define                _webapp         horde-%{_hordeapp}
+%define                _sysconfdir     %{_webapps}/%{_webapp}
 
 # GET DESCRIPTION FROM PROJECT URL
 %description
@@ -59,7 +64,7 @@ General Public License. Wi
 Skeleton) mo¿na znale¼æ na stronie <http://www.horde.org/>.
 
 %prep
-%setup -q -c -T -n %{?_snap:%{_hordeapp}-%{_snap}}%{!?_snap:%{_hordeapp}-%{version}%{?_rc:-%{_rc}}}
+%setup -qcT -n %{?_snap:%{_hordeapp}-%{_snap}}%{!?_snap:%{_hordeapp}-%{version}%{?_rc:-%{_rc}}}
 tar zxf %{SOURCE0} --strip-components=1
 
 # considered harmful (horde/docs/SECURITY)
@@ -67,32 +72,33 @@ rm -f test.php
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp} \
-       $RPM_BUILD_ROOT%{_appdir}/{docs,lib,locale,scripts,templates,themes}
+install -d $RPM_BUILD_ROOT%{_sysconfdir} \
+       $RPM_BUILD_ROOT%{_appdir}/{docs,lib,locale,templates,themes}
 
 cp -a *.php                    $RPM_BUILD_ROOT%{_appdir}
 for i in config/*.dist; do
-       cp -a $i $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/$(basename $i .dist)
+       cp -a $i $RPM_BUILD_ROOT%{_sysconfdir}/$(basename $i .dist)
 done
-echo '<?php ?>' >              $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.php
-cp -p config/conf.xml  $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.xml
-touch                                  $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.php.bak
+echo '<?php ?>' >              $RPM_BUILD_ROOT%{_sysconfdir}/conf.php
+cp -p config/conf.xml  $RPM_BUILD_ROOT%{_sysconfdir}/conf.xml
+touch                                  $RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
 
-cp -pR lib/*                   $RPM_BUILD_ROOT%{_appdir}/lib
-cp -pR locale/*                $RPM_BUILD_ROOT%{_appdir}/locale
-cp -pR templates/*             $RPM_BUILD_ROOT%{_appdir}/templates
-cp -pR themes/*                $RPM_BUILD_ROOT%{_appdir}/themes
+cp - lib/*                   $RPM_BUILD_ROOT%{_appdir}/lib
+cp - locale/*                $RPM_BUILD_ROOT%{_appdir}/locale
+cp - templates/*             $RPM_BUILD_ROOT%{_appdir}/templates
+cp - themes/*                $RPM_BUILD_ROOT%{_appdir}/themes
 
-ln -s %{_sysconfdir}/%{_hordeapp} $RPM_BUILD_ROOT%{_appdir}/config
+ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
 ln -s %{_docdir}/%{name}-%{version}/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{_hordeapp}.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-if [ ! -f %{_sysconfdir}/%{_hordeapp}/conf.php.bak ]; then
-       install /dev/null -o root -g http -m660 %{_sysconfdir}/%{_hordeapp}/conf.php.bak
+if [ ! -f %{_sysconfdir}/conf.php.bak ]; then
+       install /dev/null -o root -g http -m660 %{_sysconfdir}/conf.php.bak
 fi
 
 # CHECK FIRST DOES IT HAVE SQL AND FILE THERE.
@@ -105,27 +111,28 @@ if [ "$1" = 1 ]; then
 EOF
 fi
 
-%triggerin -- apache1 >= 1.3.33-2
-%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{_hordeapp}.conf
+%triggerin -- apache1
+%webapp_register apache %{_webapp}
 
-%triggerun -- apache1 >= 1.3.33-2
-%apache_config_uninstall -v 1
+%triggerun -- apache1
+%webapp_unregister apache %{_webapp}
 
 %triggerin -- apache >= 2.0.0
-%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{_hordeapp}.conf
+%webapp_register httpd %{_webapp}
 
 %triggerun -- apache >= 2.0.0
-%apache_config_uninstall -v 2
+%webapp_unregister httpd %{_webapp}
 
 %files
 %defattr(644,root,root,755)
 %doc README docs/* scripts
-%attr(750,root,http) %dir %{_sysconfdir}/%{_hordeapp}
-%attr(640,root,root) %config(noreplace) %{_sysconfdir}/apache-%{_hordeapp}.conf
-%attr(660,root,http) %config(noreplace) %{_sysconfdir}/%{_hordeapp}/conf.php
-%attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/%{_hordeapp}/conf.php.bak
-%attr(640,root,http) %config(noreplace) %{_sysconfdir}/%{_hordeapp}/[!c]*.php
-%attr(640,root,http) %{_sysconfdir}/%{_hordeapp}/conf.xml
+%dir %attr(750,root,http) %{_sysconfdir}
+%attr(640,root,root) %config(noreplace) %{_sysconfdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %{_sysconfdir}/httpd.conf
+%attr(660,root,http) %config(noreplace) %{_sysconfdir}/conf.php
+%attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/conf.php.bak
+%attr(640,root,http) %config(noreplace) %{_sysconfdir}/[!c]*.php
+%attr(640,root,http) %{_sysconfdir}/conf.xml
 
 %dir %{_appdir}
 %{_appdir}/*.php
This page took 0.085169 seconds and 4 git commands to generate.