]> git.pld-linux.org Git - projects/template-specs.git/blame - horde.spec
- add source0-md5
[projects/template-specs.git] / horde.spec
CommitLineData
02bce657
ER
1#define _rc rc1
2%define _snap 2005-08-01
eeb8a3ce 3%define _rel 1
02bce657
ER
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
eeb8a3ce 20# Source0-md5: -
02bce657
ER
21# COPY IN SOURCES ../SOURCES/ingo.conf AS SOURCE1 HERE:
22# cp ../SOURCES/{ingo,skeleton}.conf
23# DON'T FORGET TO :%s#ingo#skeleton#g in that file
24Source1: %{name}.conf
25URL: http://www.horde.org/skeleton/
26BuildRequires: rpmbuild(macros) >= 1.226
27Requires: apache >= 1.3.33-2
28Requires: apache(mod_access)
29Requires: horde >= 3.0
30BuildArch: noarch
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33# horde accesses it directly in help->about
34%define _noautocompressdoc CREDITS
eeb8a3ce 35%define _noautoreq 'pear(Horde.*)'
02bce657
ER
36
37%define hordedir /usr/share/horde
38%define _sysconfdir /etc/horde.org
39%define _appdir %{hordedir}/%{name}
40
41# GET DESCRIPTION FROM PROJECT URL
42%description
43SKELETON
44
45The Horde Project writes web applications in PHP and releases them
46under the GNU Public License. For more information (including help
47with Skeleton) please visit <http://www.horde.org/>.
48
49%prep
50%setup -q -n %{?_snap:%{name}}%{!?_snap:%{name}-h3-%{version}%{?_rc:-%{_rc}}}
51
52# considered harmful (horde/docs/SECURITY)
53rm -f test.php
54
55%install
56rm -rf $RPM_BUILD_ROOT
57install -d $RPM_BUILD_ROOT{/etc/cron.daily,%{_sysconfdir}/%{name}} \
58 $RPM_BUILD_ROOT%{_appdir}/{docs,lib,locale,scripts,templates,themes}
59
60cp -pR *.php $RPM_BUILD_ROOT%{_appdir}
61for i in config/*.dist; do
62 cp -p $i $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$(basename $i .dist)
63done
64echo "<?php ?>" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.php
65cp -p config/*.xml $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
66> $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.php.bak
67
68cp -pR lib/* $RPM_BUILD_ROOT%{_appdir}/lib
69cp -pR locale/* $RPM_BUILD_ROOT%{_appdir}/locale
70cp -pR templates/* $RPM_BUILD_ROOT%{_appdir}/templates
71cp -pR themes/* $RPM_BUILD_ROOT%{_appdir}/themes
72
73ln -s %{_sysconfdir}/%{name} $RPM_BUILD_ROOT%{_appdir}/config
74ln -s %{_defaultdocdir}/%{name}-%{version}/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
75
76install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
77
78%clean
79rm -rf $RPM_BUILD_ROOT
80
81%post
82if [ ! -f %{_sysconfdir}/%{name}/conf.php.bak ]; then
83 install /dev/null -o root -g http -m660 %{_sysconfdir}/%{name}/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/%{name}.sql.gz | mysql horde
93EOF
94fi
95
96%triggerin -- apache1 >= 1.3.33-2
97%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
98
99%triggerun -- apache1 >= 1.3.33-2
100%apache_config_uninstall -v 1
101
102%triggerin -- apache >= 2.0.0
103%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
104
105%triggerun -- apache >= 2.0.0
106%apache_config_uninstall -v 2
107
02bce657
ER
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.118483 seconds and 4 git commands to generate.