]> git.pld-linux.org Git - packages/php-dbus.git/blob - php-dbus.spec
6b3590a8882e4cfbb365f7796bc7b421b84137e7
[packages/php-dbus.git] / php-dbus.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define         php_name        php%{?php_suffix}
6 %define         modname dbus
7 Summary:        DBus binding for PHP
8 Name:           %{php_name}-%{modname}
9 Version:        0.1.2
10 Release:        2
11 License:        PHP 3.0
12 Group:          Development/Languages/PHP
13 Source0:        http://labs.gree.jp/data/source/php-dbus-%{version}.tgz
14 # Source0-md5:  2fc2b92ac805128326ecfa382f6807ab
15 URL:            http://labs.gree.jp/Top/OpenSource/DBus-en.html
16 BuildRequires:  %{php_name}-devel >= 4:5.0.4
17 BuildRequires:  dbus-devel
18 BuildRequires:  pkgconfig
19 BuildRequires:  rpmbuild(macros) >= 1.519
20 %{?requires_php_extension}
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 PHP Dbus is a PHP extension to handle D-Bus functions. This module
25 provides D-Bus interfaces via PHP classes and enables Inter Porcess
26 Communication in D-Bus.
27
28 %prep
29 %setup -q -n php-%{modname}-%{version}
30
31 %build
32 phpize
33 CPPFLAGS="%{rpmcppflags} -DDBUS_API_SUBJECT_TO_CHANGE"
34 %configure
35 %{__make}
36
37 %install
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
40
41 %{__make} install \
42         INSTALL_ROOT=$RPM_BUILD_ROOT \
43         EXTENSION_DIR=%{php_extensiondir}
44 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
45 ; Enable %{modname} extension module
46 extension=%{modname}.so
47 EOF
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %post
53 %php_webserver_restart
54
55 %postun
56 if [ "$1" = 0 ]; then
57         %php_webserver_restart
58 fi
59
60 %files
61 %defattr(644,root,root,755)
62 %doc CREDITS
63 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
64 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.046256 seconds and 2 git commands to generate.