]> git.pld-linux.org Git - projects/template-specs.git/blob - horde.spec
- pl desc skeleton
[projects/template-specs.git] / horde.spec
1 #define _rc             rc1
2 %define _snap   2005-08-01
3 %define _rel    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
11 Summary:        Template for horde projects
12 Name:           skeleton
13 Version:        0.1
14 Release:        %{?_rc:%{_rc}.}%{?_snap:0.%(echo %{_snap} | tr -d -).}%{_rel}
15 License:        GPL v2 (CHECK IT FIRST)
16 Group:          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 # Source0-md5:  -
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
24 Source1:        %{name}.conf
25 URL:            http://www.horde.org/skeleton/
26 BuildRequires:  rpmbuild(macros) >= 1.226
27 Requires:       apache >= 1.3.33-2
28 Requires:       apache(mod_access)
29 Requires:       horde >= 3.0
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 # horde accesses it directly in help->about
34 %define         _noautocompressdoc  CREDITS
35 %define         _noautoreq      'pear(Horde.*)'
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
43 SKELETON
44
45 The Horde Project writes web applications in PHP and releases them
46 under the GNU Public License. For more information (including help
47 with Skeleton) please visit <http://www.horde.org/>.
48
49 %description -l pl
50 SKELETON
51
52 Projekt Horde tworzy aplikacje WWW w PHP i wydaje je na licencji GNU
53 General Public License. Wiêcej informacji (w³±cznie z pomoc± dla
54 Skeleton) mo¿na znale¼æ na stronie <http://www.horde.org/>.
55
56 %prep
57 %setup -q -n %{?_snap:%{name}}%{!?_snap:%{name}-h3-%{version}%{?_rc:-%{_rc}}}
58
59 # considered harmful (horde/docs/SECURITY)
60 rm -f test.php
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64 install -d $RPM_BUILD_ROOT{/etc/cron.daily,%{_sysconfdir}/%{name}} \
65         $RPM_BUILD_ROOT%{_appdir}/{docs,lib,locale,scripts,templates,themes}
66
67 cp -pR  *.php                   $RPM_BUILD_ROOT%{_appdir}
68 for i in config/*.dist; do
69         cp -p $i $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$(basename $i .dist)
70 done
71 echo "<?php ?>" >               $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.php
72 cp -p  config/*.xml            $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
73 > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.php.bak
74
75 cp -pR  lib/*                   $RPM_BUILD_ROOT%{_appdir}/lib
76 cp -pR  locale/*                $RPM_BUILD_ROOT%{_appdir}/locale
77 cp -pR  templates/*             $RPM_BUILD_ROOT%{_appdir}/templates
78 cp -pR  themes/*                $RPM_BUILD_ROOT%{_appdir}/themes
79
80 ln -s %{_sysconfdir}/%{name}    $RPM_BUILD_ROOT%{_appdir}/config
81 ln -s %{_defaultdocdir}/%{name}-%{version}/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
82
83 install %{SOURCE1}              $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %post
89 if [ ! -f %{_sysconfdir}/%{name}/conf.php.bak ]; then
90         install /dev/null -o root -g http -m660 %{_sysconfdir}/%{name}/conf.php.bak
91 fi
92
93 # CHECK FIRST DOES IT HAVE SQL AND FILE THERE.
94 if [ "$1" = 1 ]; then
95 %banner %{name} -e <<-EOF
96         IMPORTANT:
97         If you are installing Skeleton for the first time, You may need to
98         create the Skeleton database tables. To do so run:
99         zcat %{_docdir}/%{name}-%{version}/scripts/sql/%{name}.sql.gz | mysql horde
100 EOF
101 fi
102
103 %triggerin -- apache1 >= 1.3.33-2
104 %apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
105
106 %triggerun -- apache1 >= 1.3.33-2
107 %apache_config_uninstall -v 1
108
109 %triggerin -- apache >= 2.0.0
110 %apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
111
112 %triggerun -- apache >= 2.0.0
113 %apache_config_uninstall -v 2
114
115 %files
116 %defattr(644,root,root,755)
117 %doc README docs/* scripts
118 %attr(750,root,http) %dir %{_sysconfdir}/%{name}
119 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/apache-%{name}.conf
120 %attr(660,root,http) %config(noreplace) %{_sysconfdir}/%{name}/conf.php
121 %attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/%{name}/conf.php.bak
122 %attr(640,root,http) %config(noreplace) %{_sysconfdir}/%{name}/[!c]*.php
123 %attr(640,root,http) %{_sysconfdir}/%{name}/*.xml
124
125 %dir %{_appdir}
126 %{_appdir}/*.php
127 %{_appdir}/config
128 %{_appdir}/docs
129 %{_appdir}/lib
130 %{_appdir}/locale
131 %{_appdir}/templates
132 %{_appdir}/themes
This page took 0.037291 seconds and 4 git commands to generate.