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