X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=horde.spec;h=52e48a1200f4c833e5c00d0cec86926a1a657e88;hb=2f89de89a978d1a8bb6d369047a579ebda5e7854;hp=20e16fa415ebfbf92c09f09a2a02679c59540636;hpb=8bc565a0bfb061c3c7ffc89bfadc308a49668dbc;p=projects%2Ftemplate-specs.git diff --git a/horde.spec b/horde.spec index 20e16fa..52e48a1 100644 --- a/horde.spec +++ b/horde.spec @@ -1,53 +1,40 @@ # TODO # - lighttpd support -%define _hordeapp skeleton -#define _snap 2005-08-01 -#define _rc rc1 -%define _rel 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. +%define hordeapp skeleton %include /usr/lib/rpm/macros.php Summary: Template for horde projects -Name: horde-%{_hordeapp} +Name: horde-%{hordeapp} Version: 0.1 -Release: %{?_rc:0.%{_rc}.}%{?_snap:0.%(echo %{_snap} | tr -d -).}%{_rel} +Release: 0.1 License: GPL v2 (CHECK IT FIRST, could be ASL) Group: Applications/WWW -# due builder limitations can't have complrex macros in Source0 -#Source0: ftp://ftp.horde.org/pub/skeleton/%{_hordeapp}-h3-%{version}.tar.gz -#Source0: ftp://ftp.horde.org/pub/skeleton/%{_hordeapp}-h3-%{version}-%{_rc}.tar.gz -#Source0: ftp://ftp.horde.org/pub/snaps/%{_snap}/%{_hordeapp}-HEAD-%{_snap}.tar.gz +Source0: ftp://ftp.horde.org/pub/skeleton/%{hordeapp}-h3-%{version}.tar.gz # Source0-md5: - -# 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: %{_hordeapp}.conf -Patch0: %{_hordeapp}-prefs.patch +Source1: apache.conf +Patch0: prefs.patch URL: http://www.horde.org/skeleton/ BuildRequires: rpm-php-pearprov >= 4.0.2-98 BuildRequires: rpmbuild(macros) >= 1.264 -BuildRequires: tar >= 1:1.15.1 -Requires: apache(mod_access) Requires: horde >= 3.0 Requires: webapps -#Obsoletes: %{_hordeapp} +Requires: webserver(access) BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -# horde accesses it directly in help->about -%define _noautocompressdoc CREDITS -%define _noautoreq 'pear(Horde.*)' - %define hordedir /usr/share/horde -%define _appdir %{hordedir}/%{_hordeapp} +%define _appdir %{hordedir}/%{hordeapp} %define _webapps /etc/webapps -%define _webapp horde-%{_hordeapp} +%define _webapp horde-%{hordeapp} %define _sysconfdir %{_webapps}/%{_webapp} +%define _noautoreq pear(Horde.*) + # GET DESCRIPTION FROM PROJECT URL %description SKELETON @@ -56,23 +43,23 @@ 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 . -%description -l pl +%description -l pl.UTF-8 SKELETON Projekt Horde tworzy aplikacje WWW w PHP i wydaje je na licencji GNU -General Public License. Wiêcej informacji (w³±cznie z pomoc± dla -Skeleton) mo¿na znale¼æ na stronie . +General Public License. Więcej informacji (włącznie z pomocą dla +Skeleton) można znaleźć na stronie . %prep -%setup -qcT -n %{?_snap:%{_hordeapp}-%{_snap}}%{!?_snap:%{_hordeapp}-%{version}%{?_rc:-%{_rc}}} -tar zxf %{SOURCE0} --strip-components=1 +%setup -q -n %{hordeapp}-h3-%{version} +%patch0 -p1 -rm -f {,*/}.htaccess +rm {,*/}.htaccess for i in config/*.dist; do mv $i config/$(basename $i .dist) done # considered harmful (horde/docs/SECURITY) -rm -f test.php +rm test.php %install rm -rf $RPM_BUILD_ROOT @@ -83,34 +70,34 @@ cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir} echo '' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.php touch $RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak cp -a lib locale templates themes $RPM_BUILD_ROOT%{_appdir} +cp -a docs/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config -ln -s %{_docdir}/%{name}-%{version}/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs -install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf -install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf +cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf +cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf %clean rm -rf $RPM_BUILD_ROOT %post if [ ! -f %{_sysconfdir}/conf.php.bak ]; then - install /dev/null -o root -g http -m660 %{_sysconfdir}/conf.php.bak + install /dev/null -o root -g http -m 0660 %{_sysconfdir}/conf.php.bak fi # CHECK FIRST DOES IT HAVE SQL AND FILE THERE. if [ "$1" = 1 ]; then -%banner %{name} -e <<-EOF + %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/%{_hordeapp}.sql.gz | mysql horde -EOF + zcat %{_docdir}/%{name}-%{version}/scripts/sql/%{hordeapp}.sql.gz | mysql horde + EOF fi -%triggerin -- apache1 +%triggerin -- apache1 < 1.3.37-3, apache1-base %webapp_register apache %{_webapp} -%triggerun -- apache1 +%triggerun -- apache1 < 1.3.37-3, apache1-base %webapp_unregister apache %{_webapp} %triggerin -- apache < 2.2.0, apache-base