]> git.pld-linux.org Git - projects/template-specs.git/blame - horde.spec
- unify
[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
eeb8a3ce 40%define _noautoreq 'pear(Horde.*)'
02bce657 41
29fed2f2 42%define hordedir /usr/share/horde
29fed2f2 43%define _appdir %{hordedir}/%{_hordeapp}
5f6950b4
ER
44%define _webapps /etc/webapps
45%define _webapp horde-%{_hordeapp}
46%define _sysconfdir %{_webapps}/%{_webapp}
02bce657
ER
47
48# GET DESCRIPTION FROM PROJECT URL
49%description
50SKELETON
51
52The Horde Project writes web applications in PHP and releases them
53under the GNU Public License. For more information (including help
54with Skeleton) please visit <http://www.horde.org/>.
55
9be49f18 56%description -l pl.UTF-8
f01e19b1
JB
57SKELETON
58
59Projekt Horde tworzy aplikacje WWW w PHP i wydaje je na licencji GNU
9be49f18
JR
60General Public License. Więcej informacji (włącznie z pomocą dla
61Skeleton) można znaleźć na stronie <http://www.horde.org/>.
f01e19b1 62
02bce657 63%prep
38b60316 64%setup -qcT -n %{?_snap:%{_hordeapp}-%{_snap}}%{!?_snap:%{_hordeapp}-%{version}%{?_rc:-%{_rc}}}
29fed2f2 65tar zxf %{SOURCE0} --strip-components=1
02bce657 66
c3ce0920 67rm {,*/}.htaccess
2b86993c
ER
68for i in config/*.dist; do
69 mv $i config/$(basename $i .dist)
70done
02bce657 71# considered harmful (horde/docs/SECURITY)
c3ce0920 72rm test.php
02bce657
ER
73
74%install
75rm -rf $RPM_BUILD_ROOT
2b86993c 76install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/docs}
02bce657 77
2b86993c
ER
78cp -a *.php $RPM_BUILD_ROOT%{_appdir}
79cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
80echo '<?php ?>' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.php
81touch $RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
82cp -a lib locale templates themes $RPM_BUILD_ROOT%{_appdir}
8dcd635c 83cp -a docs/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
02bce657 84
5f6950b4 85ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
8bc565a0
ER
86install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
87install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
02bce657
ER
88
89%clean
90rm -rf $RPM_BUILD_ROOT
91
92%post
5f6950b4
ER
93if [ ! -f %{_sysconfdir}/conf.php.bak ]; then
94 install /dev/null -o root -g http -m660 %{_sysconfdir}/conf.php.bak
02bce657
ER
95fi
96
97# CHECK FIRST DOES IT HAVE SQL AND FILE THERE.
98if [ "$1" = 1 ]; then
99%banner %{name} -e <<-EOF
100 IMPORTANT:
101 If you are installing Skeleton for the first time, You may need to
102 create the Skeleton database tables. To do so run:
ab8465a6 103 zcat %{_docdir}/%{name}-%{version}/scripts/sql/%{_hordeapp}.sql.gz | mysql horde
02bce657
ER
104EOF
105fi
106
2b76dd46 107%triggerin -- apache1 < 1.3.37-3, apache1-base
5f6950b4 108%webapp_register apache %{_webapp}
02bce657 109
2b76dd46 110%triggerun -- apache1 < 1.3.37-3, apache1-base
5f6950b4 111%webapp_unregister apache %{_webapp}
02bce657 112
0da251d1 113%triggerin -- apache < 2.2.0, apache-base
5f6950b4 114%webapp_register httpd %{_webapp}
02bce657 115
0da251d1 116%triggerun -- apache < 2.2.0, apache-base
5f6950b4 117%webapp_unregister httpd %{_webapp}
02bce657 118
02bce657
ER
119%files
120%defattr(644,root,root,755)
121%doc README docs/* scripts
5f6950b4 122%dir %attr(750,root,http) %{_sysconfdir}
8bc565a0
ER
123%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
124%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
5f6950b4
ER
125%attr(660,root,http) %config(noreplace) %{_sysconfdir}/conf.php
126%attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/conf.php.bak
127%attr(640,root,http) %config(noreplace) %{_sysconfdir}/[!c]*.php
128%attr(640,root,http) %{_sysconfdir}/conf.xml
02bce657
ER
129
130%dir %{_appdir}
131%{_appdir}/*.php
132%{_appdir}/config
133%{_appdir}/docs
134%{_appdir}/lib
135%{_appdir}/locale
136%{_appdir}/templates
137%{_appdir}/themes
This page took 0.132747 seconds and 4 git commands to generate.