/[packages]/cauldron/php-teng/current/SPECS/php-teng.spec
ViewVC logotype

Contents of /cauldron/php-teng/current/SPECS/php-teng.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 44530 - (show annotations) (download)
Sat Jan 29 23:33:51 2011 UTC (13 years, 2 months ago) by spuhler
File size: 1720 byte(s)
imported package php-teng
1 %define snap 20071129
2
3 %define realname Teng
4 %define modname teng
5 %define dirname %{modname}
6 %define soname %{modname}.so
7 %define inifile 22_%{modname}.ini
8
9 Summary: General purpose templating engine for PHP
10 Name: php-%{modname}
11 Version: 2.0.0
12 Release: %mkrel 0.%{snap}.17
13 Group: Development/PHP
14 License: LGPL
15 URL: http://teng.sourceforge.net/
16 Source0: php4.tar.gz
17 BuildRequires: php-devel >= 3:5.2.0
18 BuildRequires: libteng-devel
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
20
21 %description
22 Teng is a general purpose templating engine (whence Teng), this package
23 add Teng support to PHP.
24
25 %prep
26
27 %setup -q -n php4
28
29 %build
30 %serverbuild
31
32 phpize
33 %configure2_5x --with-libdir=%{_lib} \
34 --with-%{modname}=%{_prefix}
35
36 %make
37 mv modules/*.so .
38 chrpath -d %{soname}
39
40 %install
41 rm -rf %{buildroot}
42
43 install -d %{buildroot}%{_libdir}/php/extensions
44 install -d %{buildroot}%{_sysconfdir}/php.d
45
46 install -m755 %{soname} %{buildroot}%{_libdir}/php/extensions/
47
48 cat > README.%{modname} << EOF
49 The %{name} package contains a dynamic shared object (DSO) for PHP.
50 To activate it, make sure a file /etc/php.d/%{inifile} is present and
51 contains the line 'extension = %{soname}'.
52 EOF
53
54 cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF
55 extension = %{soname}
56 EOF
57
58 %post
59 if [ -f /var/lock/subsys/httpd ]; then
60 %{_initrddir}/httpd restart >/dev/null || :
61 fi
62
63 %postun
64 if [ "$1" = "0" ]; then
65 if [ -f /var/lock/subsys/httpd ]; then
66 %{_initrddir}/httpd restart >/dev/null || :
67 fi
68 fi
69
70 %clean
71 rm -rf %{buildroot}
72
73 %files
74 %defattr(-,root,root)
75 %doc CREDITS README.%{modname}
76 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile}
77 %attr(0755,root,root) %{_libdir}/php/extensions/%{soname}
78
79

  ViewVC Help
Powered by ViewVC 1.1.30