]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - horde.spec
- enable parallel build for ghc packages
[projects/template-specs.git] / horde.spec
index bfc47e3ef61ee797748299094c300f3a6350e805..7c30d281168e82502a1b016eb8b85fa54ef8731a 100644 (file)
@@ -1,41 +1,38 @@
-#define        _rc             rc1
-%define        _snap   2005-08-01
-%define        _rel    0.1
+# TODO
+# - lighttpd support
 
 # REPLACE words 'SKELETON', 'Skeleton', 'skeleton' with your application
 # GET THE Summary from here: http://www.horde.org/source/modules.php
 # FIND .htaccess FILES AND MAKE SURE APACHE CONF DISABLES ACCESS TO
 # THOSE DIRS: find -name '.??*' IS EASY TO LOCATE.
 
-%include       /usr/lib/rpm/macros.php
+%define                hordeapp        skeleton
 Summary:       Template for horde projects
-Name:          skeleton
+Name:          horde-%{hordeapp}
 Version:       0.1
-Release:       %{?_rc:%{_rc}.}%{?_snap:0.%(echo %{_snap} | tr -d -).}%{_rel}
-License:       GPL v2 (CHECK IT FIRST)
+Release:       0.1
+License:       GPL v2 (CHECK IT FIRST, could be ASL)
 Group:         Applications/WWW
-#Source0:      ftp://ftp.horde.org/pub/skeleton/%{name}-h3-%{version}.tar.gz
-#Source0:      ftp://ftp.horde.org/pub/skeleton/%{name}-h3-%{version}-%{_rc}.tar.gz
-#Source0:      ftp://ftp.horde.org/pub/snaps/%{_snap}/%{name}-HEAD-%{_snap}.tar.gz
-# COPY IN SOURCES ../SOURCES/ingo.conf AS SOURCE1 HERE:
-# cp ../SOURCES/{ingo,skeleton}.conf
-# DON'T FORGET TO :%s#ingo#skeleton#g in that file
-Source1:       %{name}.conf
+Source0:       ftp://ftp.horde.org/pub/skeleton/%{hordeapp}-h3-%{version}.tar.gz
+# Source0-md5: -
+Source1:       apache.conf
+Patch0:                prefs.patch
 URL:           http://www.horde.org/skeleton/
-BuildRequires: rpmbuild(macros) >= 1.226
-Requires:      apache >= 1.3.33-2
-Requires:      apache(mod_access)
+BuildRequires: rpm-php-pearprov >= 4.0.2-98
+BuildRequires: rpmbuild(macros) >= 1.745
 Requires:      horde >= 3.0
+Requires:      webapps
+Requires:      webserver(access)
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-# horde accesses it directly in help->about
-%define                _noautocompressdoc  CREDITS
-%define                _noautoreq      'pear(Horde.*)' 'pear(Text/Flowed.php)'
+%define                hordedir        /usr/share/horde
+%define                _appdir         %{hordedir}/%{hordeapp}
+%define                _webapps        /etc/webapps
+%define                _webapp         horde-%{hordeapp}
+%define                _sysconfdir     %{_webapps}/%{_webapp}
 
-%define                hordedir                /usr/share/horde
-%define                _sysconfdir             /etc/horde.org
-%define                _appdir                 %{hordedir}/%{name}
+%define                _noautoreq      pear(Horde.*)
 
 # GET DESCRIPTION FROM PROJECT URL
 %description
@@ -45,75 +42,79 @@ The Horde Project writes web applications in PHP and releases them
 under the GNU Public License. For more information (including help
 with Skeleton) please visit <http://www.horde.org/>.
 
-%prep
-%setup -q -n %{?_snap:%{name}}%{!?_snap:%{name}-h3-%{version}%{?_rc:-%{_rc}}}
+%description -l pl.UTF-8
+SKELETON
 
-# considered harmful (horde/docs/SECURITY)
-rm -f test.php
+Projekt Horde tworzy aplikacje WWW w PHP i wydaje je na licencji GNU
+General Public License. Więcej informacji (włącznie z pomocą dla
+Skeleton) można znaleźć na stronie <http://www.horde.org/>.
 
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/cron.daily,%{_sysconfdir}/%{name}} \
-       $RPM_BUILD_ROOT%{_appdir}/{docs,lib,locale,scripts,templates,themes}
+%prep
+%setup -q -n %{hordeapp}-h3-%{version}
+%patch0 -p1
 
-cp -pR *.php                   $RPM_BUILD_ROOT%{_appdir}
+rm {,*/}.htaccess
 for i in config/*.dist; do
-       cp -p $i $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$(basename $i .dist)
+       mv $i config/$(basename $i .dist)
 done
-echo "<?php ?>" >              $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.php
-cp -p  config/*.xml            $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
-> $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.php.bak
+# considered harmful (horde/docs/SECURITY)
+rm test.php
 
-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
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/docs}
 
-ln -s %{_sysconfdir}/%{name}   $RPM_BUILD_ROOT%{_appdir}/config
-ln -s %{_defaultdocdir}/%{name}-%{version}/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
+cp -a *.php $RPM_BUILD_ROOT%{_appdir}
+cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
+echo '<?php ?>' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.php
+touch $RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
+cp -a lib locale templates themes $RPM_BUILD_ROOT%{_appdir}
+cp -a docs/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
 
-install %{SOURCE1}             $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
+ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
+cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-if [ ! -f %{_sysconfdir}/%{name}/conf.php.bak ]; then
-       install /dev/null -o root -g http -m660 %{_sysconfdir}/%{name}/conf.php.bak
+if [ ! -f %{_sysconfdir}/conf.php.bak ]; then
+       install /dev/null -o root -g http -m 0660 %{_sysconfdir}/conf.php.bak
 fi
 
 # CHECK FIRST DOES IT HAVE SQL AND FILE THERE.
 if [ "$1" = 1 ]; then
-%banner %{name} -e <<-EOF
+       %banner %{name} -e <<-EOF
        IMPORTANT:
        If you are installing Skeleton for the first time, You may need to
        create the Skeleton database tables. To do so run:
-       zcat %{_docdir}/%{name}-%{version}/scripts/sql/%{name}.sql.gz | mysql horde
-EOF
+       zcat %{_docdir}/%{name}-%{version}/scripts/sql/%{hordeapp}.sql.gz | mysql horde
+       EOF
 fi
 
-%triggerin -- apache1 >= 1.3.33-2
-%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
-
-%triggerun -- apache1 >= 1.3.33-2
-%apache_config_uninstall -v 1
+%triggerin -- apache1 < 1.3.37-3, apache1-base
+%webapp_register apache %{_webapp}
 
-%triggerin -- apache >= 2.0.0
-%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
+%triggerun -- apache1 < 1.3.37-3, apache1-base
+%webapp_unregister apache %{_webapp}
 
-%triggerun -- apache >= 2.0.0
-%apache_config_uninstall -v 2
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
 
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
 
 %files
 %defattr(644,root,root,755)
 %doc README docs/* scripts
-%attr(750,root,http) %dir %{_sysconfdir}/%{name}
-%attr(640,root,root) %config(noreplace) %{_sysconfdir}/apache-%{name}.conf
-%attr(660,root,http) %config(noreplace) %{_sysconfdir}/%{name}/conf.php
-%attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/%{name}/conf.php.bak
-%attr(640,root,http) %config(noreplace) %{_sysconfdir}/%{name}/[!c]*.php
-%attr(640,root,http) %{_sysconfdir}/%{name}/*.xml
+%dir %attr(750,root,http) %{_sysconfdir}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_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.036758 seconds and 4 git commands to generate.