# OE: conditional switches #(ie. use with rpm --rebuild): # --with ezlupdate Compile ezlupdate # --with pgsql Enable OpenFTS support %define build_ezlupdate 0 %define build_openfts 0 # commandline overrides: # rpm -ba|--rebuild --with 'xxx' %{?_with_ezlupdate: %{expand: %%define build_ezlupdate 1}} %{?_with_openfts: %{expand: %%define build_openfts 1}} %define ezroot /var/www/html/%{name} # (oe) undefining these makes the build _real_ quick. # i timed this package and gained almost a minute(!). %undefine __find_provides %undefine __find_requires Summary: The eZ publish content management system (CMS) Name: ezpublish Version: 3.9.3 Release: %mkrel 2 License: GPL Group: System/Servers URL: http://ez.no/ Source0: %{name}-%{version}-gpl.tar.gz Source1: Z10_ezpublish.conf Source2: ezpublish.cron Source3: kickstart.ini Patch0: ezpublish-mdk_config.diff BuildRequires: perl BuildRequires: dos2unix Requires(pre): rpm-helper Requires(postun): rpm-helper Requires(pre): apache-conf >= 2.0.54 Requires(pre): apache-mpm >= 2.0.54 Requires(pre): apache-mod_php4 php4-mbstring php4-mysql php4-gd php4-cli Requires: apache-mod_php4 php4-mbstring php4-mysql php4-gd php4-cli Requires: bash Requires: coreutils # optional packages, but not required #Requires: Imagick #Requires: php-pgsql %if %{build_openfts} Requires: php4-pgsql Requires: perl Requires: perl-DBD-Pg Requires: perl-DBI # "perl(Lingua::Stem::Snowball) is needed by perl-Search-OpenFTS-0.34-1mdk", where # do I find this? Requires: perl-Search-OpenFTS %endif BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %if %{build_ezlupdate} BuildRequires: libqt3-devel Requires: libqt3 %endif %if !%{build_ezlupdate} BuildArch: noarch %endif %description eZ publish is an open source content management system and development framework. As a content management system (CMS) it's most notable feature is its revolutionary, fully customizable, and extendable content model. This is also what makes it suitable as a platform for general Web development. Its stand-alone libraries can be used for cross-platform, database independent PHP projects. eZ publish is also well suited for news publishing, e-commerce (B2B and B2C), portals, and corporate Web sites, intranets, and extranets. eZ publish is dual licenced between GPL and the eZ publish professional licence. This package has some conditional build switches: (ie. use with rpm --rebuild): --with ezlupdate Compile ezlupdate --with openfts Enable OpenFTS support %prep %setup -q -n %{name}-%{version} %patch0 -p1 # clean up CVS stuff for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do if [ -e "$i" ]; then rm -r $i; fi >&/dev/null done # fix dir perms find . -type d | xargs chmod 755 # fix file perms find . -type f | xargs chmod 644 cp %{SOURCE1} Z10_ezpublish.conf cp %{SOURCE2} ezpublish.cron.daily cp %{SOURCE3} kickstart.ini # strip away annoying ^M find -type f | grep -v "\.gif" | grep -v "\.png" | grep -v "\.jpg" | xargs dos2unix -U %build %if %{build_ezlupdate} # make the ezlupdate utility pushd support/lupdate-ezpublish3 export QTDIR="/usr/lib/qt3" $QTDIR/bin/qmake ezlupdate.pro %make cp README.txt ../../README.ezlupdate popd %endif %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{ezroot} install -d %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d install -d %{buildroot}%{_sysconfdir}/cron.daily %if %{build_ezlupdate} install -d %{buildroot}%{_bindir} install -m755 bin/linux/ezlupdate %{buildroot}%{_bindir}/ezlupdate # do some house cleaning rm -rf %{buildroot}%{ezroot}/bin/linux %endif for dir in cronjobs design doc kernel lib settings share update var extension packages; do cp -aRf $dir %{buildroot}%{ezroot}/ done install -m0644 .htaccess_root %{buildroot}%{ezroot}/ install -m0644 access.php %{buildroot}%{ezroot}/ install -m0644 index.php %{buildroot}%{ezroot}/ install -m0644 pre_check.php %{buildroot}%{ezroot}/ install -m0644 webdav.php %{buildroot}%{ezroot}/ install -m0644 soap.php %{buildroot}%{ezroot}/ install -m0644 kickstart.ini %{buildroot}%{ezroot}/ install -m0644 Z10_ezpublish.conf %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d/ezpublish.conf install -m0755 ezpublish.cron.daily %{buildroot}%{_sysconfdir}/cron.daily/ezpublish install -d %{buildroot}%{ezroot}/bin/shell install -m0755 bin/modfix.sh %{buildroot}%{ezroot}/bin/ install -m0755 bin/shell/*.sh %{buildroot}%{ezroot}/bin/shell/ install -m0755 runcronjobs.php %{buildroot}%{ezroot}/ install -m0755 ezpm.php %{buildroot}%{ezroot}/ install -d %{buildroot}%{ezroot}/bin/php install -m0755 bin/php/*.php %{buildroot}%{ezroot}/bin/php/ %if %{build_openfts} install -d %{buildroot}%{ezroot}/bin/openfts install -m0755 bin/openfts/*.pl %{buildroot}%{ezroot}/bin/openfts/ %endif # change attribs here so that the package can own %{ezroot}/bin chmod 755 %{buildroot}%{ezroot}/bin/shell/*.sh chmod 755 %{buildroot}%{ezroot}/bin/*.sh chmod 755 %{buildroot}%{ezroot}/bin/php/*.php # create ghostfiles touch %{buildroot}%{ezroot}/settings/override/i18n.ini.append.php touch %{buildroot}%{ezroot}/settings/override/image.ini.append.php touch %{buildroot}%{ezroot}/settings/override/setup.ini.append.php touch %{buildroot}%{ezroot}/settings/override/site.ini.append.php # remove after 10.1 ? cat > README.upgrade.urpmi << EOF Mandriva Linux up to Limited Edition 2005: ------------------------------------------ The configuration files was moved from /etc/httpd/conf.d to /etc/httpd/webapps.d/. Your old configuration files was not erased if it was different from the default one, so you may need to review it. Mandriva Linux after Limited Edition 2005: ------------------------------------------- The configuration files was yet again moved, but this time from /etc/httpd/webapps.d/ to /etc/httpd/conf/webapps.d/. Your old configuration files was not erased if it was different from the default one, so you may need to review it. EOF # fix path to php4-cli find %{buildroot} -type f | xargs perl -pi -e "s|^#\!/usr/bin/env php|#\!/usr/bin/php4|g" perl -pi -e "s|/usr/bin/php|/usr/bin/php4|g" %{buildroot}%{_sysconfdir}/cron.daily/ezpublish %post if [ -f %{_var}/lock/subsys/httpd ]; then %{_initrddir}/httpd restart 1>&2; fi %create_ghostfile %{ezroot}/settings/override/i18n.ini.append.php apache apache 0644 %create_ghostfile %{ezroot}/settings/override/image.ini.append.php apache apache 0644 %create_ghostfile %{ezroot}/settings/override/setup.ini.append.php apache apache 0644 %create_ghostfile %{ezroot}/settings/override/site.ini.append.php apache apache 0644 %preun if [ $1 = "0" ]; then echo "NOTE: Cleaning the %{name} cache in the %{ezroot} directory:" cd %{ezroot}; %{ezroot}/bin/shell/clearcache.sh --clear-all; cd - fi %postun if [ $1 = "0" ]; then EZ_DIR="%{ezroot}/settings/override" if [ -d ${EZ_DIR} ] && [ -f ${EZ_DIR}/site.ini.append.php ]; then EZ_DATE=`date +%Y%m%d%N` echo "NOTE: Files in ${EZ_DIR} is being renamed to:" cd ${EZ_DIR} for f in *.php; do echo "${EZ_DIR}/${f} -> ${EZ_DIR}/${f}.${EZ_DATE}" mv ${EZ_DIR}/${f} ${EZ_DIR}/${f}.${EZ_DATE} chown root:root ${EZ_DIR}/${f}.${EZ_DATE} chmod 600 ${EZ_DIR}/${f}.${EZ_DATE} done echo "This has to be done if %{name} is to be re-installed in the future. Also you may have to" echo "remove the database files in %{_localstatedir}/mysql/%{name} manually." fi fi if [ "$1" = "0" ]; then if [ -f %{_var}/lock/subsys/httpd ]; then %{_initrddir}/httpd restart 1>&2 fi fi %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc LICENSE README.* %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/webapps.d/ezpublish.conf %attr(0755,root,root) %{_sysconfdir}/cron.daily/ezpublish %if %{build_openfts} %attr(0755,root,root) %{ezroot}/bin/openfts/delete.pl %attr(0755,root,root) %{ezroot}/bin/openfts/search.pl %attr(0755,root,root) %{ezroot}/bin/openfts/index.pl %attr(0755,root,root) %{ezroot}/bin/openfts/init.pl %endif %{ezroot}/bin %{ezroot}/cronjobs %{ezroot}/design %{ezroot}/doc %{ezroot}/extension %{ezroot}/kernel %{ezroot}/lib %{ezroot}/packages %{ezroot}/share %{ezroot}/update %{ezroot}/*.php %{ezroot}/.htaccess_root %{ezroot}/kickstart.ini # can it get more loose and unsecure? %attr(0755,apache,apache) %dir %{ezroot} %attr(0770,apache,apache) %dir %{ezroot}/design %attr(0770,apache,apache) %dir %{ezroot}/design/admin/override/templates %attr(0770,apache,apache) %dir %{ezroot}/settings %attr(0770,apache,apache) %dir %{ezroot}/settings/siteaccess %attr(0770,apache,apache) %dir %{ezroot}/settings/override %attr(0770,apache,apache) %dir %{ezroot}/settings/siteaccess/admin # apache needs to cache into the var dir %attr(0770,apache,apache) %dir %{ezroot}/var %attr(0770,apache,apache) %dir %{ezroot}/var/storage %attr(0770,apache,apache) %dir %{ezroot}/var/cache # configuration files %attr(0666,apache,apache) %ghost %config(noreplace) %{ezroot}/settings/override/i18n.ini.append.php %attr(0666,apache,apache) %ghost %config(noreplace) %{ezroot}/settings/override/image.ini.append.php %attr(0666,apache,apache) %ghost %config(noreplace) %{ezroot}/settings/override/setup.ini.append.php %attr(0666,apache,apache) %ghost %config(noreplace) %{ezroot}/settings/override/site.ini.append.php %attr(0666,root,root) %config(noreplace) %{ezroot}/settings/siteaccess/admin/*.append* %attr(0666,root,root) %config(noreplace) %{ezroot}/settings/*.ini %if %{build_ezlupdate} %attr(0755,root,root) %{_bindir}/ezlupdate %endif %changelog * Tue Sep 18 2007 Guillaume Rousse <guillomovitch@mandriva.org> 3.9.3-2mdv2008.0 + Revision: 89639 - rebuild * Fri Aug 24 2007 Oden Eriksson <oeriksson@mandriva.com> 3.9.3-1mdv2008.0 + Revision: 70853 - 3.9.3 (Major security fixes) * Mon Jun 25 2007 Oden Eriksson <oeriksson@mandriva.com> 3.9.2-1mdv2008.0 + Revision: 43806 - 3.9.2 - rediffed P0 - bunzipped the sources - fix deps * Wed May 09 2007 Oden Eriksson <oeriksson@mandriva.com> 3.7.5-1mdv2008.0 + Revision: 25431 - Import ezpublish * Tue Apr 04 2006 Oden Eriksson <oeriksson@mandriva.com> 3.7.5-1mdk - 3.7.5 (Minor feature enhancements) * Mon Mar 13 2006 Oden Eriksson <oeriksson@mandriva.com> 3.7.4-1mdk - 3.7.4 - fix the apache config * Wed Jan 18 2006 Oden Eriksson <oeriksson@mandriva.com> 3.7.3-1mdk - 3.7.3 * Tue Nov 08 2005 Oden Eriksson <oeriksson@mandriva.com> 3.7.2-1mdk - 3.7.2 - fix deps - fix path to php4-cli - adjust the kickstart file * Sun Jun 12 2005 Oden Eriksson <oeriksson@mandriva.com> 3.6.0-3mdk - fix a silly deps typo :) * Sun Jun 12 2005 Oden Eriksson <oeriksson@mandriva.com> 3.6.0-2mdk - fix deps and changed file locations * Mon May 30 2005 Oden Eriksson <oeriksson@mandriva.com> 3.6.0-1mdk - 3.6.0 - sync S1 * Sun May 15 2005 Oden Eriksson <oeriksson@mandriva.com> 3.5.2-2mdk - use better anti ^M stripper * Tue Apr 26 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 3.5.2-1mdk - 3.5.2 (major bug fixes) * Tue Mar 01 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 3.5.1-1mdk - 3.5.1 - strip away annoying ^M - restart apache * Thu Jan 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 3.5.0-6mdk - fixed the %%postun script again * Tue Jan 18 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 3.5.0-5mdk - fixed the %%postun script * Sun Jan 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 3.5.0-4mdk - make an possible uninstall of an configured ezpublish system followed by a new install smoother * Mon Jan 10 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 3.5.0-3mdk - added the kickstart.ini file (S3) * Thu Jan 06 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 3.5.0-2mdk - added missing files - added missing directories and set less restrictive permissions - added P0 to get pass some redundant checks * Wed Dec 22 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.5.0-1mdk - 3.5.0 * Tue Nov 09 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.4.4-1mdk - 3.4.4 * Tue Nov 02 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.4.3-1mdk - 3.4.3 - added forgotten stuff * Tue Oct 26 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.4.2-1mdk - 3.4.2 - misc spec file fixes * Tue Jul 13 2004 Michael Scherer <misc@mandrake.org> 3.2-2mdk - remove useless Provides, and Requires - use the new urpmi display system instead of a %%post - move the config file to the new location * Tue Nov 11 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2-1mdk - 3.2-3 - fixed an annoying and stupid bug in S1 - added a note in %%post * Wed Sep 17 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2-1mdk - 3.2 - sdk and var.tgz was removed... - misc spec file fixes * Fri Jun 27 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.1-2mdk - fix requires * Thu Jun 26 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.1-1mdk - initial cooker contrib