]> git.pld-linux.org Git - projects/template-specs.git/blob - horde.spec
pecl: add example how to make failed tests as XFAIL
[projects/template-specs.git] / horde.spec
1 # TODO
2 # - lighttpd support
3
4 # REPLACE words 'SKELETON', 'Skeleton', 'skeleton' with your application
5 # GET THE Summary from here: http://www.horde.org/source/modules.php
6 # FIND .htaccess FILES AND MAKE SURE APACHE CONF DISABLES ACCESS TO
7 # THOSE DIRS: find -name '.??*' IS EASY TO LOCATE.
8
9 %define         hordeapp        skeleton
10 %include        /usr/lib/rpm/macros.php
11 Summary:        Template for horde projects
12 Name:           horde-%{hordeapp}
13 Version:        0.1
14 Release:        0.1
15 License:        GPL v2 (CHECK IT FIRST, could be ASL)
16 Group:          Applications/WWW
17 Source0:        ftp://ftp.horde.org/pub/skeleton/%{hordeapp}-h3-%{version}.tar.gz
18 # Source0-md5:  -
19 Source1:        apache.conf
20 Patch0:         prefs.patch
21 URL:            http://www.horde.org/skeleton/
22 BuildRequires:  rpm-php-pearprov >= 4.0.2-98
23 BuildRequires:  rpmbuild(macros) >= 1.264
24 Requires:       horde >= 3.0
25 Requires:       webapps
26 Requires:       webserver(access)
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         hordedir        /usr/share/horde
31 %define         _appdir         %{hordedir}/%{hordeapp}
32 %define         _webapps        /etc/webapps
33 %define         _webapp         horde-%{hordeapp}
34 %define         _sysconfdir     %{_webapps}/%{_webapp}
35
36 %define         _noautoreq      pear(Horde.*)
37
38 # GET DESCRIPTION FROM PROJECT URL
39 %description
40 SKELETON
41
42 The Horde Project writes web applications in PHP and releases them
43 under the GNU Public License. For more information (including help
44 with Skeleton) please visit <http://www.horde.org/>.
45
46 %description -l pl.UTF-8
47 SKELETON
48
49 Projekt Horde tworzy aplikacje WWW w PHP i wydaje je na licencji GNU
50 General Public License. Więcej informacji (włącznie z pomocą dla
51 Skeleton) można znaleźć na stronie <http://www.horde.org/>.
52
53 %prep
54 %setup -q -n %{hordeapp}-h3-%{version}
55 %patch0 -p1
56
57 rm {,*/}.htaccess
58 for i in config/*.dist; do
59         mv $i config/$(basename $i .dist)
60 done
61 # considered harmful (horde/docs/SECURITY)
62 rm test.php
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/docs}
67
68 cp -a *.php $RPM_BUILD_ROOT%{_appdir}
69 cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
70 echo '<?php ?>' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.php
71 touch $RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
72 cp -a lib locale templates themes $RPM_BUILD_ROOT%{_appdir}
73 cp -a docs/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
74
75 ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
76 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
77 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %post
83 if [ ! -f %{_sysconfdir}/conf.php.bak ]; then
84         install /dev/null -o root -g http -m 0660 %{_sysconfdir}/conf.php.bak
85 fi
86
87 # CHECK FIRST DOES IT HAVE SQL AND FILE THERE.
88 if [ "$1" = 1 ]; then
89         %banner %{name} -e <<-EOF
90         IMPORTANT:
91         If you are installing Skeleton for the first time, You may need to
92         create the Skeleton database tables. To do so run:
93         zcat %{_docdir}/%{name}-%{version}/scripts/sql/%{hordeapp}.sql.gz | mysql horde
94         EOF
95 fi
96
97 %triggerin -- apache1 < 1.3.37-3, apache1-base
98 %webapp_register apache %{_webapp}
99
100 %triggerun -- apache1 < 1.3.37-3, apache1-base
101 %webapp_unregister apache %{_webapp}
102
103 %triggerin -- apache < 2.2.0, apache-base
104 %webapp_register httpd %{_webapp}
105
106 %triggerun -- apache < 2.2.0, apache-base
107 %webapp_unregister httpd %{_webapp}
108
109 %files
110 %defattr(644,root,root,755)
111 %doc README docs/* scripts
112 %dir %attr(750,root,http) %{_sysconfdir}
113 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
114 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
115 %attr(660,root,http) %config(noreplace) %{_sysconfdir}/conf.php
116 %attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/conf.php.bak
117 %attr(640,root,http) %config(noreplace) %{_sysconfdir}/[!c]*.php
118 %attr(640,root,http) %{_sysconfdir}/conf.xml
119
120 %dir %{_appdir}
121 %{_appdir}/*.php
122 %{_appdir}/config
123 %{_appdir}/docs
124 %{_appdir}/lib
125 %{_appdir}/locale
126 %{_appdir}/templates
127 %{_appdir}/themes
This page took 0.041349 seconds and 3 git commands to generate.