]> git.pld-linux.org Git - projects/template-specs.git/commitdiff
- template for horde projects
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 1 Aug 2005 22:58:56 +0000 (22:58 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    horde.spec -> 1.1

horde.spec [new file with mode: 0644]

diff --git a/horde.spec b/horde.spec
new file mode 100644 (file)
index 0000000..bfc47e3
--- /dev/null
@@ -0,0 +1,125 @@
+#define        _rc             rc1
+%define        _snap   2005-08-01
+%define        _rel    0.1
+
+# REPLACE words 'SKELETON', 'Skeleton', 'skeleton' with your application
+# GET THE Summary from here: http://www.horde.org/source/modules.php
+# FIND .htaccess FILES AND MAKE SURE APACHE CONF DISABLES ACCESS TO
+# THOSE DIRS: find -name '.??*' IS EASY TO LOCATE.
+
+%include       /usr/lib/rpm/macros.php
+Summary:       Template for horde projects
+Name:          skeleton
+Version:       0.1
+Release:       %{?_rc:%{_rc}.}%{?_snap:0.%(echo %{_snap} | tr -d -).}%{_rel}
+License:       GPL v2 (CHECK IT FIRST)
+Group:         Applications/WWW
+#Source0:      ftp://ftp.horde.org/pub/skeleton/%{name}-h3-%{version}.tar.gz
+#Source0:      ftp://ftp.horde.org/pub/skeleton/%{name}-h3-%{version}-%{_rc}.tar.gz
+#Source0:      ftp://ftp.horde.org/pub/snaps/%{_snap}/%{name}-HEAD-%{_snap}.tar.gz
+# COPY IN SOURCES ../SOURCES/ingo.conf AS SOURCE1 HERE:
+# cp ../SOURCES/{ingo,skeleton}.conf
+# DON'T FORGET TO :%s#ingo#skeleton#g in that file
+Source1:       %{name}.conf
+URL:           http://www.horde.org/skeleton/
+BuildRequires: rpmbuild(macros) >= 1.226
+Requires:      apache >= 1.3.33-2
+Requires:      apache(mod_access)
+Requires:      horde >= 3.0
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+# horde accesses it directly in help->about
+%define                _noautocompressdoc  CREDITS
+%define                _noautoreq      'pear(Horde.*)' 'pear(Text/Flowed.php)'
+
+%define                hordedir                /usr/share/horde
+%define                _sysconfdir             /etc/horde.org
+%define                _appdir                 %{hordedir}/%{name}
+
+# GET DESCRIPTION FROM PROJECT URL
+%description
+SKELETON
+
+The Horde Project writes web applications in PHP and releases them
+under the GNU Public License. For more information (including help
+with Skeleton) please visit <http://www.horde.org/>.
+
+%prep
+%setup -q -n %{?_snap:%{name}}%{!?_snap:%{name}-h3-%{version}%{?_rc:-%{_rc}}}
+
+# considered harmful (horde/docs/SECURITY)
+rm -f test.php
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{/etc/cron.daily,%{_sysconfdir}/%{name}} \
+       $RPM_BUILD_ROOT%{_appdir}/{docs,lib,locale,scripts,templates,themes}
+
+cp -pR *.php                   $RPM_BUILD_ROOT%{_appdir}
+for i in config/*.dist; do
+       cp -p $i $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$(basename $i .dist)
+done
+echo "<?php ?>" >              $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.php
+cp -p  config/*.xml            $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+> $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.php.bak
+
+cp -pR lib/*                   $RPM_BUILD_ROOT%{_appdir}/lib
+cp -pR locale/*                $RPM_BUILD_ROOT%{_appdir}/locale
+cp -pR templates/*             $RPM_BUILD_ROOT%{_appdir}/templates
+cp -pR themes/*                $RPM_BUILD_ROOT%{_appdir}/themes
+
+ln -s %{_sysconfdir}/%{name}   $RPM_BUILD_ROOT%{_appdir}/config
+ln -s %{_defaultdocdir}/%{name}-%{version}/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
+
+install %{SOURCE1}             $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+if [ ! -f %{_sysconfdir}/%{name}/conf.php.bak ]; then
+       install /dev/null -o root -g http -m660 %{_sysconfdir}/%{name}/conf.php.bak
+fi
+
+# CHECK FIRST DOES IT HAVE SQL AND FILE THERE.
+if [ "$1" = 1 ]; then
+%banner %{name} -e <<-EOF
+       IMPORTANT:
+       If you are installing Skeleton for the first time, You may need to
+       create the Skeleton database tables. To do so run:
+       zcat %{_docdir}/%{name}-%{version}/scripts/sql/%{name}.sql.gz | mysql horde
+EOF
+fi
+
+%triggerin -- apache1 >= 1.3.33-2
+%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
+
+%triggerun -- apache1 >= 1.3.33-2
+%apache_config_uninstall -v 1
+
+%triggerin -- apache >= 2.0.0
+%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
+
+%triggerun -- apache >= 2.0.0
+%apache_config_uninstall -v 2
+
+
+%files
+%defattr(644,root,root,755)
+%doc README docs/* scripts
+%attr(750,root,http) %dir %{_sysconfdir}/%{name}
+%attr(640,root,root) %config(noreplace) %{_sysconfdir}/apache-%{name}.conf
+%attr(660,root,http) %config(noreplace) %{_sysconfdir}/%{name}/conf.php
+%attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/%{name}/conf.php.bak
+%attr(640,root,http) %config(noreplace) %{_sysconfdir}/%{name}/[!c]*.php
+%attr(640,root,http) %{_sysconfdir}/%{name}/*.xml
+
+%dir %{_appdir}
+%{_appdir}/*.php
+%{_appdir}/config
+%{_appdir}/docs
+%{_appdir}/lib
+%{_appdir}/locale
+%{_appdir}/templates
+%{_appdir}/themes
This page took 0.099511 seconds and 4 git commands to generate.