Logoj0ke.net Open Build Service > Projects > server:php:applications > php5-pear-image_graphviz > php5-pear-image_graphviz.spec
Sign Up | Log In

File php5-pear-image_graphviz.spec of Package php5-pear-image_graphviz

 
1
#norootforbuild
2
3
#
4
# spec file for package Image_GraphViz (Version 1.2.1)
5
#
6
# Copyright (c) 2007 SuSE Linux AG, Nuernberg, Germany.
7
# This file and all modifications and additions to the pristine
8
# package are under the same license as the package itself.
9
#
10
# Please submit bug fixes or comments via http://bugs.opensuse.org/
11
#
12
13
%define peardir %(pear config-get php_dir 2> /dev/null)
14
%define xmldir  /var/lib/pear
15
16
Summary: Interface to AT&T's GraphViz tools
17
Name: php5-pear-image_graphviz
18
Version: 1.2.1
19
Release: 1
20
License: PHP License
21
Group: Development/Libraries/Other
22
Source0: http://pear.php.net/get/Image_GraphViz-%{version}.tgz
23
BuildRoot: %{_tmppath}/%{name}-%{version}-build
24
URL: http://pear.php.net/package/Image_GraphViz
25
BuildRequires: php5-pear
26
PreReq: php5-pear
27
Requires: graphviz
28
BuildArch: noarch
29
30
%description
31
The GraphViz class allows for the creation of and the work with directed
32
and undirected graphs and their visualization with AT&T's GraphViz tools.
33
 
34
35
36
%prep
37
38
%setup -c -T
39
40
pear -v -c pearrc \
41
        -d php_dir=%{peardir} \
42
        -d doc_dir=/docs \
43
        -d bin_dir=%{_bindir} \
44
        -d data_dir=%{peardir}/data \
45
        -d test_dir=%{peardir}/tests \
46
        -d ext_dir=%{_libdir} \
47
        -s
48
49
%build
50
51
%install
52
53
pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0}
54
        
55
# Clean up unnecessary files
56
rm pearrc
57
rm %{buildroot}/%{peardir}/.filemap
58
rm %{buildroot}/%{peardir}/.lock
59
rm -rf %{buildroot}/%{peardir}/.registry
60
rm -rf %{buildroot}%{peardir}/.channels
61
rm %{buildroot}%{peardir}/.depdb
62
rm %{buildroot}%{peardir}/.depdblock
63
64
65
66
# Install XML package description
67
mkdir -p %{buildroot}%{xmldir}
68
tar -xzf %{SOURCE0} package.xml
69
cp -p package.xml %{buildroot}%{xmldir}/Image_GraphViz.xml
70
71
%clean
72
73
rm -rf %{buildroot}
74
75
%post
76
77
pear install --nodeps --soft --force --register-only %{xmldir}/Image_GraphViz.xml
78
79
%postun
80
81
if [ "$1" -eq "0" ]; then
82
    pear uninstall --nodeps --ignore-errors --register-only pear.php.net/Image_GraphViz
83
fi
84
85
%files
86
87
%defattr(-,root,root)
88
89
%{peardir}/*
90
%{xmldir}/Image_GraphViz.xml
91