Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > fd4cfea9e413562fd7456234a9e5d0e5 > files > 2

php-mcal-0.6-39.1.mga1.src.rpm

%define realname MCAL
%define modname mcal
%define dirname %{modname}
%define soname %{modname}.so
%define inifile 62_%{modname}.ini

Summary:	The %{realname} module for PHP
Name:		php-%{modname}
Version:	0.6
%define subrel 1
Release:	%mkrel 39
Group:		Development/PHP
License:	PHP License
URL:		http://www.php.net
Source0:	mcal-%{version}.tar.bz2
BuildRequires:  php-devel >= 3:5.2.0
BuildRequires:	libmcal-devel
Epoch:		1

%description
This is a dynamic shared object (DSO) that adds MCAL support to PHP.

MCAL stands for Modular Calendar Access Library.
 
Libmcal is a C library for accessing calendars. It's written to be very
modular, with pluggable drivers. MCAL is the calendar equivalent of the IMAP
module for mailboxes.
 
With mcal support, a calendar stream can be opened much like the mailbox stream
with the IMAP support. Calendars can be local file stores, remote ICAP servers,
or other formats that are supported by the mcal library.
 
Calendar events can be pulled up, queried, and stored. There is also support
for calendar triggers (alarms) and recurring events.
 
With libmcal, central calendar servers can be accessed, removing the need for
any specific database or local file programming. 

%prep

%setup -q -n mcal-%{version}

%build
%serverbuild

phpize
%configure2_5x --with-libdir=%{_lib} \
    --with-%{modname}=%{_prefix}

%make
mv modules/*.so .

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} 

install -d %{buildroot}%{_libdir}/php/extensions
install -d %{buildroot}%{_sysconfdir}/php.d

install -m755 %{soname} %{buildroot}%{_libdir}/php/extensions/

cat > README.%{modname} << EOF
The %{name} package contains a dynamic shared object (DSO) for PHP. 
To activate it, make sure a file /etc/php.d/%{inifile} is present and
contains the line 'extension = %{soname}'.
EOF

cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF
extension = %{soname}
EOF

%post
if [ -f /var/lock/subsys/httpd ]; then
    %{_initrddir}/httpd restart >/dev/null || :
fi

%postun
if [ "$1" = "0" ]; then
    if [ -f /var/lock/subsys/httpd ]; then
	%{_initrddir}/httpd restart >/dev/null || :
    fi
fi

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files 
%defattr(-,root,root)
%doc README*
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile}
%attr(0755,root,root) %{_libdir}/php/extensions/%{soname}




%changelog

* Sat Jan 21 2012 spuhler <spuhler> 1:0.6-39.1.mga1
+ Revision: 199297
- rebuild for php-devel-5.3.9

* Fri Feb 04 2011 alien <alien> 1:0.6-39.mga1
+ Revision: 46798
- Remove BuildRoot

  + spuhler <spuhler>
    - imported package php-mcal