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