File midgard-php4.spec of Package midgard-php4
Name: midgard-php4
Version: 1.8.9.1
Release: 15.1
Summary: Midgard PHP4 module
Packager: %{packager}
License: LGPL
Group: Networking/Daemons
URL: http://www.midgard-project.org/
Source: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: php-devel >= 4.3.2
BuildRequires: midgard-core-devel >= 1.8.9
BuildRequires: glib2-devel >= 2.4.7
BuildRequires: libxml2-devel >= 2.4.7
Requires: midgard-core >= 1.8.9
Requires: midgard-apache2 >= 1.8.9
Requires: php >= 4.3.2
#
# NOTE: Apache2 is packaged differently in SUSE and RedHat.
# SUSE packages is as "apache2".
# RedHat packages is as "httpd".
#
%if 0%{?suse_version}
BuildRequires: apache2-devel >= 2.0.46
Requires: apache2 >= 2.0.46
%define my_apxs %{_sbindir}/apxs2
%else
BuildRequires: httpd-devel >= 2.0.46
Requires: httpd >= 2.0.46
%define my_apxs %{_sbindir}/apxs
%endif
#
# NOTE: MySQL is packaged differently in SUSE and RedHat.
# SUSE packages the server as "mysql" and the client as "mysql-client".
# RedHat packages the server as "mysql-server" and the client as "mysql".
#
%if 0%{?suse_version}
BuildRequires: libmysqlclient-devel >= 3.23.58
%else
BuildRequires: mysql-devel >= 3.23.58
%endif
#
# NOTE: PHP paths are different in SUSE and RedHat.
# SUSE uses version dependent paths.
# RedHat uses generic directory names.
#
%if 0%{?suse_version}
%define php_confdir php5/conf.d
%else
%define php_confdir php.d
%endif
%define php_extdir %(php-config --extension-dir 2>/dev/null)
%prep
%setup -n %{name}-%{version}
%description
Midgard PHP4 is part of the Midgard Framework, a free platform for
web application development, providing the glue between the popular
LAMP components, giving you the freedom to create your solutions in an
open environment.
Midgard PHP4 contains the Midgard module, providing full access to all
Midgard objects and resources using the PHP4 scripting language.
%build
export PATH=$PATH:%{_sbindir}
[ -f Makefile ] && make distclean
phpize
CFLAGS="$RPM_OPT_FLAGS" ./configure \
--with-apxs=%{my_apxs} \
--with-apr-config=no
%{__make}
%install
[ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
%{__mkdir_p} $RPM_BUILD_ROOT%{php_extdir}
%{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/%{php_confdir}
%{__install} -m 755 .libs/midgard.so $RPM_BUILD_ROOT%{php_extdir}/midgard.so
%{__install} -m 644 midgard.ini $RPM_BUILD_ROOT%{_sysconfdir}/%{php_confdir}
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%post
# Maybe we need to restart httpd
if [ -f /var/lock/subsys/httpd ]; then
/etc/init.d/httpd restart > /dev/null 2>&1 || :
fi
%postun
# Maybe we need to restart httpd
if [ -f /var/lock/subsys/httpd ]; then
/etc/init.d/httpd restart > /dev/null 2>&1 || :
fi
%files
%defattr(-,root,root)
%{php_extdir}/midgard.so
%config(noreplace) %{_sysconfdir}/%{php_confdir}/midgard.ini
%changelog
* Fri Oct 30 2009 Jarkko Ala-Louvesniemi <jval@puv.fi> 1.8.9.1-15.1
- Fixed install paths for SUSE
- Marked midgard.ini as a configuration file
* Wed Sep 16 2009 Jarkko Ala-Louvesniemi <jval@puv.fi> 1.8.9.1-10.1
- Added defattr to filelist
- Fixed other Midgard package requirements by hard coding them to 1.8.9
* Tue Aug 19 2008 Piotr Pokora <piotrek.pokora@gmail.com> 1.8.9-1.ent
- The SPEC is now CentOS 5.2 compatible
* Thu Jul 03 2008 Emmanuel Rodriguez <emmanuel.rodriguez@gmail.com> 1.8.8-1.ent
- The SPEC is now CentOS 5.2 compatible
* Wed Aug 04 2004 Daniel S. Reichenbach <dsr@best-off.org> 1.6.0-5
- rebuilt
- note: php-4.3.x.sc.rpm has to be rebuilt without system regex.
edit php.spec and remove the line --with-regex=system. Otherwise
midgard php will not compile.
* Wed Jun 30 2004 Daniel S. Reichenbach <dsr@best-off.org> 1.6.0-4
- Fix requirements
* Mon May 10 2004 Daniel S. Reichenbach <dsr@best-off.org> 1.6.0-3
- More SPEC cleaning
- Explicitly name every included file
* Sat Apr 24 2004 Daniel S. Reichenbach <dsr@best-off.org> 1.6.0-2
- Build requires midgard-core-devel package
* Thu Apr 15 2004 Daniel S. Reichenbach <dsr@best-off.org> 1.6.0-2
- Require midgard-core instead of midgard-lib
- Use available RPM macros
* Sun Mar 07 2004 Daniel S. Reichenbach <dsr@best-off.org> 1.6.0-1
- Rebuild for 1.6.0-CVS
- Upgraded to Apache 2
* Tue Jul 01 2003 Anders Karlsson <anders@noddle.net>
- Upgraded to php-4.3.2 and RHL 9
* Sun Jan 5 2003 Anders Karlsson <anders@noddle.net>
- Initial release