]> git.pld-linux.org Git - packages/egroupware.git/blobdiff - egroupware.spec
- typo
[packages/egroupware.git] / egroupware.spec
index dbd2a2c802774fdbd10d99bfa2e81e79a16f2a60..e0686b6699822c0254b0cbcdcfff5fa27caee103 100644 (file)
@@ -1,34 +1,42 @@
 # TODO
 # - subpackages for applications
 # - separate htdocs and includedirs
+# - list of bundled software (to use pld packages instead):
 # - everything
+
+%define        _rc RC6
+%define        _rel 0.1
 Summary:       eGroupWare - a web-based groupware suite written in PHP
 Summary(pl):   eGroupWAre - oparte na WWW oprogramowanie do pracy grupowej napisane w PHP
 Name:          egroupware
-Version:       1.0.0.009
-Release:       0.18
-Epoch:         0
+Version:       1.2
+Release:       1.%{_rc}.%{_rel}
 License:       GPL
 Group:         Applications/WWW
-Source0:       http://dl.sourceforge.net/egroupware/eGroupWare-%{version}.tar.bz2
-# Source0-md5: 2ed2f3041ab4ff235f56ed23dfa7274b
+Source0:       http://dl.sourceforge.net/egroupware/eGroupWare-%{version}%{_rc}-2.tar.bz2
+# Source0-md5: f86c82871c1c6158ee7cfc80996c6d9d
 Source1:       %{name}.conf
 Patch0:                %{name}-setup.patch
 Patch1:                %{name}-ttfdir.patch
 URL:           http://www.egroupware.org/
+BuildRequires: rpmbuild(macros) >= 1.268
 BuildRequires: sed >= 4.0
 Requires:      %{name}(DB_Driver) = %{version}-%{release}
+Requires:      fonts-TTF-bitstream-vera
 Requires:      php >= 3:4.1.2
+Requires:      php-cli
 Requires:      php-gd
 Requires:      php-mbstring
 Requires:      php-pcre
-Requires:      php-cli
-Requires:      fonts-TTF-bitstream-vera
+Requires:      webapps
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _appdir %{_datadir}/%{name}
-%define                _sysconfdir /etc/%{name}
+%define                _webapps        /etc/webapps
+%define                _webapp         %{name}
+%define                _sysconfdir     %{_webapps}/%{_webapp}
+%define                _appdir         %{_datadir}/%{_webapp}
+
 %define                _noautoreqfiles /usr/bin/php
 
 %description
@@ -48,7 +56,7 @@ telefoniczne), zarz
 Summary:       eGroupware setup package
 Summary(pl):   Pakiet do wstêpnej konfiguracji eGroupware
 Group:         Applications/WWW
-PreReq:                %{name} = %{epoch}:%{version}-%{release}
+Requires:      %{name} = %{version}-%{release}
 
 %description setup
 Install this package to configure initial eGroupware installation. You
@@ -109,94 +117,122 @@ eGroupware.
 # remove CVS control files
 find -name CVS -print0 | xargs -0 rm -rf
 # undos the sources
-find -regex '.*\.\(php\|inc\|html\|txt\|js\)$' -print0 | xargs -0 sed -i -e 's,
-$,,'
+find -regex '.*\.\(php\|inc\|html\|txt\|js\)$' -print0 | xargs -0 sed -i -e 's,\r$,,'
 
 %patch0 -p1
 %patch1 -p1
 
 # GPL
-rm -f doc/LICENSE
+rm doc/LICENSE
 
 # no need.
-rm -rf doc/rpm-build
+rm -r doc/rpm-build
 
 # using PLD package
-rm -rf projects/ttf-bitstream-vera-1.10
+rm -r projectmanager/inc/ttf-bitstream-vera-1.10
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
 
 cp -a *.php $RPM_BUILD_ROOT%{_appdir}
-cp -a addressbook admin backup bookmarks calendar comic developer_tools \
-email emailadmin etemplate felamimail filemanager forum ftp fudforum headlines \
-infolog jinn manual messenger news_admin phpbrain phpgwapi phpldapadmin \
-phpsysinfo polls preferences projects registration setup sitemgr stocks tts \
-wiki $RPM_BUILD_ROOT%{_appdir}
+cp -a */ $RPM_BUILD_ROOT%{_appdir}
 
 > $RPM_BUILD_ROOT%{_sysconfdir}/header.php
 ln -s %{_sysconfdir}/header.php $RPM_BUILD_ROOT%{_appdir}/header.inc.php
 
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
 
 # needed by setup script
 install header.inc.php.template $RPM_BUILD_ROOT%{_appdir}
 
+rm -rf $RPM_BUILD_ROOT%{_appdir}/doc
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%triggerin -- apache1 >= 1.3.33-2
-%apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
-
-%triggerun -- apache1 >= 1.3.33-2
-%apache_config_uninstall -v 1
-
-%triggerin -- apache >= 2.0.0
-%apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
-
-%triggerun -- apache >= 2.0.0
-%apache_config_uninstall -v 2
+%triggerin -- apache1
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1
+%webapp_unregister apache %{_webapp}
+
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
+
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
+
+%triggerpostun -- %{name} < 1.2-1.RC6.0.1
+# rescue app configs
+if [ -f /etc/%{name}/header.php.rpmsave ]; then
+       mv -f %{_sysconfdir}/header.php{,.rpmnew}
+       mv -f /etc/%{name}/header.php.rpmsave %{_sysconfdir}/header.php
+fi
+
+# migrate from apache-config macros
+if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
+       if [ -d /etc/apache/webapps.d ]; then
+               cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
+               cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/apache.conf
+       fi
+
+       if [ -d /etc/httpd/webapps.d ]; then
+               cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
+               cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
+       fi
+       rm -f /etc/%{name}/apache.conf.rpmsave
+fi
+
+# migrating from earlier apache-config?
+if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
+       rm -f /etc/apache/conf.d/99_%{name}.conf
+       /usr/sbin/webapp register apache %{_webapp}
+       %service -q apache reload
+fi
+if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
+       rm -f /etc/httpd/httpd.conf/99_%{name}.conf
+       /usr/sbin/webapp register httpd %{_webapp}
+       %service -q httpd reload
+fi
 
 %files
 %defattr(644,root,root,755)
-%attr(710,root,http) %dir %{_sysconfdir}
+%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) %verify(not md5 mtime size) %{_sysconfdir}/header.php
 %doc doc/*
 %dir %{_appdir}
 %{_appdir}/*.php
 %{_appdir}/addressbook
 %{_appdir}/admin
-%{_appdir}/backup
 %{_appdir}/bookmarks
 %{_appdir}/calendar
-%{_appdir}/comic
 %{_appdir}/developer_tools
-%{_appdir}/email
 %{_appdir}/emailadmin
 %{_appdir}/etemplate
 %{_appdir}/felamimail
 %{_appdir}/filemanager
-%{_appdir}/forum
-%{_appdir}/ftp
-%{_appdir}/headlines
 %{_appdir}/infolog
 %{_appdir}/jinn
 %{_appdir}/manual
-%{_appdir}/messenger
 %{_appdir}/news_admin
 %{_appdir}/phpbrain
-%{_appdir}/phpldapadmin
-%{_appdir}/phpsysinfo
 %{_appdir}/polls
 %{_appdir}/preferences
-%{_appdir}/projects
 %{_appdir}/registration
 %{_appdir}/sitemgr
-%{_appdir}/stocks
-%{_appdir}/tts
 %{_appdir}/wiki
+%{_appdir}/home
+%{_appdir}/mydms
+%{_appdir}/projectmanager
+%{_appdir}/resources
+%{_appdir}/sambaadmin
+%{_appdir}/syncml
+%{_appdir}/timesheet
+%{_appdir}/workflow
 
 %dir %{_appdir}/phpgwapi
 %{_appdir}/phpgwapi/*.php
@@ -207,15 +243,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_appdir}/phpgwapi/setup
 %{_appdir}/phpgwapi/templates
 %{_appdir}/phpgwapi/themes
+%{_appdir}/phpgwapi/tests
 %dir %attr(775,root,http) %{_appdir}/phpgwapi/images
 %{_appdir}/phpgwapi/images/*
 
-%dir %attr(775,root,http) %{_appdir}/fudforum
-%{_appdir}/fudforum/*.php
-%{_appdir}/fudforum/inc
-%{_appdir}/fudforum/setup
-%{_appdir}/fudforum/templates
-
 %files setup
 %defattr(644,root,root,755)
 %{_appdir}/header.inc.php.template
This page took 0.074608 seconds and 4 git commands to generate.