]> git.pld-linux.org Git - projects/template-specs.git/blame - horde.spec
- template for horde projects
[projects/template-specs.git] / horde.spec
CommitLineData
02bce657
ER
1#define _rc rc1
2%define _snap 2005-08-01
3%define _rel 0.1
4
5# REPLACE words 'SKELETON', 'Skeleton', 'skeleton' with your application
6# GET THE Summary from here: http://www.horde.org/source/modules.php
7# FIND .htaccess FILES AND MAKE SURE APACHE CONF DISABLES ACCESS TO
8# THOSE DIRS: find -name '.??*' IS EASY TO LOCATE.
9
10%include /usr/lib/rpm/macros.php
11Summary: Template for horde projects
12Name: skeleton
13Version: 0.1
14Release: %{?_rc:%{_rc}.}%{?_snap:0.%(echo %{_snap} | tr -d -).}%{_rel}
15License: GPL v2 (CHECK IT FIRST)
16Group: Applications/WWW
17#Source0: ftp://ftp.horde.org/pub/skeleton/%{name}-h3-%{version}.tar.gz
18#Source0: ftp://ftp.horde.org/pub/skeleton/%{name}-h3-%{version}-%{_rc}.tar.gz
19#Source0: ftp://ftp.horde.org/pub/snaps/%{_snap}/%{name}-HEAD-%{_snap}.tar.gz
20# COPY IN SOURCES ../SOURCES/ingo.conf AS SOURCE1 HERE:
21# cp ../SOURCES/{ingo,skeleton}.conf
22# DON'T FORGET TO :%s#ingo#skeleton#g in that file
23Source1: %{name}.conf
24URL: http://www.horde.org/skeleton/
25BuildRequires: rpmbuild(macros) >= 1.226
26Requires: apache >= 1.3.33-2
27Requires: apache(mod_access)
28Requires: horde >= 3.0
29BuildArch: noarch
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32# horde accesses it directly in help->about
33%define _noautocompressdoc CREDITS
34%define _noautoreq 'pear(Horde.*)' 'pear(Text/Flowed.php)'
35
36%define hordedir /usr/share/horde
37%define _sysconfdir /etc/horde.org
38%define _appdir %{hordedir}/%{name}
39
40# GET DESCRIPTION FROM PROJECT URL
41%description
42SKELETON
43
44The Horde Project writes web applications in PHP and releases them
45under the GNU Public License. For more information (including help
46with Skeleton) please visit <http://www.horde.org/>.
47
48%prep
49%setup -q -n %{?_snap:%{name}}%{!?_snap:%{name}-h3-%{version}%{?_rc:-%{_rc}}}
50
51# considered harmful (horde/docs/SECURITY)
52rm -f test.php
53
54%install
55rm -rf $RPM_BUILD_ROOT
56install -d $RPM_BUILD_ROOT{/etc/cron.daily,%{_sysconfdir}/%{name}} \
57 $RPM_BUILD_ROOT%{_appdir}/{docs,lib,locale,scripts,templates,themes}
58
59cp -pR *.php $RPM_BUILD_ROOT%{_appdir}
60for i in config/*.dist; do
61 cp -p $i $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$(basename $i .dist)
62done
63echo "<?php ?>" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.php
64cp -p config/*.xml $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
65> $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.php.bak
66
67cp -pR lib/* $RPM_BUILD_ROOT%{_appdir}/lib
68cp -pR locale/* $RPM_BUILD_ROOT%{_appdir}/locale
69cp -pR templates/* $RPM_BUILD_ROOT%{_appdir}/templates
70cp -pR themes/* $RPM_BUILD_ROOT%{_appdir}/themes
71
72ln -s %{_sysconfdir}/%{name} $RPM_BUILD_ROOT%{_appdir}/config
73ln -s %{_defaultdocdir}/%{name}-%{version}/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
74
75install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
76
77%clean
78rm -rf $RPM_BUILD_ROOT
79
80%post
81if [ ! -f %{_sysconfdir}/%{name}/conf.php.bak ]; then
82 install /dev/null -o root -g http -m660 %{_sysconfdir}/%{name}/conf.php.bak
83fi
84
85# CHECK FIRST DOES IT HAVE SQL AND FILE THERE.
86if [ "$1" = 1 ]; then
87%banner %{name} -e <<-EOF
88 IMPORTANT:
89 If you are installing Skeleton for the first time, You may need to
90 create the Skeleton database tables. To do so run:
91 zcat %{_docdir}/%{name}-%{version}/scripts/sql/%{name}.sql.gz | mysql horde
92EOF
93fi
94
95%triggerin -- apache1 >= 1.3.33-2
96%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
97
98%triggerun -- apache1 >= 1.3.33-2
99%apache_config_uninstall -v 1
100
101%triggerin -- apache >= 2.0.0
102%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
103
104%triggerun -- apache >= 2.0.0
105%apache_config_uninstall -v 2
106
107
108%files
109%defattr(644,root,root,755)
110%doc README docs/* scripts
111%attr(750,root,http) %dir %{_sysconfdir}/%{name}
112%attr(640,root,root) %config(noreplace) %{_sysconfdir}/apache-%{name}.conf
113%attr(660,root,http) %config(noreplace) %{_sysconfdir}/%{name}/conf.php
114%attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/%{name}/conf.php.bak
115%attr(640,root,http) %config(noreplace) %{_sysconfdir}/%{name}/[!c]*.php
116%attr(640,root,http) %{_sysconfdir}/%{name}/*.xml
117
118%dir %{_appdir}
119%{_appdir}/*.php
120%{_appdir}/config
121%{_appdir}/docs
122%{_appdir}/lib
123%{_appdir}/locale
124%{_appdir}/templates
125%{_appdir}/themes
This page took 0.054012 seconds and 4 git commands to generate.